Python study of a classic statistical arbitrage setup:
- Pull daily closes (
yfinance) - Estimate OLS hedge ratio (V ~ MA)
- Build the spread, test ADF stationarity
- Estimate mean-reversion half-life
- Plot spread vs mean for visual inspection
Shows I can move from market data → econometrics → a tradable residual, with honest stationarity checks (not just a pretty chart).
pip install yfinance pandas numpy statsmodels matplotlib
python Z_score.pyResearch / education only. Not production trading code.