Two walks that stay together
Two price series and that are each integrated of order one can still share a long-run link: if some combination is stationary, the series are cointegrated. Each wanders, but they wander together, and the gap keeps returning to its mean. This is the statistical basis of pairs trading: when the spread is unusually wide, you short the expensive leg and buy the cheap one, expecting it to close. Cointegration is about price levels over the long run. It differs from correlation, which measures whether daily returns move together and says nothing about whether the levels stay close.
The Engle-Granger test has two steps. First regress on by least squares to estimate and the hedge ratio . Then run an ADF test on the residuals . Because the residuals come from a fitted regression, the ordinary ADF critical values are too lenient and the Engle-Granger values apply: about at 5% for two series with a constant. If the unit root is rejected, the pair is cointegrated and the spread is mean-reverting with half-life , where is the spread's AR(1) coefficient. The error-correction view says that when yesterday's spread was positive, falls or rises today. To trade, standardise the spread into a z-score, enter when exceeds about 2, exit near 0, and size the legs by . The risks are real: the relationship can break, drifts, costs eat small spreads, and testing thousands of pairs will find many that pass by chance, so choose pairs for an economic reason and confirm out of sample.
- Cointegrated: each series wanders, but a linear combination of them is stationary.
- Engle-Granger: regress, then test the residuals with ADF using the stricter Engle-Granger critical values.
- Pairs trade: trade the z-score of the spread, size legs by , and expect the spread to close over about one half-life.
Lab · what's graded
- The spread15 pts
- The z-score10 pts
- The half-life of the spread15 pts
- Sizing the legs10 pts
- Reading the test15 pts
- Match the vocabulary15 pts
- Building a pairs trade10 pts
- Correlation is not cointegration10 pts