This project builds a machine learning-based system to predict short-term stock returns and construct a portfolio using a 6-stock Indian equity universe.
- Stocks: RELIANCE, HDFCBANK, INFY, M&M, BHARTIARTL, HUL
- Period: Jan 2020 – Dec 2025
- Sources: Yahoo Finance, RBI, MOSPI, MoneyControl
- Final dataset: ~7,400 rows
- 58 engineered features across technical, momentum, macro, volume, and fundamentals
- Reduced to top 35 using Mutual Information
- Macro variables (Crude, CPI, VIX, Yield) were most important
- LightGBM Regressor
- XGBoost Regressor
- LightGBM Classifier
- Final prediction: average of LightGBM and XGBoost
- Walk-forward (expanding window) cross-validation
- Mean accuracy ~49% (expected for daily returns)
- Allocate weights proportional to predicted positive returns
- Max weight per stock: 40%
- Negative signals assigned zero weight
Test Period (Sep 2024 – Sep 2025):
- Return: 4.68%
- Sharpe: -0.008
- Sortino: 0.644
- Max Drawdown: -12.31%
Forward Test (Oct 2025 – Dec 2025):
- Return: 6.62%
- Sharpe: 2.47
- Max Drawdown: -2.35%
Python, LightGBM, XGBoost, scikit-learn, pandas, numpy, matplotlib
- Macro features dominate short-term return prediction
- Daily prediction accuracy remains near 50%
- Signal-based allocation improves risk-adjusted performance