Placeholder — to be completed Day 3 (strategy build).
Day 2 deliverable: an honest research layer answering one question — is the SPY/QQQ spread a tradeable mean-reverting relationship? The pipeline (data loader → cointegration tests → hedge ratio → spread → half-life → z-score → stability scorecard) lives here; the verdict and full findings are in RESEARCH_REPORT.md, and the runnable story is in notebooks/01_spread_research.ipynb.
stat_arb/
├── requirements.txt
├── data/loader.py # load_pair() — yfinance adj-close, aligned, cached
├── research/
│ ├── cointegration.py # Engle-Granger, Johansen, hedge ratio, spread, z-score
│ ├── halflife.py # Ornstein-Uhlenbeck half-life (point + rolling)
│ └── visualization.py # 6 diagnostic plots -> research/plots/
├── notebooks/01_spread_research.ipynb
└── RESEARCH_REPORT.md # the honest verdict
pip install -r requirements.txt
jupyter nbconvert --to notebook --execute notebooks/01_spread_research.ipynb
# or import the modules directly (see RESEARCH_REPORT.md)Defined at the end of RESEARCH_REPORT.md once Day-2 findings are known — strategy build is conditional on the Day-2 verdict.