StockEmotions: Discover Investor Emotions for Financial Sentiment Analysis and Multivariate Time Series

Jean Lee, Hoyoul Luis Youn, Josiah Poon, Soyeon Caren Han · DOI · OpenReview

TL;DR

Researchers have introduced StockEmotions, a new dataset of 10,000 StockTwits comments labeled with 12 fine-grained emotions (like anxiety, belief, and panic) rather than just simple "bullish" or "bearish" sentiment. By integrating these emotional signals into a Temporal Attention LSTM model, they significantly improved the accuracy of S&P 500 price forecasting compared to models using price data alone.

What Problem Does This Paper Address?

While Natural Language Processing (NLP) is widely used in finance, most existing resources are limited to binary sentiment analysis—classifying a post as either "positive" or "negative." However, behavioral finance suggests that investor psychology is far more complex. A "bullish" post driven by excitement might signal a different market move than one driven by cautious optimism.

The authors identify a major gap: a lack of high-quality, fine-grained emotion datasets specifically for the financial domain. Existing general-purpose emotion datasets (like GoEmotions) don't translate well to the unique jargon and high-stakes environment of the stock market. Furthermore, there is a lack of research on how these specific emotional states—the "roller coaster" of investing—can be used as features for multivariate time series forecasting.

Methods

The researchers developed a multi-step approach to bridge the gap between raw social media text and market prediction:

  1. Human-in-the-Loop Annotation: To label 10,000 comments, they used a pipeline where financial experts annotated a "seed" dataset. This was used to fine-tune a BERT model for automatic labeling, which was then manually reviewed and revised by humans to ensure high quality.
  2. Emotion Taxonomy: They designed a 12-class taxonomy (ambiguous, amusement, anger, anxiety, belief, confusion, depression, disgust, excitement, optimism, panic, surprise) inspired by behavioral finance studies.
  3. Classification Baselines: They tested several models, including GRU, Bi-GRU, BERT, and RoBERTa, to see which could best identify these emotions.
  4. Temporal Attention LSTM: For the forecasting task, they implemented a model that learns from three distinct modalities:
  5. Numerical: Historical S&P 500 price/index data.
  6. Textual: Semantic information extracted via BERT embeddings.
  7. Emotional: Psychological signals represented by GloVe embeddings of the emotion labels.

Datasets

The primary contribution is the StockEmotions dataset:

  • Source: 10,000 English comments from StockTwits collected between January and December 2020 (a period of extreme market volatility).
  • Coverage: Comments covering over 80% of the S&P 500 by market cap.
  • Features: Includes 2 sentiment classes (annotated by users), 12 fine-grained emotion classes, emojis, and corresponding time-series price data.

Key Insights and Ideas

  • Beyond Binary Sentiment: The study confirms that "bullish" and "bearish" are too reductive. For instance, "optimism" and "excitement" are highly correlated, but "anger" and "belief" are negatively correlated. Understanding these nuances helps capture the "mood" of the market more accurately.
  • The Power of Emojis: Emojis are not just fluff; they are critical emotional markers in financial social media. The authors found that converting emojis to their textual meaning (e.g., 🚀 to "rocket") was essential for the model to detect emotions like excitement.
  • The "Teasing" Phenomenon: The researchers noted that "teasing" or sarcasm is rampant on StockTwits, especially during market losses. This often results in labels like ambiguous or disgust, presenting a unique challenge for standard NLP models.
  • Synergy of Modalities: The most significant "aha moment" was that while text features alone help prediction, adding the specific emotion layer provides a further performance boost, suggesting that emotion labels capture a specific type of variance that raw text embeddings might miss.

Key Results

  • Classification: DistilBERT emerged as the top performer for the classification task, achieving an F1-score of 0.81 for binary sentiment and 0.42 for the complex 12-class emotion task (outperforming larger models like RoBERTa).
  • Forecasting: In predicting the S&P 500 index, the model using only price data had a Mean Squared Error (MSE) of 1.15 (with a window size of 5). Adding text and emotion features reduced the MSE to 0.83—a substantial improvement in prediction accuracy.

Limitations and Future Work

  • Financial Jargon: The models still struggle with domain-specific slang (e.g., "ATH" for All-Time High, "BTD" for Buy The Deep), which can lead to misclassification.
  • Dataset Bias: The data is skewed toward "meme stocks" and speculative assets, and the 2020 timeframe is heavily influenced by the unique market conditions of the COVID-19 pandemic.
  • Sarcasm: Detecting sarcasm and toxic language remains a hurdle, as investors often use "positive" words to mock others during a downturn.
  • Future Directions: The authors suggest expanding the dataset to cover a longer time period (e.g., 10 years) and exploring more complex multimodal architectures.

Summary updated

BibTeX
@misc{lee2023stockemotions,
  author = {Jean Lee and Hoyoul Luis Youn and Josiah Poon and Soyeon Caren Han},
  title = {{StockEmotions: Discover Investor Emotions for Financial Sentiment Analysis and Multivariate Time Series}},
  year = {2023},
  eprint = {2301.09279},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2301.09279},
}
Figure