~/work / ff5-factor-model
S&P 500 Factor Model
A Fama-French five-factor model with LightGBM on the S&P 500, validated walk-forward. Built out of curiosity, not a brief.
- Year
- 2025
- Built with
- Python, LightGBM, Streamlit
- Kind
- finance
What it was
A self-initiated question: can factor models actually predict equity returns, or does the literature only work in-sample.
What I built
End-to-end pipeline — S&P 500 ingestion, FF5 regression, LightGBM return prediction, walk-forward out-of-sample validation, Streamlit dashboard.
What it shows
A timing alignment bug had R squared at 0.004. Finding it took it to 0.52. The finding is the work; most people would have shipped the 0.004 and called it a result.
What you can check
- R squared 0.004 to 0.52 after look-ahead bias correction