Skip to content

Repository files navigation

paper: Listening to Chaotic Whispers: A Deep Learning Framework for News-oriented Stock Trend Prediction

Pipeline Overview

  1. Data Collection

Reddit Data: r/wallstreetbets submissions and comments from Academic Torrents Price and Return Data: Via WRDS.

  1. Data Preprocessing

Ticker Extraction: Match posts to stocks using regex-based ticker detection Temporal Alignment: Create 20-day lookback windows before each earnings announcement date Daily Aggregation: Combine all posts about a stock per day into daily text sequences

  1. Feature Engineering

Text Vectorization: FinBERT embeddings for each day's aggregated text Sequence Construction: 20-day sequences for each stock in each day Labels: binary classification - top 25% of volatility considered extreme volatility (positive class) and normal volatility (negative class)

  1. Model Architecture

BERT Embeddings: Domain-specific financial language model (FinBERT) Sequential Modeling: Bi-directional GRU processes Temporal Attention: Learns which days matter most for prediction Prediction Head: Dense layers output earnings surprise probability

  1. Evaluation: Use F1 score and Recall as major evaluation metrics. Used Logistic regression (F1 0.38) and CNN (F1 0.62) as benchmarks.

The workflow illustration

Results

Average Loss: 0.6782
Overall Accuracy: 60.5697%
Risk Precision: 0.5842
Risk Recall: 0.7331
Risk F1-Score: 0.6503

Detailed Classification Report:

          precision    recall  f1-score
          
Safe (0)     0.6419    0.4783    0.5481
Risk (1)     0.5842    0.7331    0.6503
accuracy                         0.6057 

About

Built end-to-end data pipeline: processed 10M+ alternative (text) data from API and used pre-trained NER models for stock recognition and pre-trained BERT for text embedding. Used hybrid attention network in learning and predicting stock future volatility, gaining improved recall.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages