IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2112.03868.html
   My bibliography  Save this paper

EmTract: Extracting Emotions from Social Media

Author

Listed:
  • Domonkos F. Vamossy
  • Rolf Skog

Abstract

We develop an open-source tool (EmTract) that extracts emotions from social media text tailed for financial context. To do so, we annotate ten thousand short messages from a financial social media platform (StockTwits) and combine it with open-source emotion data. We then use a pre-tuned NLP model, DistilBERT, augment its embedding space by including 4,861 tokens (emojis and emoticons), and then fit it first on the open-source emotion data, then transfer it to our annotated financial social media data. Our model outperforms competing open-source state-of-the-art emotion classifiers, such as Emotion English DistilRoBERTa-base on both human and chatGPT annotated data. Compared to dictionary based methods, our methodology has three main advantages for research in finance. First, our model is tailored to financial social media text; second, it incorporates key aspects of social media data, such as non-standard phrases, emojis, and emoticons; and third, it operates by sequentially learning a latent representation that includes features such as word order, word usage, and local context. Using EmTract, we explore the relationship between investor emotions expressed on social media and asset prices. We show that firm-specific investor emotions are predictive of daily price movements. Our findings show that emotions and market dynamics are closely related, and we provide a tool to help study the role emotions play in financial markets.

Suggested Citation

  • Domonkos F. Vamossy & Rolf Skog, 2021. "EmTract: Extracting Emotions from Social Media," Papers 2112.03868, arXiv.org, revised Jun 2023.
  • Handle: RePEc:arx:papers:2112.03868
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2112.03868
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Narasimhan Jegadeesh & Woojin Kim, 2010. "Do Analysts Herd? An Analysis of Recommendations and Market Reactions," The Review of Financial Studies, Society for Financial Studies, vol. 23(2), pages 901-937, February.
    2. Peter Gabrovšek & Darko Aleksovski & Igor Mozetič & Miha Grčar, 2017. "Twitter sentiment around the Earnings Announcement events," PLOS ONE, Public Library of Science, vol. 12(2), pages 1-21, February.
    3. Shaun Hargreaves Heap & Daniel John Zizzo, 2011. "Emotions and chat in a financial markets experiment," Working Paper series, University of East Anglia, Centre for Behavioural and Experimental Social Science (CBESS) 11-11, School of Economics, University of East Anglia, Norwich, UK..
    4. Larry G. Epstein & Martin Schneider, 2008. "Ambiguity, Information Quality, and Asset Pricing," Journal of Finance, American Finance Association, vol. 63(1), pages 197-228, February.
    5. Berg, Joyce & Forsythe, Robert & Nelson, Forrest & Rietz, Thomas, 2008. "Results from a Dozen Years of Election Futures Markets Research," Handbook of Experimental Economics Results, in: Charles R. Plott & Vernon L. Smith (ed.), Handbook of Experimental Economics Results, edition 1, volume 1, chapter 80, pages 742-751, Elsevier.
    6. Loughran, Tim & Ritter, Jay R, 1995. "The New Issues Puzzle," Journal of Finance, American Finance Association, vol. 50(1), pages 23-51, March.
    7. Douglas Stevens & Arlington Williams, 2004. "Inefficiency in Earnings Forecasts: Experimental Evidence of Reactions to Positive vs. Negative Information," Experimental Economics, Springer;Economic Science Association, vol. 7(1), pages 75-92, February.
    8. Stefania Albanesi & Domonkos F. Vamossy, 2019. "Predicting Consumer Default: A Deep Learning Approach," Working Papers 2019-056, Human Capital and Economic Opportunity Working Group.
    9. Sanjiv R. Das & Mike Y. Chen, 2007. "Yahoo! for Amazon: Sentiment Extraction from Small Talk on the Web," Management Science, INFORMS, vol. 53(9), pages 1375-1388, September.
    10. Symeonidis, Lazaros & Daskalakis, George & Markellos, Raphael N., 2010. "Does the weather affect stock market volatility?," Finance Research Letters, Elsevier, vol. 7(4), pages 214-223, December.
    11. Katrina Ellis & Roni Michaely & Maureen O'Hara, 2000. "When the Underwriter Is the Market Maker: An Examination of Trading in the IPO Aftermarket," Journal of Finance, American Finance Association, vol. 55(3), pages 1039-1074, June.
    12. Sendhil Mullainathan & Jann Spiess, 2017. "Machine Learning: An Applied Econometric Approach," Journal of Economic Perspectives, American Economic Association, vol. 31(2), pages 87-106, Spring.
    13. Barber, Brad M. & Odean, Terrance, 2013. "The Behavior of Individual Investors," Handbook of the Economics of Finance, in: G.M. Constantinides & M. Harris & R. M. Stulz (ed.), Handbook of the Economics of Finance, volume 2, chapter 0, pages 1533-1570, Elsevier.
    14. Lucas, Robert E, Jr, 1978. "Asset Prices in an Exchange Economy," Econometrica, Econometric Society, vol. 46(6), pages 1429-1445, November.
    15. David Hirshleifer & Tyler Shumway, 2003. "Good Day Sunshine: Stock Returns and the Weather," Journal of Finance, American Finance Association, vol. 58(3), pages 1009-1032, June.
    16. Jacobsen, Ben & Marquering, Wessel, 2008. "Is it the weather?," Journal of Banking & Finance, Elsevier, vol. 32(4), pages 526-540, April.
    17. Mitchell A. Petersen, 2009. "Estimating Standard Errors in Finance Panel Data Sets: Comparing Approaches," The Review of Financial Studies, Society for Financial Studies, vol. 22(1), pages 435-480, January.
    18. Welch, Ivo, 2000. "Herding among security analysts," Journal of Financial Economics, Elsevier, vol. 58(3), pages 369-396, December.
    19. Adriana Breaban & Charles N Noussair, 2018. "Emotional State and Market Behavior [Bubbling with excitement: en experiment]," Review of Finance, European Finance Association, vol. 22(1), pages 279-309.
    20. Paul C. Tetlock, 2007. "Giving Content to Investor Sentiment: The Role of Media in the Stock Market," Journal of Finance, American Finance Association, vol. 62(3), pages 1139-1168, June.
    21. repec:bla:jfinan:v:59:y:2004:i:3:p:1259-1294 is not listed on IDEAS
    22. Russell Jame & Rick Johnston & Stanimir Markov & Michael C. Wolfe, 2016. "The Value of Crowdsourced Earnings Forecasts," Journal of Accounting Research, Wiley Blackwell, vol. 54(4), pages 1077-1110, September.
    23. Lian Fen Lee & Amy P. Hutton & Susan Shu, 2015. "The Role of Social Media in the Capital Market: Evidence from Consumer Product Recalls," Journal of Accounting Research, Wiley Blackwell, vol. 53(2), pages 367-404, May.
    24. Susan Athey & Guido W. Imbens, 2019. "Machine Learning Methods That Economists Should Know About," Annual Review of Economics, Annual Reviews, vol. 11(1), pages 685-725, August.
    25. Malcolm Baker & Jeffrey Wurgler, 2007. "Investor Sentiment in the Stock Market," Journal of Economic Perspectives, American Economic Association, vol. 21(2), pages 129-152, Spring.
    26. Eduardo B. Andrade & Terrance Odean & Shengle Lin, 2016. "Bubbling with Excitement: An Experiment," Review of Finance, European Finance Association, vol. 20(2), pages 447-466.
    27. Athey, Susan & Imbens, Guido W., 2019. "Machine Learning Methods Economists Should Know About," Research Papers 3776, Stanford University, Graduate School of Business.
    28. Carhart, Mark M, 1997. "On Persistence in Mutual Fund Performance," Journal of Finance, American Finance Association, vol. 52(1), pages 57-82, March.
    29. De Long, J Bradford & Andrei Shleifer & Lawrence H. Summers & Robert J. Waldmann, 1990. "Noise Trader Risk in Financial Markets," Journal of Political Economy, University of Chicago Press, vol. 98(4), pages 703-738, August.
    30. Hirschey, Mark & Richardson, Vernon J & Scholz, Susan, 2000. "Stock-Price Effects of Internet Buy-Sell Recommendations: The Motley Fool Case," The Financial Review, Eastern Finance Association, vol. 35(2), pages 147-174, May.
    31. Robert J. Shiller, 2003. "From Efficient Markets Theory to Behavioral Finance," Journal of Economic Perspectives, American Economic Association, vol. 17(1), pages 83-104, Winter.
    32. Michael S. Drake & Darren T. Roulstone & Jacob R. Thornock, 2012. "Investor Information Demand: Evidence from Google Searches Around Earnings Announcements," Journal of Accounting Research, Wiley Blackwell, vol. 50(4), pages 1001-1040, September.
    33. Mark J. Kamstra & Lisa A. Kramer & Maurice D. Levi, 2003. "Winter Blues: A SAD Stock Market Cycle," American Economic Review, American Economic Association, vol. 93(1), pages 324-343, March.
    34. J. Anthony Cookson & Marina Niessner, 2020. "Why Don't We Agree? Evidence from a Social Network of Investors," Journal of Finance, American Finance Association, vol. 75(1), pages 173-228, February.
    35. Tim Loughran & Bill Mcdonald, 2011. "When Is a Liability Not a Liability? Textual Analysis, Dictionaries, and 10‐Ks," Journal of Finance, American Finance Association, vol. 66(1), pages 35-65, February.
    36. Hailiang Chen & Prabuddha De & Yu (Jeffrey) Hu & Byoung-Hyoun Hwang, 2014. "Wisdom of Crowds: The Value of Stock Opinions Transmitted Through Social Media," The Review of Financial Studies, Society for Financial Studies, vol. 27(5), pages 1367-1403.
    37. Jegadeesh, Narasimhan & Titman, Sheridan, 1993. "Returns to Buying Winners and Selling Losers: Implications for Stock Market Efficiency," Journal of Finance, American Finance Association, vol. 48(1), pages 65-91, March.
    38. Darren Duxbury & Tommy Gärling & Amelie Gamble & Vian Klass, 2020. "How emotions influence behavior in financial markets: a conceptual analysis and emotion-based account of buy-sell preferences," The European Journal of Finance, Taylor & Francis Journals, vol. 26(14), pages 1417-1438, September.
    39. Tim Loughran & Jay Ritter, 2004. "Why Has IPO Underpricing Changed Over Time?," Financial Management, Financial Management Association, vol. 33(3), Fall.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Domonkos F. Vamossy, 2024. "Social Media Emotions and Market Behavior," Papers 2404.03792, arXiv.org.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Domonkos F. Vamossy, 2024. "Social Media Emotions and Market Behavior," Papers 2404.03792, arXiv.org.
    2. Vamossy, Domonkos F., 2021. "Investor emotions and earnings announcements," Journal of Behavioral and Experimental Finance, Elsevier, vol. 30(C).
    3. Domonkos F. Vamossy, 2020. "Investor Emotions and Earnings Announcements," Papers 2006.13934, arXiv.org, revised Jun 2020.
    4. Domonkos F. Vamossy, 2023. "Social Media Emotions and IPO Returns," Papers 2306.12602, arXiv.org, revised Apr 2024.
    5. Ahmad, Khurshid & Han, JingGuang & Hutson, Elaine & Kearney, Colm & Liu, Sha, 2016. "Media-expressed negative tone and firm-level stock returns," Journal of Corporate Finance, Elsevier, vol. 37(C), pages 152-172.
    6. Eierle, Brigitte & Klamer, Sebastian & Muck, Matthias, 2022. "Does it really pay off for investors to consider information from social media?," International Review of Financial Analysis, Elsevier, vol. 81(C).
    7. Daniele Ballinari & Simon Behrendt, 2021. "How to gauge investor behavior? A comparison of online investor sentiment measures," Digital Finance, Springer, vol. 3(2), pages 169-204, June.
    8. Obaid, Khaled & Pukthuanthong, Kuntara, 2022. "A picture is worth a thousand words: Measuring investor sentiment by combining machine learning and photos from news," Journal of Financial Economics, Elsevier, vol. 144(1), pages 273-297.
    9. Keunbae Ahn, 2021. "Predictable Fluctuations in the Cross-Section and Time-Series of Asset Prices," PhD Thesis, Finance Discipline Group, UTS Business School, University of Technology, Sydney, number 1-2021, January-A.
    10. Fang, Hao & Chung, Chien-Ping & Lu, Yang-Cheng & Lee, Yen-Hsien & Wang, Wen-Hao, 2021. "The impacts of investors' sentiments on stock returns using fintech approaches," International Review of Financial Analysis, Elsevier, vol. 77(C).
    11. John Garcia, 2024. "Herding the crowds: how sentiment affects crowdsourced earnings estimates," Financial Markets and Portfolio Management, Springer;Swiss Society for Financial Market Research, vol. 38(3), pages 331-370, September.
    12. John Garcia, 2021. "Analyst herding and firm-level investor sentiment," Financial Markets and Portfolio Management, Springer;Swiss Society for Financial Market Research, vol. 35(4), pages 461-494, December.
    13. Sun, Licheng & Najand, Mohammad & Shen, Jiancheng, 2016. "Stock return predictability and investor sentiment: A high-frequency perspective," Journal of Banking & Finance, Elsevier, vol. 73(C), pages 147-164.
    14. Kostopoulos, Dimitrios & Meyer, Steffen, 2018. "Disentangling investor sentiment: Mood and household attitudes towards the economy," Journal of Economic Behavior & Organization, Elsevier, vol. 155(C), pages 28-78.
    15. Blankespoor, Elizabeth & deHaan, Ed & Marinovic, Iván, 2020. "Disclosure processing costs, investors’ information choice, and equity market outcomes: A review," Journal of Accounting and Economics, Elsevier, vol. 70(2).
    16. Aysan, Ahmet Faruk & Caporin, Massimiliano & Cepni, Oguzhan, 2024. "Not all words are equal: Sentiment and jumps in the cryptocurrency market," Journal of International Financial Markets, Institutions and Money, Elsevier, vol. 91(C).
    17. Renault, Thomas, 2017. "Intraday online investor sentiment and return patterns in the U.S. stock market," Journal of Banking & Finance, Elsevier, vol. 84(C), pages 25-40.
    18. Edmans, Alex & Fernandez-Perez, Adrian & Garel, Alexandre & Indriawan, Ivan, 2022. "Music sentiment and stock returns around the world," Journal of Financial Economics, Elsevier, vol. 145(2), pages 234-254.
    19. Mahmoudi, Nader & Docherty, Paul & Melia, Adrian, 2022. "Firm-level investor sentiment and corporate announcement returns," Journal of Banking & Finance, Elsevier, vol. 144(C).
    20. Santi, Caterina, 2023. "Investor climate sentiment and financial markets," International Review of Financial Analysis, Elsevier, vol. 86(C).

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2112.03868. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.