Problem
Short-horizon financial forecasting is noisy and non-stationary. Raw predictive accuracy is often modest, so the real question is whether a model produces stable, risk-adjusted performance under a time-aware evaluation scheme.
What We Built
- Cleans and standardizes daily OHLCV data
- Engineers time-series features (trend, momentum, volatility, volume, technical signals)
- Predicts 5-day forward returns using only past information (no leakage)
- Evaluates models with walk-forward (time-aware) validation
- Reports risk-adjusted financial metrics alongside forecasting quality
Models Compared
- LightGBM — fast, highly responsive gradient boosting; strong short-term reactivity but more sensitive to noise.
- XGBoost — more conservative tree growth with regularization; smoother and more stable out-of-sample behavior.
Data
- Source: Kaggle “World Stock Prices” (daily OHLCV)
- Time range: ~2000 → 2025 (multi-year horizon)
- Modeling subset: 10 liquid large-cap equities (diverse sectors)
- Target: 5-day forward return (returns rather than prices)
Features
- Lagged returns + rolling statistics
- Volatility + range measures
- Volume/participation signals
- Technical indicators (RSI, MACD-style)
Applied a simple feature selection step (remove near-zero correlation features) to keep the set compact and reduce noise/overfit.
Results
- XGBoost is smoother and more stable; LightGBM is more reactive.
- Walk-forward validation keeps evaluation time-aware and leakage-free.
- Risk-aware metrics translate signal quality into real trading behavior.
Data & Feature Engineering
Model Behavior — NVDA
Model Behavior — AAPL
Takeaway: Both models learn non-random structure; XGBoost is more stable, while LightGBM is more responsive (with higher drawdown risk).
Strategy Comparison
Risk-Averse Execution
Higher trade threshold, smaller sizing, tighter drawdown controls.
Risk-Tolerant Execution
Lower threshold, larger exposure, accepts higher volatility for returns.
Validation + Evaluation
Validation uses a walk-forward / time-aware split (train strictly on earlier time, test on later time) with early stopping to reduce overfit.
Forecast quality: MAE / RMSE, cross-validated R², stability across folds
Trading behavior: Sharpe, max drawdown, volatility, hit rate
Key Results
- Both models showed predictive structure, but XGBoost was more stable.
- LightGBM: ~12.2% annualized return, Sharpe ~1.36, max drawdown ~25.9%, win rate ~54.5%.
- XGBoost: ~14.4% annualized return, Sharpe ~1.61, max drawdown ~4.3%, win rate ~54.8%.
- Practical takeaway: model choice changes behavior (stability vs responsiveness), not just accuracy.
Why It Matters
This project demonstrates time-series ML done the real way: feature engineering without leakage, time-aware validation, and evaluation through risk-adjusted performance rather than a single error number.