Predicting equity markets with social media and online news: using sentiment-driven Markov switching models



Similar documents
Booth School of Business, University of Chicago Business 41202, Spring Quarter 2015, Mr. Ruey S. Tsay. Solutions to Midterm

The Viability of StockTwits and Google Trends to Predict the Stock Market. By Chris Loughlin and Erik Harnisch

STOCK MARKET VOLATILITY AND REGIME SHIFTS IN RETURNS

A constant volatility framework for managing tail risk

Preholiday Returns and Volatility in Thai stock market

IMPACT OF SOCIAL MEDIA ON THE STOCK MARKET: EVIDENCE FROM TWEETS

VOLATILITY FORECASTING FOR MUTUAL FUND PORTFOLIOS. Samuel Kyle Jones 1 Stephen F. Austin State University, USA sjones@sfasu.

Charles University, Faculty of Mathematics and Physics, Prague, Czech Republic.

Sentiment Analysis of Twitter Feeds for the Prediction of Stock Market Movement

Big Data, Socio- Psychological Theory, Algorithmic Text Analysis, and Predicting the Michigan Consumer Sentiment Index

QUANTIFYING THE EFFECTS OF ONLINE BULLISHNESS ON INTERNATIONAL FINANCIAL MARKETS

ECON4510 Finance Theory Lecture 7

Financial Assets Behaving Badly The Case of High Yield Bonds. Chris Kantos Newport Seminar June 2013

Do Banks Buy and Sell Recommendations Influence Stock Market Volatility? Evidence from the German DAX30

Time Series Analysis

Sensex Realized Volatility Index

ICC September 2009 Original: French. Study. International Coffee Council 103 rd Session September 2009 London, England

Volatility modeling in financial markets

Financial Risk Forecasting Chapter 8 Backtesting and stresstesting

Sentiment Analysis. D. Skrepetos 1. University of Waterloo. NLP Presenation, 06/17/2015

Introduction to time series analysis

Threshold Autoregressive Models in Finance: A Comparative Approach

ER Volatility Forecasting using GARCH models in R

Optimization of technical trading strategies and the profitability in security markets

Forecasting methods applied to engineering management

Contents. List of Figures. List of Tables. List of Examples. Preface to Volume IV

Measuring downside risk of stock returns with time-dependent volatility (Downside-Risikomessung für Aktien mit zeitabhängigen Volatilitäten)

Algorithmic Trading Session 6 Trade Signal Generation IV Momentum Strategies. Oliver Steinki, CFA, FRM

The information content of lagged equity and bond yields

5. Multiple regression

AN EVALUATION OF THE PERFORMANCE OF MOVING AVERAGE AND TRADING VOLUME TECHNICAL INDICATORS IN THE U.S. EQUITY MARKET

Forecasting in STATA: Tools and Tricks

ADVANCED FORECASTING MODELS USING SAS SOFTWARE

How To Analyze The Time Varying And Asymmetric Dependence Of International Crude Oil Spot And Futures Price, Price, And Price Of Futures And Spot Price

A comparison between different volatility models. Daniel Amsköld

Forecasting Stock Market Volatility Using (Non-Linear) Garch Models

Seasonality and the Non-Trading Effect on Central European Stock Markets

A GENERAL TAXONOMY FOR VISUALIZATION OF PREDICTIVE SOCIAL MEDIA ANALYTICS

Master of Mathematical Finance: Course Descriptions

4. Simple regression. QBUS6840 Predictive Analytics.

A Trading Strategy Based on the Lead-Lag Relationship of Spot and Futures Prices of the S&P 500

Earnings Announcement and Abnormal Return of S&P 500 Companies. Luke Qiu Washington University in St. Louis Economics Department Honors Thesis

Bank of Japan Review. Global correlation among government bond markets and Japanese banks' market risk. February Introduction 2012-E-1

Working Papers. Cointegration Based Trading Strategy For Soft Commodities Market. Piotr Arendarski Łukasz Postek. No. 2/2012 (68)

Event Study Analysis of Information Technology Stocks by Dynamic Conditional Score Models

Stock Price Forecasting Using Information from Yahoo Finance and Google Trend

Do Tweets Matter for Shareholders? An Empirical Analysis

Big Data and High Quality Sentiment Analysis for Stock Trading and Business Intelligence. Dr. Sulkhan Metreveli Leo Keller

Analysis of Financial Time Series

Optimal Risk Management Before, During and After the Financial Crisis

Can Twitter provide enough information for predicting the stock market?

Prediction of Stock Performance Using Analytical Techniques

Stock Market Forecasting Using Machine Learning Algorithms

A Description of Consumer Activity in Twitter

Introduction to Regression and Data Analysis

Discussion of Momentum and Autocorrelation in Stock Returns

The Stability of Moving Average Technical Trading Rules on the. Dow Jones Index

Is Gold a Hedge or a Safe Haven? An Analysis of Stocks, Bonds and Gold

Is the Forward Exchange Rate a Useful Indicator of the Future Exchange Rate?

DOES BLACK FRIDAY STILL MATTER?

16 : Demand Forecasting

A Regime-Switching Relative Value Arbitrage Rule

MARKETS, INFORMATION AND THEIR FRACTAL ANALYSIS. Mária Bohdalová and Michal Greguš Comenius University, Faculty of Management Slovak republic

Dr Christine Brown University of Melbourne

A Primer on Forecasting Business Performance

Probabilistic Forecasting of Medium-Term Electricity Demand: A Comparison of Time Series Models

(I)rationality of Investors on Croatian Stock Market Explaining the Impact of American Indices on Croatian Stock Market

A Regional Demand Forecasting Study for Transportation Fuels in Turkey

A model to predict client s phone calls to Iberdrola Call Centre

Using Text and Data Mining Techniques to extract Stock Market Sentiment from Live News Streams

INCORPORATION OF LIQUIDITY RISKS INTO EQUITY PORTFOLIO RISK ESTIMATES. Dan dibartolomeo September 2010

Volatility Forecasting Performance: Evaluation of GARCH type volatility models on Nordic equity indices

Relationship among crude oil prices, share prices and exchange rates

Time Series Analysis. 1) smoothing/trend assessment

Asian Economic and Financial Review DETERMINANTS OF THE AUD/USD EXCHANGE RATE AND POLICY IMPLICATIONS

Volatility: A Brief Overview

Tweets Miner for Stock Market Analysis

JetBlue Airways Stock Price Analysis and Prediction

How to Win the Stock Market Game

Predictability of Non-Linear Trading Rules in the US Stock Market Chong & Lam 2010

Chapter Seven STOCK SELECTION

Stock market booms and real economic activity: Is this time different?

Pattern Recognition and Prediction in Equity Market

Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model

Masters in Financial Economics (MFE)

The Best of Both Worlds:

NTC Project: S01-PH10 (formerly I01-P10) 1 Forecasting Women s Apparel Sales Using Mathematical Modeling

2011 Page 98. The Crude Oil Price Shock and its Conditional Volatility: The Case of Nigeria. Charles Uche Ugwuanyi

IBM SPSS Forecasting 22

Auxiliary Variables in Mixture Modeling: 3-Step Approaches Using Mplus

Integrated Resource Plan

Algorithmic Trading Session 1 Introduction. Oliver Steinki, CFA, FRM

MULTIPLE REGRESSION AND ISSUES IN REGRESSION ANALYSIS

FORECASTING DEPOSIT GROWTH: Forecasting BIF and SAIF Assessable and Insured Deposits

Studying Achievement

Bank Profitability: The Impact of Foreign Currency Fluctuations

Non Linear Dependence Structures: a Copula Opinion Approach in Portfolio Optimization

TEMPORAL CAUSAL RELATIONSHIP BETWEEN STOCK MARKET CAPITALIZATION, TRADE OPENNESS AND REAL GDP: EVIDENCE FROM THAILAND

Sentiment analysis on tweets in a financial domain

Chapter 5: Analysis of The National Education Longitudinal Study (NELS:88)

Transcription:

Predicting equity markets with social media and online news: using sentiment-driven Markov switching models Well-known scientific assumptions on efficient markets and rational agents have been the base of economic models for years. However, an increasing domain of science nowadays focuses on market irrationality, behavioral biases, and crowd psychology as explanations for what Keynes called `animal spirits. His understanding that markets are largely driven by spontaneous human behavior rather than mathematical expectations is affirmed by emotions of fear and trust underlying the credit crisis. This paper attempts to capture such emotions that influence investor decisions by extracting them from digital media sources like online newswires and social media platforms. By: Steven nooijen Introduction There is substantial literature confirming the significance of irrationality on financial markets. One way of measuring this type of investor mood swings or noise trading is through sentiment analysis. Although traditionally published through consumer confidence indices, we provide 4 reasons to focus on sentiment derived from the internet specifically. One, mood analysis from large-scale online data is rapid and cost effective (Mao et al., 2011). Besides, there is no need to question the truthfulness or validity of respondents self-reported emotional states like in traditional surveys (Brener et al., 2003). Second, the World Wide Web contains massive amounts of inter-consumer communication that is accessed by everyone (Tirunillai and Tellis, 2012). The sample is thus likely to be larger and more representative. Third, digital media allow us to track the mood of millions in a more timely fashion, as in theory it could be derived every second. Fourth, social media s forecast capabilities have already been demonstrated on a variety of socio-economic phenomena, including presidential elections (Tumasjan et al., 2010) and influenza epidemics (Culotta, 2010). However, previous studies often contain conflicting claims on the direction of the relationship between sentiment and stock returns. What they agree on is sentiment s predictive relation with regard to volatility. For example, Antweiler and Frank (2004) scan messages in internet stock chat rooms for `buy, `hold and `sell recommendations and find that message activity does not predict returns, but rather return volatility. Our model is therefore mostly focused on examining the predictive capabilities of digital MSC-LEVEL econometrics 17

MSC-LEVEL specialty econometrics media on volatility. This paper distinguishes itself from the existing literature on several fronts. First, the Thomson Reuters MarketPsych Indices (TRMI) we use as our data, are superior both coverage- and time-wise to data seen in other academic work. Coverage-wise, as the TRMI scan 50,000 professional news and 2 million social media sites for content every day. Plus for each of these two types, they monitor 24 different emotions rather than just bipolar positive or negative sentiment. Timewise, as the history includes 15 years of professional news sentiment, and social media data basically since its existence. The TRMI are constructed in such a way, that we can compare the two types of data, and can discover which one holds more information. A second notable contribution to the sentiment literature is that we examine its forecast ability on both returns and volatility in a two regime context. For this purpose, sentiment variables are added to the mean and EGARCH volatility specifications of a general Markov switching model as described in Hamilton (1994). This allows us to observe whether sentiment is more predictive in either calm or stressed markets. Assuming efficient markets, our main hypotheses are that sentiment does not help predict returns nor volatility in any regime. However, in case of significance, we expect to find relations mostly for volatility forecasting. Furthermore, we test the hypothesis that sentiment plays a larger role during stressed high volatility markets compared to tranquil times with low price swings. We suspect this as emotions tend to play a larger role during crisis periods. The sample includes data on the internet bubble, and the Lehman and Euro crises that can be used to this end. Thirdly, we investigate the validity of the above hypotheses for ten different equity sectors. Earlier work mostly focused on forecasting an industry-wide index like the DJIA or S&P500, but that does not take into account that one sector might be driven more by sentiment than another. As retail investors typically do not own stocks they do not read about, the TRMI could help us identify those industries that are more sensitive to news or social media exposure. In this article we only discuss the Industrial sector results, as these provide a stable example to display the MS-EGARCHX model capabilities. Sentiment has played a larger role in the Financials industry, but the huge industry specific shocks that have occurred in this particular industry lead to exceptional estimation results. A discussion on this can be found in the full version of my thesis. Model In order to determine the influence of sentiment variables on both mean returns and variances, we extend the standard econometric AR-EGARCH model with sentiment variables in both the mean and volatility specifications, naming the new model an ARX- EGARCHX. Let r t be the log return of an equity sector at time t. Basic financial time series modeling is about specifying the conditional mean and variance of a log return series r t at time t: where p, k and q are non-negative integers. The ARMA(p,q) model is easily extended by adding any exogenous (sentiment) drivers x i,t-1 ; there are no restrictions on the coefficients in Equation 2. The mean equation removes any linear dependence from the asset return series r t. The order (p,q) of the ARMA time series model depends on ACF and PACF plots of returns and squared returns. Tsay (2005) notes however, that for most return series the serial correlations are weak, if any. For daily series, the more basic AR(p) specification suffices. To investigate the effect of sentiment variables on volatility, we prefer the exponential GARCH (EGARCH) model proposed by Nelson (1991) over the basic GARCH(m,s) model (Bollerslev, 1986) for two reasons. One, by including exogenous volatility regressors v i,t-1 to a GARCH(1,1) specification, the stationarity conditions >0, 0, 0, and ( + )<1 no longer guarantee positivity. This is because no restrictions are placed on the domain nor estimated coefficients of v i,t-1. An easy way of overcoming this weakness is by taking the exponential like in equation 3. The conditional variance is now always positive, so we no longer need to take squares or the absolute value of our external sentiment regressors. The second benefit of an EGARCH specification is that it enables the model to react differently to positive and negative past shocks of, capturing the so called leverage effect. A large negative shock is expected to increase volatility more than a positive shock similar in absolute magnitude. This joint ARX-EGARCHX model is a well accepted tool for capturing three important characteristics of volatility data: its rather continuous evolution over time, the leverage effect and its persistence. However, we can add additional flexibility by making the parameters of equation 2 and 3 regime-dependent. This way we can learn whether sentiment plays a more important role in stressed markets compared to calm periods (Gray, 1996). Suppose therefore that there are two unobserved regimes S t at time t, S t = {1,2}. Each regime has its own conditional mean, variance, and assumed normal distribution. The state means and variances have the form of respectively Equation 2 and 3, but subscripts are added to each coefficient to allow for different regime behavior. The distribution for a return series r t then combines both regimes in (1) (2) (3) 18

(4) with as the mixing parameter or probability of being in State 1 at time t. The regimes are never actually observed, but conditional on the information set we can distinguish three different probabilities that indicate the likelihood of a regime occurring/having occurred. First, the ex ante probability P(S t =1 F t-1 ) only depends on the information of time t-1 and is used for forecasting. Using the realized return at time t we can calculate the filtered regime probability P(S t =1 F t ). This is used for calculation of the new ex ante probabilities in the next period t+1. The third probability, the smoothed P(S t =1 F T ), is calculated recursively afterwards and uses the entire data set. It shows which regime was dominant at each point in time. To calculate the ex ante state probabilities we need to know the transition or switching probabilities of moving from one regime to the other, To estimate the single regime EGARCHX and dual regime MS-EGARCHX we use Quasi-Maximum Likelihood. For both models we assume to be i.i.d. normally distributed for ease of estimation. For Markov switching models, the density depends on the current regime. In State 1, an observed return r t is supposed to be drawn from the N(, ) distribution, where in the second case this would be the N(, ) distribution. The density of r t is thus conditional on the state or regime S t : Following Hamilton (1994) we can next calculate the joint density distribution function of r t and S t with Bayes theorem, so (9) (10) (11) (5) For example, 1-Q is the chance of moving from regime 2 to regime 1. As the regime probabilities are not observed at time t, we use the transition matrix to predict the (ex ante) regime probabilities at time t as follows: (6) This is a Hamilton first-order Markov model, which assumes that all information up to F t-1 is encapsulated in the last state S t-1 (Hamilton, 1994). The ex ante probabilities are used for calculating the log-likelihood function. A problem of path-dependence caused by the GARCH coefficient in the volatility equation, is solved by computing at each time step t, the conditional variance summed over both states (Gray, 1996): (7) in which represent the filtered regime probabilities P(S t = i F t ). The conditional regime variances will depend on it through (8) and will thus no longer be fully path dependent, while preserving the persistence effect of a GARCH parameter. The residuals are also aggregated over two states by =r t -( + ), so that the standardized residuals become. Note that by making all parameters in both the mean and volatility equations state dependent, we significantly increase the number of parameters to be estimated. As the Markov switching model in equation 4 has the volatility specification of equation 8, we refer to this final model from here on as the MS-EGARCHX model. Here, is the ex ante state probability of regime i as the actual state is unobserved at time t. The unconditional density of r t is then found by aggregating over the two states: so that the log-likelihood function becomes Data Description Our data come from the company MarketPsych Data and is provided by Thomson Reuters. The Thomson Reuters MarketPsych Indices (TRMI) are minutely updated sentiment indices that comprise time series of human emotions derived from online media sources. All web content crawled from the internet is screened for its financial relevance, and consequently emotions are extracted that are specific to several financial markets. The data are quite superior to those used in earlier cited work with respect to the number and variety of sources included, as well as its long history starting in 1998. The TRMI make a distinction between content derived from news and content derived from social media. This allows us to compare the impact of professional news with the retail investment type of content. For the first category, over 50,000 internet news sites are scraped every day, including leading newswires like The New York Times, The Wall Street Journal, and Financial Times. Less influential news (12) (13) (14) MSC-LEVEL specialty econometrics 19

MSC-LEVEL specialty econometrics sources are captured through crawler content from Yahoo! and Google news aggregators. For the sake of brevity we will from here on simply refer to this category as `news. The TRMI social media content comes from over 2 million social media sites. Primary sources include StockTwits, Yahoo! Finance, Blogger and other common chat rooms, forums and blogs. The collection starts in 1998 with some small internet forums, but only really kicks off with the rise of large social media platforms in the second half of the previous decade. Although MarketPsych claims to capture the top 30 percent of blogs, microblogs, and other social media sources, a big portion concerning retail consumption mentions is excluded from the equity indices we analyze. The underlying thought is that a forum on how to repair a Dell laptop does not add value to the forecasting power of an emotion time series on technology stocks. This category `social media thus perfectly captures the thoughts of retail investors. Scraping all sources minutely, the entire content set includes over 2 million new articles and posts every day. Within minutes of publication, any new content is processed into the TRMI feed, after which advanced linguistic software scores the content specific to companies, currencies, commodities and countries. Basically, the algorithm searches for keywords around the topic mentioned and looks for up and down words in a dictionary. `Terrible will yield a negative score, but `terribly good should yield a (double) positive score. However, the production of the TRMI involve more advanced algorithms which employ not only grammar, but also machine learning to solve for ambiguities, variation in data sources, and changes in a word s meaning over time. These advanced linguistic techniques allow the TRMI to score along a number of dimensions including specific emotions and so-called buzz metrics. Buzz is the word MarketPsych uses for message volumes, so that the buzz variable litigations, for example, gives an indication on the amount of discussion on people being fired. In total there are 24 variables available for each equity sector index. A more detailed description on the TRMI can be found in the MarketPsych white paper (Peterson, 2013). Data Transformations The TRMI daily readings come in every day at 20.30, with the first observations on January 1, 1998 for both the news and social media data type. The last reading in our sample is on June 30, 2013 totaling 5,660 observations. There are 809 weekends in this 15.5 year time frame, leaving us 4,042 weekdays. Because of a volumes trend break, we use the social media sentiment series from August 2006 onward, when Twitter was launched. This results in a total of 1,804 readings. We apply a couple of transformations to the data. First, we standardize periods of the data to remove any structural breaks caused by changes in the data generating process. Second, we remove intra-week seasonality by subtracting its daily average from each observation. This is necessary as for example sentiment seems to structurally depress over the week from Monday to Friday. Third, we substitute all blank fields by carrying the last observation forward. Fourth, we remove an increasing trend in news buzz by dividing buzz by its four week moving average. Thus we look at the relative weights, (15) This allows us to compare relative buzz values from for example 2013 with 1998. In a last step we multiply the buzzweights with the sentiment observations. This transformation differentiates sentiment associated with large buzz from the same absolute sentiment level caused by just a little buzz. An emotion felt by many (high buzz) is more heavily weighted than the same emotion experienced by only a few people (little buzz). The relevance of weekend data has been investigated in previous academic work. Pettengill (2003) mentions how a large amount of bad news published over the weekend could be the cause of the `Monday effect anomaly. To account for the release of important news over the weekend (China data, EU summits), we include a dummy that is 1 or -1 on Mondays whenever the buzzweighted sentiment of the weekend before is significantly different compared to the prior twelve weekends (a 3 month period): In equation 16, and are the 12 week rolling mean and standard deviation. A weekend s sentiment value x wknd is calculated as the Sunday minus the Friday observation. The dummy is added in both the return and volatility equation of our models. For social media, weekend data might be a little less relevant, because people discuss their private life when there is no trading going on (Peterson, 2013). Next to this weekend dummy, we calculate the 1 day, 1 week, and 4 week changes for each variable: (17) Observing the three different changes tells us which sentiment trends to look at; short or longer term trends. As dependent variable we use the MSCI US Equity Sector Indices. Each of these indices represents (16) 20

companies specific to one of ten industries as classified by the Global Industry Classification Standard (GICS). We create excess returns by subtracting the general MSCI US log return from each individual sector j s log return: (18) This way we make sure that our sentiment series do not simply predict general market moves, but sector specific movements. Specifically, we examine whether specific sector emotions cause the differences in under- or outperformance of that particular sector s outcome compared to the market. The log returns exhibit some of the statistical properties as described by Danielsson (2011): excess kurtosis, skewness, nonnormality etcetera. Results We compare the Industrial news results of the MS- EGARCHX model with its emotionless equivalent and the single regime EGARCHX in Table 1. There is a clear distinction between a low and high volatility regime, most notably characterized by the highly significant constants in the volatility specifications. Furthermore the regimes are very persistent with transition probabilities P and Q approaching unity. However within regimes, volatility is less persistent for the low volatility case which is expressed by the GARCH parameter being smaller than. The leverage effect is very much present during high volatile environments, but is not even significant when volatility is low. This result could not have been captured by a single regime model. The results imply that the TRMI can be helpful in both return and volatility forecasting. This is not only indicated by the t-statistics, but it is also confirmed by an increasing log-likelihood and a decreasing Akaike Information Criterion (AIC). The log-likelihood is demonstrated to be significantly higher by means of a likelihood ratio (LR) test. We find that Markov switching is an improvement upon the single regime model (LR statistic of 72.85) and adding sentiment to it improves the model fit even more (LR statistic of 51.19). Interpretation-wise, we find that predictions of Industrial asset prices made in professional news (marketforecast) actually drive prices upward during high volatile periods. Increasing optimism in professional news is a good indicator of volatility calming down again. More volume of news messages leads to higher volatility in both regimes. Sentiment does not add predictive power for all equity sectors, an overview can be found in my actual thesis. *signif. codes: *** 0.001 ** 0.01 * 0.05. 0.1 1 Table 1: Comparison of three models for Industrial specific news sentiment. The MS-EGARCH model does not include any sentiment covariates. The log-likelihood and AIC improve with each additional step of model sophistication. Looking at the smoothed state probability in the lower part of Figure 1, we immediately observe that the regimes are quite persistent. Small volatility spikes have basically blurred into two main periods of heightened market stress. More interesting therefore are the ex ante probabilities shown by the black line in the same graph. Periods in which the ex ante probability exceeded 0.5 are shaded gray. We see that the probability of being in the high volatility regime gradually builds up in the years before the Financial crisis, but remains rather volatile itself. Therefore it is hard to say whether the statistic was a good predictor of 2008 s steep market decline. For the Financials sector a very sudden regime switch occurs at the end of 2007, before the long market decline. Again, it might not have predicted the crisis in time, but it was definitely indicating upcoming trouble. To truly determine the additional predictive power induced by regime switching and external sentiment variables, we compare each model in a series of outof-sample tests. We exclude the last 2,5 years and reestimate the models in-sample. The remaining data, starting on January 2011, contains 650 observations and includes the Euro zone debt problems as a possible high volatility environment. We test each model s forecast ability on two fronts. Return prediction is tested with the mean squared error (MSE), mean absolute error (MAE) and hit ratio (HR). The latter statistic indicates how often our directional prediction matches the direction of the true market movement. Sadly the first two statistics are very comparable among each model and the hit ratio is below 50% for all five (see Table 2). MSC-LEVEL specialty econometrics 21

is replaced by ; the variance in each regime is no longer time varying. Across the other sectors the dual regime models also perform better, but the results of Financials suffer from the Euro crisis. *signif. codes: *** 0.001 ** 0.01 * 0.05. 0.1 1 Out-of-sample test results for news sentiment for the last 2.5 years of Industrial excess returns. All models have poor return forecast capabilities, but the Value at Risk predictions perform better for the Markov switching models compared to the single regime models. The unconditional coverage rate is tested by b 0, while the independence hypothesis is tested by b 1. MSC-LEVEL specialty econometrics Figure 1: All three panels contain outcomes of the MS-EGARCHX model driven by Industrial specific news sentiment. The shaded areas indicate time periods in which the ex ante probability of being in the high volatility regime was greater than 0.5. The ex ante probability itself is shown in the bottom panel, together with its smoothed counterpart (the thick red line). The model s conditional volatility is shown in the middle. This means that adding sentiment and regime switching capabilities does not help in forecasting returns, even though we found significant sentiment regressors in the mean equation of high volatility periods. This result however does not come as a surprise since most of the extra model complexity focuses on forecasting timevarying volatility rather than returns. Therefore, the second set of backtests comprise Value at Risk (VaR) statistics. In computing the 1% and 5% forecast Value at Risk, we suppose that the standardized residuals of our models are Student-t distributed to allow for fat tails. Two hypotheses should not be violated. The unconditional coverage hypothesis firstly tests whether the probability of an ex-post loss exceeding the VaR forecast matches the theoretical coverage rate of 1% or 5%. If this is rejected, the model is either systematically under- or overestimating risk. Second, the independence hypothesis tests whether VaR exceedances are independently distributed rather than clustered. Both can be tested simultaneously with the Engle-Manganelli test (Engle and Manganelli, 2004). Judging from the bottom rows of Table 2 the single regime models highly reject the independence hypothesis at the 1% VaR level. This hypothesis is not rejected at the 5% significance level for the three Markov switching models, indicating that they provide better risk forecasts. The MS-constant variances model has the same log-likelihood as in Equation 14 but The social media data has less predictive power for both returns and volatility. Overall the data is more wiggly, possibly indicating that relationships have not stabilized yet. Without doubt, the ways in which digital media are written, distributed and read have changed significantly over time. Also, the social media sample is a little short to properly estimate the sophisticated Markov switching models. On top of that, the sample starting late 2006 is largely dominated by financial crises. We see this in the estimates for the Financials sector, which assumes the high volatility regime for the entire period between the housing bubble and early 2013. Simply said there are too few observations to properly estimate the low volatility regime s parameters as there was no such a regime for Financial equity. This results in high standard errors, making it hard to infer the parameters true values. Although two states can provide additional insights over a single-regime model, proper MS-EGARCHX model estimation requires a lot of observations. Future research could therefore focus on applying a different technique to maximize the forecast potential of social media sentiment. Conclusion This paper examined the predictive capabilities of online investor sentiment on both returns and volatility of various equity markets. For this purpose, exogenous variables are added to the mean and EGARCH volatility specifications of a Markov Switching model. We find that the Thomson Reuters MarketPsych Indices (TRMI) derived from equity specific digital news are overall better indicators of future market returns and volatility than similar sentiment from social media. In the two regime context, there is only weak evidence supporting the hypothesis of emotions playing a more important role during stressed markets compared to calm periods. However, we do find differences in sentiment sensitivity between different industries. The TRMI were the most 22

Brener, N. D., Billy, J. O. G., and Grady, W. R. (2003). Assessment of factors affecting the validity of selfreported health-risk behavior among adolescents: evidence from the scientic literature. Journal of Adolescent Health, 33:436-457. Culotta, A. (2010). Towards detecting influenza epidemics by analyzing twitter messages. 1st Workshop on Social Media Analytics (SOMA). About the author Steven Nooijen Steven is graduated in Financial Econometrics. His thesis was part of a project at ING Investment Management, they now use signals from this data in their investment decisions. He will continue in the (big) data sector at Accenture after his trip through Middle-America. He has also been project leader at the Intreeweek, did a minor real estate at the National University of Singapore and worked part-time at Zanders. predictive for Financials, whereas the Energy and Information Technology sectors were hardly affected by sentiment. Industry-wide we find that volatility is better predictable than returns. This is confirmed by out-ofsample Value at Risk (VaR) statistics that improve when adding the TRMI as regressors. References Antweiler, W. and Frank, M. Z. (2004). Is all that talk just noise? The information content of Internet stock message boards. The Journal of Finance, 59(3):1259-1294. Bollen, J., Mao, H., and Zeng, X. (2011). Twitter mood predicts the stock market. Journal of Computational Science, 2:1-8. Bollerslev, T. (1986). Generalized autoregressive conditional heteroskedasticity. Journal of Econometrics, 31:307-327. Danielsson, J. (2011). Financial risk forecasting: the theory and practice of forecasting market risk, with implementation in R and Matlab. (Wiley, ISBN 9780470669433). Engle, R. F. and Manganelli, S. (2004). CAViaR: conditional autoregressive Value-at-Risk by regression quantiles. Journal of Business and Economic Statistics, 22:367-381. Gray, S. F. (1996). Modeling the conditional distribution of interest rates as a regime-switching process. Journal of Financial Economics, 42:27-62. Hamilton, J. D. (1994). Time series analysis. (Princeton University Press, ISBN 9780691042893). Mao, H., Counts, S., and Bollen, J. (2011). Predicting financial markets: comparing survey, news, Twitter and search engine data. arxiv:1112.105[v]. Nelson, D. B. (1991). Conditional heteroskedasticity in asset returns: a new approach. Econometrica, 59:347-370. Peterson, R. L. (2013). Thomson Reuters MarketPsych Indices (TRMI) white paper. Draft of Februari 22, 2013. Pettengill, G. N. (2003). A survey of the Monday effect literature. Quarterly Journal of Business and Economics, 42:3-28. Tirunillai, S. and Tellis, G. J. (2012). Does chatter really matter? Dynamics of user-generated content and stock performance. Marketing Science, 31(2):198-215. Tsay, R. S. (2005). Analysis of financial time series. (Wiley, ISBN 9780471690740). Tumasjan, A., Sprenger, T. O., Sandner, P. G., and Welpe, I. M. (2010). Predicting elections with Twitter: what 140 characters reveal about political sentiment. AAAI Conference on Weblogs and Social Media (ICWSM), 4:178-185. MSC-LEVEL specialty econometrics 23