Part VI · Prediction and synthesis · M13A · week 8 · 14 h
Cointegration, pairs and statistical arbitrage
Unit roots and spurious regression, Engle–Granger and Johansen, Ornstein–Uhlenbeck estimation and optimal bands, Kalman-filter hedge ratios, structural breaks, and Indian pairs and parity trades.
Builds on M04 Systematic researchM07 Forwards and futuresM10 CommoditiesM13 Forecasting
Prerequisites M13 · 13.2 (AR models, stationarity, half-life), M10 · 10.5 and 10.7 (gold import parity; the OU discretisation (10.18), the half-life (10.19) and the first ADF test on the gold/silver ratio), M07 (futures, basis, rolling), M04 (backtesting, multiple testing, HAC errors). Maths: the functional central limit theorem and the continuous mapping theorem (stated and used, not proved), Itô's lemma and the generator of a diffusion, Gaussian conditioning, projections and Cochran's theorem, generalised eigenproblems. Time: ~14 hours (notes 8 h, problems 4 h, code 2 h). Primary texts: J. D. Hamilton, Time Series Analysis (Princeton, 1994), ch. 13 (Kalman filter), 17 (unit roots), 18–19 (cointegration), 20 (Johansen); S. Johansen, Likelihood-Based Inference in Cointegrated Vector Autoregressive Models (Oxford, 1995), ch. 4–6; E. Chan, Algorithmic Trading (Wiley, 2013), ch. 2–3; W. K. Bertram, "Analytic solutions for optimal statistical arbitrage trading", Physica A 389(11), 2010.
Learning outcomes
- Derive the Dickey–Fuller regression from an AR(1) and the augmented form from an AR(), derive the limiting distribution of and of the DF -statistic under a unit root, and explain why the critical values are not Student-.
- Show analytically and by simulation why regressions of one random walk on another produce large -statistics and , and state what this implies for "pairs" chosen by correlation.
- Define cointegration, prove the Granger representation for a cointegrated VAR(1), run the Engle–Granger two-step test with the correct critical values, and derive Johansen's trace and maximum-eigenvalue statistics from the reduced-rank regression.
- Estimate an Ornstein–Uhlenbeck process exactly from its AR(1) form, quantify the bias and imprecision of the estimated speed of mean reversion, and compute half-lives with honest uncertainty.
- Derive the expected first-passage times of an OU process and Bertram's expected cycle length, and compute the entry and exit bands that maximise expected profit per unit time after costs.
- Compare OLS, reverse-OLS and total-least-squares hedge ratios, and derive the Kalman filter for a random-walk hedge ratio, including its likelihood and steady-state gain.
- Derive and apply the Chow test, explain why choosing the break date from the data invalidates it, and use sup-F, CUSUM and Bai–Perron appropriately.
- Test Indian pairs (HDFC Bank/ICICI Bank, Nifty/Bank Nifty, MCX gold against COMEX parity, gold/silver) properly, and price the frictions of an Indian stat-arb book: costs, the SLB market, futures as the short leg, and lot sizes.
Sections ≈ 3 h 5 min of study
- Foundation 4 sections · ≈ 35 min
- Core 9 sections · ≈ 1 h 30 min
- Advanced 4 sections · ≈ 1 h
- Learning outcomes Foundation 5′
- 13A.1 What statistical arbitrage is, and what it is not Foundation 5′
- 13A.2 Unit roots and the Dickey–Fuller test Core 15′
- 13A.3 Spurious regression Core 5′
- Figure Spurious regression between independent random walks
- 13A.4 Cointegration and error correction Core 10′
- 13A.5 The Engle–Granger two-step Core 10′
- 13A.6 Johansen's method: reduced-rank regression Advanced 10′
- 13A.7 The Ornstein–Uhlenbeck spread: estimation, half-life and precision Core 10′
- 13A.8 Trading bands under OU Advanced 20′
- Figure Optimal trading bands for an Ornstein–Uhlenbeck spread
- 13A.9 Hedge ratios: OLS, total least squares and the Kalman filter Advanced 15′
- Figure Kalman-filter hedge ratio versus rolling OLS
- 13A.10 Structural breaks: Chow, sup-F, CUSUM and Bai–Perron Advanced 15′
- 13A.11 Risks and frictions of statistical arbitrage in India Foundation 10′
- 13A.12 Indian applications, tested Core 15′
- Lab Pairs on Indian data: Engle–Granger, half-life and a Kalman hedge ratio
- 13A.13 Case studies Core 10′
- Summary of key results Foundation 15′
- Readings and resources Core 10′
- Facts that change Core 5′