You are on page 1of 20

Celebrity Twitter

Portfolio





Nitesh Patel
Student Number: 20008726
Module: IC311 Alternative Investments
Lecturer: Andreas Hoepner

Development and Assessment
of an Alternative Investment
Product
This study looks to present empirical analysis on a
portfolio created using a strategy of holding stocks, which
have been positively mentioned by celebrities in their
tweets.

Nitesh Patel (20008726)
2

Executive Summary
1. Research Purpose
The aim of this paper is to construct an alternative investment product based on celebrity tweets and the
subsequent assessment of its performance. Over the course of this study, I will look to answer: How does the
product perform in comparison to the benchmark and market portfolio and what conclusions can be drawn from the
evaluation.
2. Research Design
The first steps to preparing the data; I chose a sample of celebrity Twitter users. Researching and find the most
followed users; I then eliminated those whose data were unattainable, or not suitable, whilst also looking at finding
a varied sample of users who are widely followed. The celebrities Twitter history is then retrieved and filtered for the
mentioning of S&P500, FTSE350 and the Top 500 Global Brands. A portfolio is then created based upon the filtered
tweets, and the portfolio performance is assessed using simple risk and return measures, as well as advanced
relative risk measures.
3. Findings
A total of 173 different trade positions were identified and held, which consisted of 50 different companies. The
strategy is long-only, with each trade identified by the strategy, being held for 52 weeks (1 year), and then sold. The
subsequent performance assessment reveals that the product is profitable and outperforms its benchmark in many
aspects. The reward to risk relation is very positively in favour of the created portfolio.
4. Research Limitations
First of all the study carried out, is comparatively small in sample period, due to limited data availability. I can
retrieve circa 3200 tweets from any Twitter user, however if they frequently tweet this may shorten the time horizon
for that individual. Additionally the social media platform did not have widespread use until 2009/2010. The filtering
system relies on the list input, and therefore many companies will be omitted. Also the Twitter users may mis-spell
or spell differently the company which will mean their tweet doesnt pass the filter.
5. Research Implications (Theoretical & Practical)
The performance assessment of the portoflio created in this study, provides abnormal returns. This is a good starting
step, for further research, to improve the reliability and validity of the research carried out thus far. Further data can
be mined and analysed to help improve the post-execution performance evaluation.
6. Originality/Value
This paper is the first to attempt to create a trading strategy and portfolio which is based solely upon celebrities
mentioning the use of, endorsing or posting positively about a product, service or company. Previous studies have
looked at financial experts influence on Twitter, on general moods amongst the public to predict the market, or
posititvity to predict box office opening weekend outcomes, etc.
This study shows signs of positive performance using the strategy formulated. In line with many studies carried out
before, this study also shows a positive relationship between the activity on Twitter and stock returns.


Nitesh Patel (20008726)
3

Table of Contents
Executive Summary ........................................................................................................................................................... 2
1. Introduction .............................................................................................................................................................. 4
2. Study Outline ............................................................................................................................................................ 4
3. Data ........................................................................................................................................................................... 5
4. Portfolio Creation ...................................................................................................................................................... 6
5. Product Assessment .................................................................................................................................................. 7
5.1 Test for normality .............................................................................................................................................. 7
5.2. Return .................................................................................................................................................................... 8
5.3 Risk .................................................................................................................................................................... 9
5.4 Higher moments of return distribution .......................................................................................................... 10
5.5 Correlation ...................................................................................................................................................... 11
5.6. Capital Asset Pricing Model ................................................................................................................................. 12
5.7. Advanced Absolute Risk Measures ...................................................................................................................... 13
5.8. Advanced Relative Risk Measures........................................................................................................................ 14
6. Discussion and Conclusion .......................................................................................................................................... 15
Sources ............................................................................................................................................................................ 16
Appendix ......................................................................................................................................................................... 17

Tables
Table 1: Celebrities used, and their corresponding number of followers and tweets. .................................................... 5
Table 2: The final set of events which are used to create the portfolio ........................................................................... 6
Table 3: The Jarque-Bera scores for the portfolios ........................................................................................................... 8
Table 4: Standard Deviation of the Excess Return of the Portfolio. Weekly and Yearly Comparison. ............................. 9
Table 5: Portfolio skewness and kurtosis ........................................................................................................................ 10
Table 6: Advanced Absolute Risk Measures for Portfolio and MSCI World Index .......................................................... 13
Table 7: Advanced Relative Risk Measures for Portfolio and MSCI World ..................................................................... 14

Figures
Figure 1: Histograms displaying the return distribution and the corresponding skewness and kurtosis ........................ 7
Figure 2: Arithmetic Mean Excess Return of the portfolios .............................................................................................. 9
Figure 3: Arithmetic Mean Return of the portfolios ......................................................................................................... 9
Figure 4: Standard Deviation of the Excess Return from the Portfolio and the MSCI World Index ............................... 10
Figure 5: Returns of both Portfolio and MSCI World Index ............................................................................................ 11
Figure 6: Regression of Portfolio Returns using CAPM ................................................................................................... 12
Figure 7: Regression of MSCI WORLD Returns using CAPM ........................................................................................... 12
Nitesh Patel (20008726)
4

1. Introduction
Social media is a revolution, which we are currently experiencing. It has changed the way people communicate and
interact with one another, and opens up many more avenues to share news, information, and just general chit chat.
Social media is relatively quiet young, but is here to stay for the foreseeable future. We are now at a point where
online, we can share, read and react to lots of individual information being posted on microblogging websites, such
as Twitter, Facebook, Google+, Tumblr and more. Twitter in particular has been widely embraced
Financial theory dictates that markets are efficient, and therefore public information is already incorporated into
pricing, Fama (1970). However, we are now at a point where online, we can share, read and react to lots of
individual information being posted on microblogging websites, such as Twitter, Facebook, Google+, Tumblr and
more. This information is public, could be relevant and if not fully analysed and traded upon, could give us pricing
information not yet priced into the market.
Using empirical data, we can analyse these online messages to find relationships with relating stock prices on a
matching time scale and period. The celebrity community is sharing information and opinions on brands and
companies, continuously throughout the day on Twitter. These users have significant followings and their opinions,
endorsements and use of everyday items, can be read via tweets by millions. They have the ability to change public
opinion, and therefore followers may purchase or appreciate certain companies and brands more. Therefore they
could have a correlation with company stock. Positive tweets from celebrities regarding companies can be seen as a
vote of confidence from the celebrity world. Alternatively, if a user tweets their dislike for a product, this could be
early signs of product failure, as generally celebrities are trend setters, and can make or break product launches. This
field of research looks to filter and analyse masses of freely available data to be able to gauge positivity regarding
companies and brands from the celebrity world.
The purpose of this research is to be able to answer whether positive celebrity tweeting correlates with positive
stock gains in the following months. I will be creating a portfolio which is based on investing in companies which
receive positive tweets from celebrities in the forms of endorsement, positively talking about a company or brand, or
tweeting they use or have been using a companys product or service.
2. Study Outline
Several previous studies, which I reviewed in prior to this, found significant relationships between information
derived from tweets and different stock market characteristics. This study looks to build on the area looking at
influential Twitter users and whether, their tweets can lead to stock market gains due to their positivity to the
companys products and services. The data required initially, is compiled lists of tweets from celebrities. These are
then filtered using a list consisting of the S&P500, FTSE350 and The Top 500 Global Brands. The remaining lists of
tweets are then human-read, to be able to identify tweets which relevant. This leaves a final sample of trigger
events, which are then sorted and the portfolios are constructed accordingly. Once the portfolios are established
their performance is assessed in terms of return and risk to return measures. The findings from the analysis will be
summarised and discussed in chapter six, which will also include the limitations faced by the study, and how it could
be improved with further study and analysis.

Nitesh Patel (20008726)
5

3. Data
Celebrities due to their nature, have a high following on Twitter and therefore are a good proxy for highly influential
users. A list of celebrities is created arbitrarily but consists of those highly followed, good Twitter usage and chosen
to be a varied sample. The sample of celebrities is shown below.
Celebrity Twitter Username Followers No. of Tweets
Katy Perry @katyperry 52,491,541 5528
Justin Bieber @justinbieber 51,141,985 26,666
Barack Obama @BarackObama 42,663,795 11,630
Taylor Swift @taylorswift13 40,409,722 2,188
Justin Timberlake @jtimberlake 31,894,986 2,250
Ellen DeGeneres @TheEllenShow 28,626,945 8,758
Cristiano Ronaldo @cristiano 25,644,831 1,878
Kim Kardashian @KimKardashian 20,837,250 17,302
Harry Styles @Harry_Styles 20,242,335 4,703
Kaka @kaka 18,633,916 3,444
Niall Horan @NiallOfficial 18,056,095 9,054
Pitbull @pitbull 16,383,036 5,475
Ashton Kutcher @aplusk 15,985,311 8,333
Drizzy (Drake) @Drake 14,828,200 1,539
Emma Watson @EmWatson 12,854,363 707
Paris Hilton @parishilton 12,679,214 19,435
Stephen Fry @stephenfry 6,757,550 19,115
Jessie J @JessieJ 6,556,915 15,912
Ricky Gervais @rickygervais 5,758,776 15,258
Table 1: Celebrities used, and their corresponding number of followers and tweets. Data from: http://Twittercounter.com/pages/100
Using a python script with the use of Twitter developer access (further information in the appendix), I pull the last
3200 tweets from all the celebrities. The limitation of 3200 is due to the structure of Twitter and the maximum
historic allowance for my basic developer status. The script is a heavily edited version of other freely available scripts
on python repositories.
These tweets are exported to an excel spreadsheet, which then with the use a VBA script; I can filter using a list. The
list consists of the S&P500 company names, FTSE350 company names and the Global 500 Most Valuable Brands,
retrieved from http://brandirectory.com/league_tables/table/global-500-2014. The final outputted list of tweets are
then human read, to verify they are referring to a publicly listed company and if they are endorsing, positively talking
about or mentioning their use of a product, service or company. For example, a celebrity tweeting their positive
opinion on the new iPhone, would count as a trigger to go long Apple (APPL) stock.
The tweets which pass the filtering system are then named events, which are collated together. All the events up to
1
st
Jan 2014, are then used to create a portfolio.
The financial data for the companies is retrieved from DataStream and the data collection period is from April 2008
to the present day. The data is enough to cover a year prior to the first trigger event, which is required to create a
portfolio of the previous 12months to the trading strategy portfolio. The data is then transformed into weekly
returns for each stock between April 2008 and now.
The benchmark being used is the MSCI World Index, which the data for has also been pulled from DataStream. The
risk free data is obtained from http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html. The
market portfolio chosen is the S&P500, due to majority of my trades for the portfolio being American companies.
The S&P 500 weekly data has been obtained from http://research.stlouisfed.org/fred2/series/SP500/downloaddata.
Nitesh Patel (20008726)
6



Table 2: The final set of events which are used to create the portfolio

4. Portfolio Creation
The strategy behind creating this portfolio is to invest in those firms which are being positively mentioned via Twitter
from celebrities. In the preceding review of literature on this field, it is observed that positivity regarding certain
subjects on Twitter, can in fact predict the outcomes, such as the study to predict box office movie returns on the
basis of positivity surrounding the movie prior to the release, Asur, S. and Huberman, B. A. (2010). In this case we are
looking for abnormal stock returns after celebrities have mentioned the stock in a positive light.
The strategy is to create a long only, equally weighted portfolio, holding the corresponding stock for 12 months after
the tweet has passed the filtering system. The stock will be held for 12 months, as time needs to be allowed, the
tweet to disseminate throughout the rest of Twitter, or word of mouth, as the positivity surrounding the product or
service, will generate further rounds of positive discussion between followers.
A secondary portfolio is created with the same event dates but a portfolio of the previous 12 months. This allows for
a comparison of the returns between the portfolio, before and after the tweet from the celebrity.
Nitesh Patel (20008726)
7

1
0 0 0
4
11
24
89
84
33
5
1 1 1
0
1
-
0
.
1
7
5
7
-
0
.
1
4
9
9
-
0
.
1
2
4
1
-
0
.
0
9
8
3
-
0
.
0
7
2
5
-
0
.
0
4
6
7
-
0
.
0
2
0
9
0
.
0
0
4
9
0
.
0
3
0
7
0
.
0
5
6
5
0
.
0
8
2
3
0
.
1
0
8
1
0
.
1
3
3
9
0
.
1
5
9
7
0
.
1
8
5
5
M
o
r
e
Histogram Portfolio
Returns
1 0 0 0 0 1 2
5
9
47
133
42
12
1 1 1
-
0
.
3
6
1
2
-
0
.
3
2
2
6
4
-
0
.
2
8
4
0
8
-
0
.
2
4
5
5
2
-
0
.
2
0
6
9
6
-
0
.
1
6
8
4
-
0
.
1
2
9
8
4
-
0
.
0
9
1
2
8
-
0
.
0
5
2
7
2
-
0
.
0
1
4
1
6
0
.
0
2
4
4
0
.
0
6
2
9
6
0
.
1
0
1
5
2
0
.
1
4
0
0
8
0
.
1
7
8
6
4
M
o
r
e
Histogram Portfolio of
Previous 12 Months

1 1 2 1
3
9
20
30
47
61
40
22
12
3
1 2
-
0
.
0
8
2
7
3
4
2
6
1
-
0
.
0
7
2
2
7
7
2
1
6
-
0
.
0
6
1
8
2
0
1
7
1
-
0
.
0
5
1
3
6
3
1
2
6
-
0
.
0
4
0
9
0
6
0
8
1
-
0
.
0
3
0
4
4
9
0
3
6
-
0
.
0
1
9
9
9
1
9
9
-
0
.
0
0
9
5
3
4
9
4
5
0
.
0
0
0
9
2
2
1
0
.
0
1
1
3
7
9
1
4
5
0
.
0
2
1
8
3
6
1
9
0
.
0
3
2
2
9
3
2
3
5
0
.
0
4
2
7
5
0
2
8
0
.
0
5
3
2
0
7
3
2
5
0
.
0
6
3
6
6
4
3
7
M
o
r
e
Histogram MSCI World
Index
-
0
.
0
6
7
2
1
4
5
0
6
-
0
.
0
5
8
5
0
7
4
5
4
-
0
.
0
4
9
8
0
0
4
0
1
-
0
.
0
4
1
0
9
3
3
4
8
-
0
.
0
3
2
3
8
6
2
9
5
-
0
.
0
2
3
6
7
9
2
4
2
-
0
.
0
1
4
9
7
2
1
8
9
-
0
.
0
0
6
2
6
5
1
3
7
0
.
0
0
2
4
4
1
9
1
6
0
.
0
1
1
1
4
8
9
6
9
0
.
0
1
9
8
5
6
0
2
2
0
.
0
2
8
5
6
3
0
7
5
0
.
0
3
7
2
7
0
1
2
8
0
.
0
4
5
9
7
7
1
8
1
0
.
0
5
4
6
8
4
2
3
3
M
o
r
e
Histogram S&P500
Returns
5. Product Assessment
In this section I will assess the portfolio using several return and risk-related performance measures from the time of
the portfolios inception to the present day, the exception is the comparison portfolio created by holding each stock
for 12 months prior the execution of trading for the strategies portfolio. The portfolio returns are weekly based, as is
the data for the MSCI World Index, S&P 500. The risk-free rate which has be obtained is also the weekly rate.
Each trade is calculated to be executed on the same day each week after the tweet. Due to the financial data
retrieved, the weekly returns were based on a Wednesday to Wednesday timescale, and this is continued
throughout the analysis, to keep the structure simpler.

5.1 Test for normality
To assess whether skewness and kurtosis need to considered for the performance evaluation, I have created graphs
displaying the return distribution of the created strategy portfolio, the previous 12 months prior portfolio and the
MSCI World Index and S&P500.

Figure 1: Histograms displaying the return distribution and the
corresponding skewness and kurtosis
Nitesh Patel (20008726)
8

0
500
1000
1500
2000
2500
5/27/2009 5/27/2010 5/27/2011 5/27/2012 5/27/2013
Portfolio Value (Base: 1000)
Portfolio Nominal Value Benchmark Nominal Value S&P500 Nominal Value

In order to test for normality, I will test the portfolios using the Jarque-Bera test. At a confidence level of 95% a
critical value of 5.99 is derived. If the test statistic exceeds this value then the returns are not normally distributed.
The table below displays the Jarque-Bera values. Since all of the figures exceed 5.99 the returns are not normally
distributed. This finding therefore implies that skewness and kurtosis need to be considered when assessing the
performance.


Table 3: The Jarque-Bera scores for the portfolios

5.2. Return
The main performance evaluation of the portfolio created is the return. The portfolio return is created by taking the
logarithmic returns from the portfolio. Logarithmic returns are used as they are less likely to negative skewed and
more normally distributed than using normal returns. From this, I have created a nominal chart, as seen below,
representing the value of the created portfolio, the market portfolio and the benchmark, from the point of the first
trade executed by the strategy formulated for this study. This base value is at 1000, to make them easily
comparable.















Portfolio Returns Portfolio of previous 12 months MSCI World Index S&P 500
Jarque-Bera 744.7386 3008.143 44.8931 11.93281
Figure 2: Portfolio Values Since Fund Inception
Nitesh Patel (20008726)
9

0.000%
0.100%
0.200%
0.300%
0.400%
0.500%
0.600%
Portfolio Portfolio of
Previous
12 Months
MSCI
World
Index
S&P500
Arithmetic Mean Return
-0.200%
-0.100%
0.000%
0.100%
0.200%
0.300%
0.400%
Portfolio Portfolio of
Previous
12 Months
MSCI
World
Index
S&P500
Arithmetic
Mean Excess Return
3.47%
2.25%
2.16%
Portfolio
MSCI World Index
S&P500
Excess Return StDev Weekly




As seen from the charts above, all four portfolios when unadjusted for the risk free rate have positive average
weekly return. When taking into account the risk free rate (obtained from
http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html) it is visible that the created portfolio,
benchmark and market portfolio still have positive average returns, however the portfolio of the previous 12
months, created as the comparison, has negative average returns.
The analysis shows, for nominal and real return, the portfolio created, is considered a good investment. The portfolio
is a much better investment once the tweets have been posted by celebrities, as the portfolio of stocks since the
tweet performs, much better nominally and in real returns than the portfolio if held prior to the tweet.
This return does not take into account the inherent risk attached to the portfolios and therefore the next section will
focus on introducing some risk measures.
5.3 Risk
Risk for this portfolio can be considered the possibility of a return not meeting the expected return. A simple way to
measure this risk would be to analyse the return variance and the return standard deviation of the portfolio. To
account for the risk free asset class, I will look at the excess return variance and standard deviation.
Table 4: Standard Deviation of the Excess Return
of the Portfolio. Weekly and Yearly Comparison.
Excess Return
StDev Weekly
Excess Return
StDev Yearly
Portfolio 3.47% 24.99%
MSCI World
Index
2.25% 16.23%
S&P 500 2.16% 15.56%
Figure 3: Arithmetic Mean Return of the portfolios Figure 4: Arithmetic Mean Excess Return of the portfolios
Nitesh Patel (20008726)
10


Figure 3: Standard Deviation of the Excess Return from the Portfolio and the MSCI World Index
Both charts show that the portfolio created, exceeds the MSCI World Index, in terms of absolute risk. This is to be
expected, as the returns are higher for the portfolio than the benchmark. Therefore, the added risk of the portfolio is
compensated by additional return over the benchmark. To be able to compare the risk-return ratios, we need to
analyse this further using applicable risk to performance measures, these will be discussed later alongside other
advanced risk measures.

5.4 Higher moments of return distribution
The return distribution from the created portfolios, of the strategy portfolio, the comparison portfolio of the
previous 12 months prior to execution and the benchmark, can be described using skewness and kurtosis. The
following table displays the empirical values for skewness and kurtosis for the portfolios constructed, including the
benchmark being used.
Portfolio Portfolio of the previous 12
months
MSCI World
Index
S&P 500
Skewness 0.41679 -1.780550168 -0.49720721 -0.37941
Kurtosis 11.31411 18.37102221 4.794399124 3.736823
Table 5: Portfolio skewness and kurtosis
The created portfolio has a positive skew, whilst the benchmark , market and comparison portfolios are all
negatively skewed. This means that the created portfolio using the portfolio strategy will experience positive
deviations from the expected return. In respect to performance, this shows that the created portfolio is more
beneficial than benchmark and market, and shows improvement after the tweet event by being much higher skewed
than the comparison previous 12 month portfolio.
All of the kurtoses display a heavy positive excess kurtosis, except for the market portfolio. This is interesting as only
the market portfolio is similar to a normal distribution, being only 0.73 in excess kurtosis. All of the distributions are
leptokurtic, showing they have higher peaks than a normal distribution which can result in larger fluctuations in the
fatter tails. This can therefore impact the reliability of Value at Risk tests when assuming normal distribution, as
there extremities can vary a lot more relative to a normal distribution due to fatter tails.







Nitesh Patel (20008726)
11

5.5 Correlation
To be able to examine the relative movement of the created portfolio and the chosen market portfolio and
benchmark the MSCI World Index, we need to use a covariance and correlation. This will show us the diversification
in the portfolio and how the portfolio returns relative to the market returns.

Figure 4: Returns of both Portfolio and MSCI World Index
In the above chart, I have used a two period moving average line, to be able to show the correlation, a little easier,
due to the many weekly periods assessed in this study. The correlation between the two return sets, is 0.53, this
shows they are moderately correlated. The positive correlation shows they tend to increase and decrease together.










-0.15
-0.05
0.05
0.15
Returns of the Portolfio and MSCI World Index (2
Week Moving Average)
Portolfio Returns (LN) MSCI WORLD LN Returns
2 per. Mov. Avg. (Portolfio Returns (LN)) 2 per. Mov. Avg. (MSCI WORLD LN Returns)
Nitesh Patel (20008726)
12

5.6. Capital Asset Pricing Model
Another performance evaluation method is to apply the capital asset pricing model to the returns. Using CAPM, we
can regress the two sets of data, the portfolio and the market adjusted for the risk free rate. The slope will be the
beta value between the two return sets and the y intercept displaying Jensens Alpha. This is because:
Return(Portfolio/Benchmark) Risk Free = Jensens Alpha + Beta(Portfolio,Market) x [Return(Market) Risk Free] +
Residual Error Term.

Figure 5: Regression of Portolfio Returns using CAPM

Figure 6: Regression of MSCI WORLD Returns using CAPM

As the Figure 6 above shows, the Beta is -0.23 and this shows it offers a lower risk to the market portfolio as it is less
volatile than the S&P 500. It is almost 80% less volatile over the period of analysis for this created portfolio. This beta
also backs up the previous correlation statistics, showing there is a negative relationship between the S&P 500 and
the portfolio created. The y-intercept or Jensens Alpha of 0.004 represents the portfolios systemic return when the
y = -0.2318x + 0.004
R = 0.021
-0.2
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
-0.08 -0.06 -0.04 -0.02 0 0.02 0.04 0.06 0.08
Regression of Portolfio Returns using
CAPM
y = 0.526x + 1E-04
R = 0.2538
-0.1000
-0.0800
-0.0600
-0.0400
-0.0200
0.0000
0.0200
0.0400
0.0600
0.0800
0.1000
-0.08 -0.06 -0.04 -0.02 0 0.02 0.04 0.06 0.08
Regression of MSCI WORLD Returns
using CAPM
Nitesh Patel (20008726)
13

market return is zero or the level of return from the created portfolio over the market for any given level of
systematic risk.
The R squared value of 2%, shows that 2% of the variance in this model, is explained by the data.
Unsurprisingly the MSCI World Index and S&P500, has a beta of 0.5, which shows there is a positively relationship,
however the MSCI World Index is less volatile, as to be expected by the nature of being more geographically
diversified portfolio.

5.7. Advanced Absolute Risk Measures
For a holistic approach to assessing the performance of the portfolio, we need to analyse the return with regards to
the risks associated, and whether the performance is good enough to justify the additional risk for the return over
the risk free rate.
Portfolio Returns
(LN)
MSCI WORLD LN
Returns
VaR 0.0535 0.0362
Expected
Shortfall
-0.0592 -0.0424
Drawdown -0.3002 -0.1575
LPM(rp) 0.0006 0.0003
SSD(rxp) 0.0241 0.0169
Shortfall Risk 0.4724 0.4764
Table 6: Advanced Absolute Risk Measures for Portfolio and MSCI World Index
The first measure of risk, which is commonly user, is Value at Risk. This is down by ranking the returns from the
lowest to highest and identifying the 5% cumulative figure. This gives us the expected loss not to exceed the VaR
with a probability of 95%. As shown in the table, the VaR level for the created portfolio is much higher than the
benchmark. This means on any given day there is a probability of 5%, that the created portfolio will incur losses of
5.35% or more, whilst the benchmark would lose 3.62% or more.
Another measure expected shortfall, can be used to analyse further the tails in the VaR measure. The expected
shortfall is the average loss experienced on the occasions that the portfolio or benchmark has exceeded the VaR
level. The VaR level is the minimum loss on any given day with a 5% probability, but the average loss deviates further
from the minimum loss in the benchmark compared to the created portfolio.
Drawdown is another risk measure that tells us the maximum decline in portfolio value before any recovery. The
created portfolio suffers a drop in 30% of the total value without any recovery, at some stage during the life of the
portfolio. A loss of almost a third of the portfolio value without seeing any positive gains on the weekly time period
is not good. The drawdown on the benchmark is not as harsh, at only 15.7%.
Lower Partial Moment is a measure of only downside risk. Standard deviation is commonly used, however it also
considers the uncertainty of the upside chances as well as the downside risk. In our test of the portfolio and the
benchmark, the portfolio has the higher downside risk.
Semi-standard deviation is another measure, which follows on from LPM. SSD is the square root of the LPM, which
means the squares deviations from the mean excess return. The portfolios SSD is valued at 2.4%, whilst the
benchmark registers 1.7%, overall the downside risk is lower for the benchmark than the portfolio.
Nitesh Patel (20008726)
14

Shortfall risk is another measure which can be derived from the LPM. By taking the LPM to the power 0, you can
calculate the probability of a return falling below the minimal acceptable level, in this case falling below the mean
excess return of the market portoflio, S&P 500. The values are very similar for the portfolio and benchmark, at 47.2%
and 47.6% respectively.
5.8. Advanced Relative Risk Measures
Following on from the absolute risk measures, we can compute relative risk indicators, as shown in the table below.
Portlfio Returns
(LN)
MSCI WORLD LN
Returns
Sharpe Ratio 0.1005 0.0382
RAPA 0.002169728 0.000823608
Treynor 0.0151 0.0016
Sortina 6.53066648 2.906925796
RoPS 0.007386009 0.00180046
Table 7: Advanced Relative Risk Measures for Portfolio and MSCI World
The most common risk measure used is the sharpe ratio, it is the ratio of the excess mean return of the portfolio
over the risk of the portfolio, valued as the standard deviation of the excess returns. As shown in the table, the
excess return per unit of deviation is higher for the portfolio than the benchmark. For this simple measure the risk-
adjusted returns are far superior for the portfolio relatively.
The treynor ratio is similar to the sharpe ratio, but differs slightly in that is accounts for only the systemic risk of the
portfolio rather than taking the total risk of the portfolio. Therefore the ratio is the excess mean return of the
portfolio over the beta of the portfolio. The beta is taken from the regressions done earlier, of the portfolio against
the market portfolio, the S&P500. Again the portfolio performs very well and far better than the benchmark.
The sortina ratio is the relative risk measuring following on from the Lower Partial Moment. This measure computes
the return on semi-standard deviation. As for the results of 6.5 and 2.9 for the portfolio and benchmark respectively,
this shows, that whilst the return for the portfolio is better, it is also has a much better return for the level of risk
(semi-standard deviation) when compared to the benchmark.
The last measured used is the Return on Probability of Shortfall. RoPS measures the return over the probability that
the return fails to exceed the mean excess return of the market portfolio. This follows on from the Shortfall
calculation in the previous section. The RoPS is far superior for the portfolio over the benchmark, and this means for
investors, the risk of shortfall is much greater compared to the level of return when investing in the benchmark, and
should invest in the portfolio created.
A have used no relative risk measures involving drawdown, as the nature of my portfolio, is a fixed 12 month hold
period, and therefore any drawdown suffered, I would not be able to react and cut my losses. These risk measures
would offer no value as they are more suited to higher frequency trading, where the aim is to allow profits to run
and cut losses. In my case the strategy is for the trade to run regardless of the market movement.
The relative measures used, all agree that the portfolio created by the strategy outlined in this study, has a much
better level of return per unit risk. When comparing this to the previous section, it shows compared to the
benchmark, the portfolio created, has a higher potential for losses, due to increased volatility, but with the returns it
generates for investors, it has a better risk-reward relationship.

Nitesh Patel (20008726)
15

6. Discussion and Conclusion
The preceding study is carried out using a strategy formulated using messages posted to Twitter from celebrities.
The strategy after all of the assessment done, looks to have found a positive relationship between the messages
regarding companies and the corresponding stocks return over the following 12 months.
Over the course of the portfolio, using the 173 trade executions, spanning 50 different companies, and each stock
being held for 12 months, we have beaten the benchmark, MSCI World Index, on several measures. The created
portfolio outperforms in the market portfolio and the benchmarks return over the life of the portfolio to date, but
also the relative risk associated it also outperforms the benchmark, showing a very positive reward to risk
relationship. The portfolio has a higher return, but suffers from a high value at risk, but due to having great relative
risk measure, you can see the portfolio rewards the investor much better per unit of risk taken relative to the
benchmark. However, the portfolio constituents and study all together, could be increased and improved.
The direct comparison between the before tweet event portfolio and the post tweet event portfolio shows a heavy
performance improvement after the tweet. At this point without further research and widening the data set, it is
possible to conclude, that there is a relationship between celebrities tweeting and stock prices for the following 12
months. This could be improved with another study to find the degree of effect on stock price improvement
dependant on the weighting of the number of followers and quantifying the positivity of the tweets.
The CAPM regression used could have been replaced with a Fama French three factor model or Cahart model to test
the drivers in the portfolio returns, to a much more detailed level. A further question to the validity of the portfolio
created, is the relatively short observation period. This would need to analysed in the forthcoming years, as Twitter
itself is a relatively new platform for sharing this public information, and therefore we can not just extend our data
back further. A vital assumption for many of the risk measures is normal distribution. As we saw the Jarque Bera test
was very high, showing the distribution is far form being normal, and therefore this could improved with a further
data in the datasets, that should lower the JB score, and help improve the reliability of the measures used.
The portfolio created, could be expanded to data mine more celebrities, and potentially move onto all public Twitter
users whose messages are then retweeted. This would increase the reliability, and help the portfolio become more
diversified, as more tweets would be passing through the filter system created. Additionally, I could add more public
companies into the filtering list, and a wholescale upgrade in the filtering system could be employed, as the python
and VBA scripting employed in this study, could be deemed relatively simplistic. I was limited by the computing
power available and the limited developer license issued by Twitter.








Nitesh Patel (20008726)
16

Sources
Andreas Hoepner (2014). TRADING ON BRAND EVALUATIONS: Corporate Reputation Total Return Fund:
Development and Assessment of an Alternative Investment Product. Alternative Investments - Investment Product
Carolin.
Asur, S. and Huberman, B. A. (2010). Predicting the future with social media. Proceeding WI-IAT '10 Proceedings of
the 2010 IEEE/WIC/ACM International Conference on Web Intelligence and Intelligent Agent Technology 1 pp. 492--
499.
Bodie, Kane and Marcus (2009): Investments, 8. Edition, Irvin: McGraw-Hill.
Datastream 2014, Weekly stock data 2008-2014, Weekly MSCI World Index data 2008-2014. Available from:
Datastream.
Fama/French Factors [Weekly]. Available from:
http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html.
Global 500 Brands 2014, Brand Finance. Available from: http://brandirectory.com/league_Tables/table/global-500-
2014.
Hoepner, A., Rammal, H. and Rezec, M. (2011). Islamic mutual funds financial performance and international
investment style: evidence from 20 countries. The European Journal of Finance, 17(9-10), pp.829--850.
Kempf, A. and Osthoff, P. (2007). The effect of socially responsible investing on portfolio performance. European
Financial Management, 13(5), pp.908--922.
Malkiel, B. G. and Fama, E. F. (1970). Efficient capital markets: A review of theory and empirical work*. The journal of
Finance, 25 (2), pp. 383--417.
Twitter Statistics, Twitter Counter. Available from: http://twittercounter.com/pages/100.
S&P 500 Weekly Data, FRED Economic Data. Available from:
http://research.stlouisfed.org/fred2/series/SP500/downloaddata










Nitesh Patel (20008726)
17

Appendix
Front end python code used to execute tweet download and create arrays for excel output. Tweepy and xlsxwriter
are modules which are available to be installed to run the background processes using additional functions. This
code is available online, and has been edited by myself to function in a way I could use it for this study.
consumer_key = "2US2nBhbbSR3f8lN72PHb2Isd"
consumer_secret = "uCAvXL1NY2IZgRTHbYFnIcTkGwEuh7jS1J35X6EcXGnnNHZSFn"
access_key = "2310455635-RTYxmilTEuhYdzrOJdV6tsCo5cfjd77yG1e0oT7"
access_secret = "iWb4q2SgSVDsuGXgtLnLQ17yKvZE0gPCmiirQbBOOrlcK"

def get_all_tweets(screen_name):

auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_key, access_secret)
api = tweepy.API(auth)

alltweets = []
new_tweets = []
outtweets = []

new_tweets = api.user_timeline(screen_name = screen_name,count=200)

alltweets.extend(new_tweets)

#save the id of the oldest tweet less one
oldest = alltweets[-1].id - 1

#keep grabbing tweets until there are no tweets left to grab
while len(new_tweets) > 0:
print "getting tweets before %s" % (oldest)

#all subsiquent requests use the max_id param to prevent duplicates
new_tweets = api.user_timeline(screen_name = screen_name,count=200,max_id=oldest)

#save most recent tweets
alltweets.extend(new_tweets)

#update the id of the oldest tweet less one
oldest = alltweets[-1].id - 1

print "...%s tweets downloaded so far" % (len(alltweets))

#transform the tweepy tweets into a 2D array
outtweets = [[tweet.id_str, tweet.created_at,
tweet.coordinates,tweet.geo,tweet.source,tweet.text] for tweet in alltweets]

return outtweets

def write_worksheet(twitter_name):

#formating for excel
format01 = workbook.add_format()
format02 = workbook.add_format()
format03 = workbook.add_format()
format04 = workbook.add_format()
format01.set_align('center')
format01.set_align('vcenter')
format02.set_align('center')
format02.set_align('vcenter')
format03.set_align('center')
format03.set_align('vcenter')
format03.set_bold()
format04.set_align('vcenter')
format04.set_text_wrap()

out1 = []
header = ["id","created_at","coordinates-x","coordinates-y","source","text"]

Nitesh Patel (20008726)
18

worksheet = workbook.add_worksheet(twitter_name)

out1 = get_all_tweets(twitter_name)
row = 0
col = 0

worksheet.set_column('A:A', 20)
worksheet.set_column('B:B', 18)
worksheet.set_column('C:C', 13)
worksheet.set_column('D:D', 13)
worksheet.set_column('E:E', 20)
worksheet.set_column('F:F', 120)

for h_item in header:
worksheet.write(row, col, h_item, format03)
col = col + 1

row += 1
col = 0

for o_item in out1:
write = []
cord1 = 0
cord2 = 0
write = [o_item[0], o_item[1], o_item[4], o_item[5]]

if o_item[2]:
cord1 = o_item[2]['coordinates'][0]
cord2 = o_item[2]['coordinates'][1]
else:
cord1 = ""
cord2 = ""

format01.set_num_format('yyyy/mm/dd hh:mm:ss')
worksheet.write(row, 0, write[0], format02)
worksheet.write(row, 1, write[1], format01)
worksheet.write(row, 2, cord1, format02)
worksheet.write(row, 3, cord2, format02)
worksheet.write(row, 4, write[2], format02)
worksheet.write(row, 5, write[3], format04)
row += 1
col = 0

workbook = xlsxwriter.Workbook('Twitter_timelineX.xlsx')


write_worksheet('katyperry')
write_worksheet('BarackObama')


workbook.close()

This VBA code is used within Excel, to filter the list of tweets produced by the script above. This script creates a
temporary array in column Z of the list file Filtering List and uses it for an advanced filter of the column of tweets, it
will then output in another column, all tweets which have at least one word matching the list.
Sub Filtr()
Dim c00 As Variant
Dim mText As Variant
Dim Sentences As Range
Dim mCriteria As Range
Dim mAddy As String
Const mTextFile As String = "C:\Python27\Filtering List.txt"
mText =
Split(CreateObject("scripting.filesystemobject").getfile(mTextFile).openastextstream.re
adall, vbCrLf)
Nitesh Patel (20008726)
19


If Len(mText(UBound(mText))) = 0 Then ReDim Preserve mText(UBound(mText) - 1)

Set Sentences = Range("F1:F" & Range("F" & Rows.Count).End(xlUp).Row)

Range("Z1") = Range("F1")
mAddy = Range("Z2").Resize(UBound(mText) + 1).Address

Range(mAddy) = Application.Transpose(mText)
c00 = Evaluate(Chr$(34) & "* " & Chr$(34) & "&" & mAddy & "&" & Chr$(34) & " *" &
Chr$(34))
Range(mAddy) = c00

Set mCriteria = Range("Z1:Z" & Range("Z" & Rows.Count).End(xlUp).Row)

Sentences.AdvancedFilter xlFilterCopy, mCriteria, Range("H1"), False

With Range("G2:G" & Range("H" & Rows.Count).End(xlUp).Row)
.Formula = "=INDEX(B:B, MATCH($H2, F:F, 0))"
.Value = .Value
.NumberFormat = "YYYY/MM/DD HH:MM:SS"
End With

Set mCriteria = Range("Z2:Z" & Range("Z" & Rows.Count).End(xlUp).Row)
mCriteria.Replace "~* ", "", xlPart
mCriteria.Replace "~ *", "", xlPart

Call Rto
End Sub
Sub Rto()

Dim c00 As Variant
Dim Filters As Variant
Dim iRow As Long
Dim iC As Long
Dim findME As Integer
' sentences
iRow = Range("H" & Rows.Count).End(xlUp).Row
c00 = Range("H2:H" & iRow).Value
c00 = addS(c00)

Range("Z1:Z" & Range("Z" & Rows.Count).End(xlUp).Row).RemoveDuplicates 1, xlYes
Filters = Range("Z2:Z" & Range("Z" & Rows.Count).End(xlUp).Row)

For iRow = LBound(c00, 1) To UBound(c00, 1)
For iC = LBound(Filters, 1) To UBound(Filters, 1)
findME = InStr(1, c00(iRow, 1), Chr$(32) & Filters(iC, 1) & Chr$(32),
vbTextCompare)
If findME > 0 Then
With Range("H" & iRow + 1).Characters(findME, Len(Filters(iC, 1))).Font
.ColorIndex = 3
.Bold = True
End With
End If
Next
Next
Nitesh Patel (20008726)
20


End Sub

Private Function addS(V As Variant) As Variant
Dim i As Long
For i = LBound(V, 1) To UBound(V, 1)
V(i, 1) = Chr$(32) & V(i, 1) & Chr$(32)
Next
addS = V
End Function

You might also like