Skip to main content
Log in

Using Twitter to Predict the Stock Market

Where is the Mood Effect?

  • Research Paper
  • Published:
Business & Information Systems Engineering Aims and scope Submit manuscript

Abstract

Behavioral finance researchers have shown that the stock market can be driven by emotions of market participants. In a number of recent studies mood levels have been extracted from Social Media applications in order to predict stock returns. The paper tries to replicate these findings by measuring the mood states on Twitter. The sample consists of roughly 100 million tweets that were published in Germany between January, 2011 and November, 2013. In a first analysis, a significant relationship between aggregate Twitter mood states and the stock market is not found. However, further analyses also consider mood contagion by integrating the number of Twitter followers into the analysis. The results show that it is necessary to take into account the spread of mood states among Internet users. Based on the results in the training period, a trading strategy for the German stock market is created. The portfolio increases by up to 36 % within a six-month period after the consideration of transaction costs.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1

Similar content being viewed by others

Notes

  1. Daniel et al. (2002) provide an extensive literature review showing that investors’ psychology exerts an influence on security prices.

  2. https://dev.twitter.com.

  3. See also background mood (Loewenstein et al. 2001).

  4. See Germany Trade & Invest for more information on foreign investors: http://www.gtai.de/GTAI/Navigation/EN/Invest/Service/Publications/Markets-germany/Archive/Issues-2011/Volume-2/Fdi/foreign-investors-put-faith-germanys-stocks.html (accessed 22 June 2014).

  5. More information on VDAX-NEW can be found at the website of the exchange: http://www.dax-indices.com/EN/MediaLibrary/Document/VDAX_L_2_4_e.pdf (accessed 22 June 2014).

  6. Information on GfK index can be found on http://www.gfk.com.

  7. We also calculated SMI and WSMI values without the anger dimension and received qualitatively similar results.

  8. Among others, Antweiler and Frank (2004) report R² value of 0.049; Avery et al. (2009) report R² values between 0.0005 and 0.0151; Das and Chen (2007) report R² value of 0.0027 and 0.0041.

  9. There are several discount brokers who offer their clients cost-effective access to capital markets (e.g., Cortal Consors in Germany). We are aware that € 5 is at the low end of the range. However, these costs are very easy to realize for the individual investor. Nevertheless, the outperformance against the benchmark indices would persist even if we assume € 10 per trade.

References

  • Ali K, Pazzani M (1992) Reducing the small disjuncts problem by learning probabilistic concept descriptions. In: Petsche T, Judd S, Hanson S (eds) Computational learning theory and natural learning systems, vol 3. MIT Press, Cambridge

    Google Scholar 

  • Antweiler W, Frank MZ (2004) Is all that talk just noise? The information content of Internet stock message boards. J Financ 59(3):1259–1294

    Article  Google Scholar 

  • Avery C, Chevalier J, Zeckhauser R (2009) The ‘CAPS’ prediction system and stock market returns. Working Paper, Harvard Kennedy School, Cambridge

  • Baker M, Stein J (2004) Market liquidity as a sentiment indicator. J Financ Mark 7(3):271–299

    Article  Google Scholar 

  • Baker M, Wurgler J (2007) Investor sentiment in the stock market. J Econ Perspect 21(2):129–151

    Article  Google Scholar 

  • Bakshy E, Hofman JM, Mason WA, Watts DJ (2011) Everyone’s an influencer: quantifying influence on Twitter. In: Proceedings 4th ACM international conference web search data, pp 65–74

  • Bell NJ, Schoenrock CJ, O’Neal KK (2000) Self-monitoring and the propensity for risk. Eur J Personal 14(2):107–119

    Article  Google Scholar 

  • Benedict R (1934) Patterns of culture. Houghton Mifflin, Boston

    Google Scholar 

  • Biemann C, Bordag S, Heyer G, Quasthoff U, Wolff C (2004) Language independent methods for compiling monolingual lexical data. In: Proceedings CIcLING, LNCS 2945, pp 217–228

  • Bifet A, Frank E (2010) Sentiment knowledge discovery in Twitter streaming data. Discov Sci 6332:1–15

    Article  Google Scholar 

  • Black F (1986) Noise. J Financ 41(3):529–543

    Article  Google Scholar 

  • Bollen J, Mao H, Zeng X (2010) Twitter mood predicts the stock market. J Comput Sci 2(1):1–8

    Article  Google Scholar 

  • Bono JE, Ilies R (2006) Charisma, positive emotions and mood contagion. Leadersh Q 17:317–334

    Article  Google Scholar 

  • Boucher JD (1979) Culture and emotion. In: Marsella AJ, Tharp R, Ciborowski T (eds) Perspectives on cross-cultural psychology. Academic Press, New York, pp 159–178

    Google Scholar 

  • Boucher J, Osgood CE (1969) The pollyanna hypothesis. J Verb Learn Verb Behav 8(1):1–8

    Article  Google Scholar 

  • Boyd D, Golder S, Lotan G (2010) Tweet, tweet, retweet: conversational aspects of retweeting on twitter. In: Proceedings of the 43rd Hawaii international conference on social systems (HICSS)

  • Brown GW, Cliff MT (2005) Investor sentiment and asset valuation. J Bus 78(2):405–440

    Article  Google Scholar 

  • Brown R, Gilman A (1960) The pronouns of power and solidarity. In: Sebeok T (ed) Style in language. MIT Press, Cambridge, pp 253–276

    Google Scholar 

  • Brown P, Keim DB, Kleidon AW, Marsh TA (1983) Stock return seasonalities and the tax-loss selling hypothesis: analysis of the arguments and Australian evidence. J Financ Econ 12(1):105–112

    Article  Google Scholar 

  • Carton S, Jouvent R, Bungener C, Widlöcher D (1992) Sensation seeking and depressive mood. Personal Individ Differ 13(7):843–849

    Article  Google Scholar 

  • Cha M, Haddadi H, Benevenuto F, Gummadi KP (2010) Measuring user influence in Twitter: the million follower fallacy. In: Proceedings of the 4th international aaai conference on weblogs and social media

  • Chan K, Hameed A, Tong W (2000) Profitability of momentum strategies in the international equity markets. J Financ Quant Anal 35(2):153–172

    Article  Google Scholar 

  • Chang S-C, Chen S-S, Chou RK, Lin Y-H (2008) Weather and intraday patterns in stock returns and trading activity. J Bank Financ 32:1754–1756

    Article  Google Scholar 

  • Chang S-C, Chen S-S, Chou RK, Lin YH (2012) Local sports sentiment and returns of locally headquartered stocks: a firm-level analysis. J Empir Financ 19(3):309–318

    Article  Google Scholar 

  • Chen G, Firth M, Rui OM (2001) The dynamic relation between stock returns, trading volume, and volatility. Financ Rev 36(3):153–174

    Article  Google Scholar 

  • Chevalier JA, Mayzlin D (2006) The effect of word of mouth on sales: online book reviews. J Mark Res 43(3):345–354

    Article  Google Scholar 

  • Chintagunta PK, Gopinath S, Venkataraman S (2010) The effects of online user reviews on movie box office performance: accounting for sequential rollout and aggregation across local markets. Mark Sci 29(5):944–957

    Article  Google Scholar 

  • Chordia T, Swaminathan B (2000) Trading volume and cross-autocorrelations in stock returns. J Financ 55(2):915–935

    Article  Google Scholar 

  • Chou KL, Lee T, Ho AH (2007) Does mood state change risk taking tendency in older adults? Psychol Aging 22(2):310

    Article  Google Scholar 

  • Conover MD, Gonçalves B, Ratkiewicz J, Flammini A, Menczer F (2011) Predicting the political alignment of twitter users. In: Proceedings of the international conference social computing

  • Coval JD, Moskowitz TJ (1999) Home bias at home: local equity preference in domestic portfolios. J Financ 54(6):2045–2073

    Article  Google Scholar 

  • Coviello L, Sohn Y, Kramer AD, Marlow C, Franceschetti M, Christakis NA, Fowler JH (2014) Detecting emotional contagion in massive social networks. PLoS One 9(3):e90315

    Article  Google Scholar 

  • D’Onfro J (2013) Twitter admits 5 of its ‘users’ are fake. http://www.businessinsider.com/5-of-twitter-monthly-active-users-are-fake-2013-10. Accessed 22 June 2014

  • Dalbert C (1992) Subjektives Wohlbefinden junger Erwachsener: theoretische und empirische Analysen der Struktur und Stabilität. Zeitschrift für Differentielle und Diagnostische Psychologie 13:207–220

    Google Scholar 

  • Daniel K, Hirshleifer D, Teoh SH (2002) Investor psychology in capital markets: evidence and policy implications. J Monet Econ 49:139–209

    Article  Google Scholar 

  • Das SR, Chen MY (2007) Yahoo! for Amazon: sentiment extraction from small talk on the web. Manag Sci 53(9):1375–1388

    Article  Google Scholar 

  • De Long JB, Shleifer A, Summers LH, Waldmann RJ (1990) Positive feedback investment strategies and destabilizing rational speculation. J Financ 45(2):379–395

    Article  Google Scholar 

  • Dellarocas C, Zhang X, Awad NF (2007) Exploring the value of online product reviews in forecasting sales: the case of motion pictures. J Interact Mark 21(4):23–45

    Article  Google Scholar 

  • Dichev ID, Janes TD (2003) Lunar cycle effects in stock returns. J Priv Equity 6(4):8–29

    Article  Google Scholar 

  • Edmans A, Garcia D, Norli Ø (2007) Sports sentiment and stock returns. J Financ 62(4):1967–1998

    Article  Google Scholar 

  • Eisenberg AE, Baron J, Seligman ME (1998) Individual differences in risk aversion and anxiety. Psychol Bull 87:245–251

    Google Scholar 

  • Fama EF (1970) Efficient capital markets: a review of theory and empirical work. J Financ 25(2):383–417

    Article  Google Scholar 

  • Forgas JP (1995) Mood and judgment: the affect infusion model (AIM). Psychol Bull 117(1):39–66

    Article  Google Scholar 

  • Fowler JH, Christakis NA (2008) Dynamic spread of happiness in a large social network: longitudinal analysis over 20 years in the Framingham Heart Study. BMJ 337:a2338

    Article  Google Scholar 

  • French KR, Poterba JM (1991) Investor diversification and international equity markets. Am Econ Rev 81(2):222–226

    Google Scholar 

  • French KR, Schwert GW, Stambaugh RF (1987) Expected stock returns and volatility. J Financ Econ 19(1):3–29

    Article  Google Scholar 

  • Gallant AR, Rossi PE, Tauchen G (1992) Stock prices and volume. Rev Financ Stud 5(2):199–242

    Article  Google Scholar 

  • Gehm TL, Scherer KR (1988) Factors determining the dimensions of subjective emotional space. In: Scherer KR (ed) Facets of emotion: recent research. Lawrence Erlbaum Associates, Hillsdale, pp 99–113

    Google Scholar 

  • Ghosh R, Lerman K (2011) A framework for quantitative analysis of cascades on networks. In: Proceedings of the 4th ACM international conference web search data mining

  • Gilbert E, Karahalios K (2010) Widespread worry and the stock market. In: Proceedings of the 4th international AAAI conference weblogs social media

  • Grahl J, Hinz O, Rothlauf F (2014) What is the value of a “Like”? – experimental evidence for the influence of popularity signals on shopping behavior. Working Paper

  • Granovetter MS (1973) The strength of weak ties. Am J Sociol 78(6):1360–1380

    Article  Google Scholar 

  • Grinblatt M, Keloharju M (2001) How distance, language, and culture influence stockholdings and trades. J Financ 56(3):1053–1073

    Article  Google Scholar 

  • Grinblatt M, Titman S, Wermers R (1995) Momentum investment strategies, portfolio performance, and herding: a study of mutual fund behavior. Am Econ Rev 85(5):1088–1105

    Google Scholar 

  • Guillory J, Spiegel J, Drislane M, Weiss B, Donner W, Hancock J (2011) Upset now?: emotion contagion in distributed groups. In: Proceedings of the SIGCHI conference human factors computing system

  • Hancock JT, Gee K, Ciaccio K, Lin JMH (2008) I’m sad you’re sad: emotional contagion in CMC. In: Proceedings of the 2008 ACM conference computing supported cooperative work

  • Hatfield E, Cacioppo JT (1994) Emotional contagion. University Press, Cambridge

    Google Scholar 

  • Heimbach I, Hinz O (2012) How smartphone apps can help predicting music sales. In: Proceedings of the 20th European conference information system (ECIS), Barcelona, Spain

  • Hill S, Ready-Campbell N (2011) Expert stock picker: the wisdom of (experts in) crowds. Int J Electron Commer 15(3):73–102

    Article  Google Scholar 

  • Hinz O, Spann M (2008) The impact of information diffusion on bidding behavior in secret reserve price auctions. Inf Syst Res 19(3):351–368

    Article  Google Scholar 

  • Hinz O, Skiera B, Barrot C, Becker J (2011) Seeding strategies for viral marketing: an empirical comparison. J Mark 75(6):55–71

    Article  Google Scholar 

  • Hirshleifer D, Shumway T (2003) Good day sunshine: stock returns and the weather. J Financ 58(3):1009–1032

    Article  Google Scholar 

  • Holte RC, Acker L, Porter BW (1989) Concept learning and the problem of small disjuncts. In: Proceedings of the 11th international joint conference Artificial Intelligence, Detroit, Michigan

  • Huberman G (2001) Familiarity breeds investment. Rev Financ Stud 14(3):659–680

    Article  Google Scholar 

  • Jaffe JF, Westerfield R, Ma C (1989) A twist on the Monday effect in stock prices: evidence from the US and foreign stock markets. J Bank Financ 13(4–5):641–650

  • Jegadeesh N, Titman S (1993) Returns to buying winners and selling losers: implications for stock market efficiency. J Financ 48(1):65–91

    Article  Google Scholar 

  • Johnson EJ, Tversky A (1983) Affect, generalization, and the perception of risk. J Pers Soc Psychol 45:20–31

    Article  Google Scholar 

  • Kamstra MJ, Kramer LA, Levi MD (2000) Losing sleep at the market: the daylight saving anomaly. Am Econ Rev 90(4):1005–1011

    Article  Google Scholar 

  • Kamstra MJ, Kramer LA, Levi MD (2003) Winter blues: a SAD stock market cycle. Am Econ Rev 93(1):324–343

    Article  Google Scholar 

  • Kaplan AM, Haenlein M (2010) Users of the world, unite! The challenges and opportunities of social media. Bus Horiz 59:59–68

    Article  Google Scholar 

  • Karabulut Y (2011) Can Facebook predict stock market activity? Working Paper, University of Frankfurt, Germany

  • Karpoff JM (1987) The relation between price changes and trading volume: a survey. J Financ Quant Anal 22(1):109–126

    Article  Google Scholar 

  • Kempe D, Kleinberg J, Tardos E (2003) Maximizing the spread of influence through a social network. In: Proceedings of the 9th ACM SIGKDD international conference knowledge discovery data mining

  • Kramer AD (2012) The spread of emotion via facebook. In: Proceedings of the SIGCHI conference human factors computer system, pp 767–770

  • Krämer W, Runde R (1997) Stocks and the weather: an exercise in data mining or yet another capital market anomaly? Empir Econ 22:637–641

    Article  Google Scholar 

  • Kramer AD, Guillory JE, Hancock JT (2014) Experimental evidence of massive-scale emotional contagion through social networks. In: Proceedings of the National Academy of Science

  • Kwak H, Lee C, Park H, Moon S (2010) What is Twitter, a social network or a news media? In: Proceedings of the 19th international conference world wide web

  • Leetaru KH, Wang S, Cao G, Padmanabhan A, Shook E (2013) Mapping the global Twitter heartbeat: the geography of Twitter. First Monday 18(5). http://firstmonday.org/ojs/index.php/fm/article/view/4366/3654. Accessed 22 June 2014

  • Lemmon M, Portniaguina E (2006) Consumer confidence and asset prices: some empirical evidence. Rev Financ Stud 19(4):1499–1529

    Article  Google Scholar 

  • Lerman K, Ghosh R, Surachawala T (2012) Social contagion: an empirical study of information spread on Digg and Twitter follower graphs. Working Paper

  • Leskovec J, McGlohon M, Faloutsos C, Glance N, Hurst M (2007) Cascading behavior in large blog graphs. In: Proceedings of the 7th SIAM international conference data mining (SDM)

  • Levy T, Yagil J (2011) Air pollution and stock returns in the US. J Econ Psychol 32(3):374–383

    Article  Google Scholar 

  • Lewis MP (2009) Ethnologue: languages of the world. SIL International, Dallas

    Google Scholar 

  • Lo AW, Repin DV (2002) The psychophysiology of real-time financial risk processing. J Cogn Neurosci 14(3):323–339

    Article  Google Scholar 

  • Loewenstein GF, Weber EU, Hsee CK, Welch N (2001) Risk as feelings. Psycholl Bull 127(2):267–286

    Article  Google Scholar 

  • McNair DM, Lorr M, Droppleman LF (1971) Profile of mood states. Educational and Industrial Testing Service, San Diego

    Google Scholar 

  • Mitchel RLC, Philipps LH (2007) The psychological, neurochemical and functional neuroanatomical mediators of the effects of positive and negative mood on executive functions. Neuropsychol 45:617–629

    Article  Google Scholar 

  • Nann S, Krauss J, Schoder D (2013) Predictive analytics on public data – the case of stock markets. In: Proceedings of the 21st European conference information system

  • Neumann R, Strack F (2000) “Mood contagion”: the automatic transfer of mood between persons. J Pers Soc Psychol 79(2):211–223

    Article  Google Scholar 

  • Nofsinger JR (2005) Social mood and financial economics. J Behav Financ 6(3):144–160

    Article  Google Scholar 

  • Oh C, Sheng O (2011) Investigating predictive power of stock micro blog sentiment in forecasting future stock price directional movement. In: Proceedings of the 32nd international conference information system

  • Pavlenko A (2008) Emotion and emotion-laden words in the bilingual lexicon. Biling Lang Cogn 11(2):147–164

    Google Scholar 

  • Qiu L, Welch I (2004) Investor sentiment measures. National Bureau of Economic Research

  • Rao T, Srivastava S (2012) Using Twitter sentiments and search volumes index to predict oil, gold, forex and markets indices. Working Paper

  • Ruiz EJ, Hristidis V, Castillo C, Gionis A, Jaimes A (2012) Correlating financial time series with micro-blogging activity. Working Paper

  • Saunders EM (1993) Stock prices and Wall Street weather. Am Econ Rev 83(5):1337–1345

    Google Scholar 

  • Schwarz N (1990) Feelings as information: Informational and motivational functions of affective states. In: Sorrentino RM, Higgins ET (eds) Handbook of motivation and cognition: foundations of social behavior, vol 2. Guilford, New York, pp 527–561

    Google Scholar 

  • Semiocast (2013) Half of messages on Twitter are not in English, Japanese is the second most used language. Press release. http://semiocast.com/downloads/Semiocast_Half_of_messages_on_Twitter_are_not_in_English_20100224.pdf. Accessed 22 June 2014

  • Sharpe W (1966) Mutual fund performance. J Bus 39(1):119–138

    Google Scholar 

  • Shiller RJ (2003) From efficient markets theory to behavioral finance. J Econ Perspect 17(1):83–104

    Article  Google Scholar 

  • Sprenger TO, Tumasjan A, Sandner PG, Welpe IM (2013) Tweets and trades: the information content of stock microblogs. Eur Financ Manag 20(5):926–957

    Article  Google Scholar 

  • Sy T, Cote S, Saavedra R (2005) The contagious leader: impact of the leader’s mood on the mood of group members, group affective tone, and group processes. J Appl Psychol 90:295–305

    Article  Google Scholar 

  • Thaler RH (1987) The January effect. J Econ Perspect 1(1):197–201

    Article  Google Scholar 

  • Tirunillai S, Tellis GJ (2012) Does chatter really matter? Dynamics of user-generated content and stock performance. Mark Sci 31(2):198–215

    Article  Google Scholar 

  • Trombley MA (1997) Stock prices and Wall Street weather: additional evidence. Q J Bus Econ 36(3):11–21

    Google Scholar 

  • Tseng KC (2006) Behavioral finance, bounded rationality, neuro-finance, and traditional finance. Invest Manag Financ Innov 3(4):7–18

    Google Scholar 

  • Tversky A, Kahneman D (1991) Loss aversion in riskless choice: a reference-dependent model. Q J Econ 106(4):1039–1061

    Article  Google Scholar 

  • Van Eck M, Nicolson NA, Berkhof J (1998) Effects of stressful daily events on mood states: relationship to global perceived stress. J Pers Soc Psychol 75(6):1572–1585

    Article  Google Scholar 

  • Vittengl JR, Holt CS (1998) A time-series diary study of mood and social interaction. Motiv Emot 22(3):255–275

    Article  Google Scholar 

  • Wann D, Dolan T, Mcgeorge K, Allison J (1994) Relationships between spectator identification and spectators’ perceptions of influence, spectators’ emotions, and competition outcome. J Sport Exerc Psychol 16(4):347–364

    Article  Google Scholar 

  • Weinberg P, Gottwald W (1982) Impulsive consumer buying as a result of emotions. J Bus Res 10(1):43–57

    Article  Google Scholar 

  • Whaley RE (2000) The investor fear gauge. J Portf Manag 26(3):12–17

    Article  Google Scholar 

  • Wong A, Carducci BJ (1991) Sensation seeking and financial risk taking in everyday money matters. J Bus Psychol 5(4):525–530

    Article  Google Scholar 

  • Worthington A (2009) An empirical note on weather effects in the Australian stock market. Econ Pap J Appl Econ Policy 28(2):148–154

    Article  Google Scholar 

  • Wright WF, Bower GH (1992) Mood effects on subjective probability assessment. Organ Behav Hum Decis Process 52:276–291

    Article  Google Scholar 

  • Ye S, Wu SF (2010) Measuring message propagation and social influence on twitter.com. Soc Inform 6430:216–231

    Article  Google Scholar 

  • Yuen KS, Lee T (2003) Could mood state affect risk-taking decisions? J Affect Disord 75(1):11–18

    Article  Google Scholar 

  • Zhang X, Fuehres H, Gloor P (2010) Predicting stock market indicators through Twitter – “I hope it is not as bad as I fear”. In: Proceedings collaborative innovations networks conference, Savannah, GA

  • Zhu F, Zhang X (2010) Impact of online consumer reviews on sales: the moderating role of product and consumer characteristics. J Mark 74(2):133–148

    Article  Google Scholar 

  • Zuckerman M (1984) Sensation seeking: a comparative approach to a human trait. Behav Brain Sci 7(3):413–471

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Michael Nofer.

Additional information

Accepted after two revisions by Prof. Dr. Schoder.

Electronic supplementary material

Below is the link to the electronic supplementary material.

Supplementary material 1 (PDF 430 kb)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Nofer, M., Hinz, O. Using Twitter to Predict the Stock Market. Bus Inf Syst Eng 57, 229–242 (2015). https://doi.org/10.1007/s12599-015-0390-4

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s12599-015-0390-4

Keywords

Navigation