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

—

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

Jean Lee
Hoyoul Luis Youn
Josiah Poon
Soyeon Caren Han
Published on 1/23/2023
Equities
Stocks
Sentiment
Sentiment trading
Machine learning
Deep learning
AI
Alternative data

The paper presents StockEmotions, a novel dataset for financial sentiment and emotion analysis, comprising 10,000 English comments from StockTwits collected during 2020. The dataset includes 12 fine-grained emotion classes (e.g., optimism, anxiety, disgust) derived from behavioral finance theory, along with user-annotated bullish/bearish sentiment, emojis, and time series data. A multi-step annotation pipeline combines a pre-trained language model (BERT) with three financial experts, achieving high inter-annotator agreement (Cohen's κ=0.79). The dataset addresses limitations of existing resources by providing granular emotion labels and temporal alignment with stock market data.

Experimental downstream tasks demonstrate the dataset's utility. For sentiment and emotion classification, DistilBERT outperforms other baselines (GRU, BERT, RoBERTa) with average F1-scores of 0.81 and 0.42, respectively. For multivariate time series forecasting of the S&P 500 index, a Temporal Attention LSTM model jointly learns from price index, text (BERT embeddings), and emotion features (GloVe embeddings). The best performance (MSE=0.83×10⁻³) is achieved when all three modalities are combined with a rolling window size of 5, outperforming models using only numeric data or text+price. This highlights the importance of investor emotions in stock market prediction.

The paper also provides data analysis including emotion correlations (e.g., optimism-excitement positively correlated, anger-belief negatively correlated) and emoji distributions. The dataset and code are publicly available, offering a valuable resource for research in financial NLP and behavioral finance.

Highlights

  • 1Introduces StockEmotions, a new dataset of 10k English comments from StockTwits with 12 fine-grained emotion classes inspired by behavioral finance.
  • 2Proposes a multi-step annotation pipeline combining pre-trained language models and human experts, achieving high inter-annotator agreement (Cohen's κ=0.79).
  • 3Demonstrates that combining price index, text, and emotion features in a Temporal Attention LSTM improves S&P 500 forecasting (MSE=0.83×10⁻³) over using only numeric data.
  • 4Provides granular features including investor sentiment, fine-grained emotions, emojis, and time series data, addressing limitations of existing financial sentiment datasets.

Methods

  • M
    Multi-step annotation pipeline with human-in-the-loop validation using BERT fine-tuning and expert revision.
  • M
    Temporal Attention LSTM model integrating BERT sentence embeddings, GloVe emotion embeddings, and price index data for multivariate time series forecasting.
  • M
    Baseline classifiers: Logistic Regression, NBSVM, GRU, Bi-GRU, DistilBERT, BERT, and RoBERTa for sentiment and emotion classification.

Results

  • R
    DistilBERT achieves best F1-scores: 0.81 for binary sentiment classification and 0.42 for 12-class emotion classification.
  • R
    Temporal Attention LSTM with price index, text, and emotion features achieves lowest MSE (0.83×10⁻³) on S&P 500 prediction with window size 5.
  • R
    Adding text features improves forecasting over using only price index; adding emotion features further reduces MSE.
  • R
    Emotion correlation analysis reveals strong positive pairs (optimism-excitement, ambiguous-disgust) and negative pairs (anger-belief).
0/5

Analyze Paper

Generate insights from "StockEmotions: Discover Investor Emotions for Financial Sent...".

Suggested Actions