Cointegration statistical arbitrage, honestly evaluated
A cointegration stat-arb research lab where the out-of-sample number is the headline, reported beside a Deflated Sharpe Ratio and the Probability of Backtest Overfitting, not buried.
00Overview
A cointegration-based pairs-trading research lab. The interesting number is never the in-sample Sharpe; what matters is what survives walk-forward and a deflation correction. This project is built so the out-of-sample result is the headline, reported next to the statistics that tell you whether to believe it.
Validation band
01Methodology
- Engle-Granger primary test for cointegration, with a Johansen rank confirm and a KPSS residual check: three views before a pair is admitted.
- Benjamini-Hochberg FDR controlacross all candidate pairs, so multiple testing doesn't manufacture spurious cointegration.
- Ornstein-Uhlenbeck spread model with an AR(1) half-life estimate to size entries and time exits.
- Next-bar execution with explicit commission, slippage, and short-borrow ledgers: no fills at impossible prices.
02The money chart: IS vs OOS Sharpe
In-sample Sharpe flatters; out-of-sample is what you could have traded; the deflated figure corrects for how many pairs were searched. The gap between the first bar and the last is the whole story.
03Live chart: equity curve & drawdown
04Honest limitations
Shown, not hidden, because a quant reviewer will look for exactly these:
- Survivorship bias: the universe is constructed from instruments that exist today; delisted names that would have broken cointegration are absent.
- Transaction-cost gaps: short-borrow rates are modelled with a flat ledger; in reality they spike precisely when a spread is most crowded.
- Regime decay: the strategy's edge visibly erodes through 2020 and 2022 as correlations broke down; the equity curve shows the flat stretches rather than smoothing them away.