This project builds and evaluates a machine learning model to predict post-earnings stock price jumps and implements a trading strategy based on the model's predictions. It outperforms traditional buy-and-hold approaches in backtests.
- Predict whether a stock will significantly jump or drop after earnings
- Backtest a threshold-based and confidence-weighted trading strategy
- Compare against a buy-and-hold benchmark
The model is trained as a binary classifier to predict jump_label:
1→ stock makes a significant positive move (e.g., > +3%)0→ stock does not make a significant move or drops
The output is a probability, which is translated into trading actions:
- Buy if probability > 0.63
- Sell (short) if probability < 0.37
- Hold cash otherwise
Final model uses the following features:
eps_surprise_pct: Earnings surprise percentagepositive_count: Count of positive headlinesnegative_count: Count of negative headlinespos_total_ratio: Ratio of positive headlinessentiment_label_encoded: Encoded polarity label of sentiment (POS/NEG/NEUT)pos_neg_ratio: Ratio of positive to negative headlines
- Model: LightGBM Classifier
- Optimized with Optuna for AUC
- Class-weighted, depth-limited (max_depth=4)
- Threshold Strategy: 0.63 / 0.37 split for confident trades
| Strategy | Cumulative Return |
|---|---|
| Threshold-Based Model | 5.5x |
| Confidence-Weighted | 2.3x |
| Buy & Hold Benchmark | 3.5x |
The model outperforms both passive investing and probabilistic scaling.
- Python
- LightGBM
- Optuna
- Pandas, NumPy, Matplotlib
- FinBERT Sentiment Scoring
├── subset_trn.py # Full training and evaluation script
├── feature_subset_backtest_results.csv # Dataset with features and labels
├── best_model_final_subset.pkl # Trained LightGBM model
├── strategy_comparison_final_features.png # Strategy performance plot
├── README.md # This file
- Simpler feature sets often outperform over-engineered ones
- Calibration and threshold tuning matter more than raw AUC
- Feature selection has a large impact on trading performance
- Extend model to other sectors (e.g., defense, banks)
- Incorporate macro indicators (VIX, SP500 trend)
- Add Sharpe ratio, drawdown, and capital allocation simulation
Aniket Mandal — PhD in Theoretical Chemistry, specializing in ML + scientific modeling
For questions or collaboration inquiries, please contact or connect via LinkedIn.
