Cointegration basics
Tell a reverting series from a trending one · 9 min
- Series A
- Series B
- Series C
One trends, one reverts, one is a random walk. Can you tell by eye?
Two random walks are built to share most of their daily moves: their return correlation is 0.9. Will the spread between them revert to a mean?
A series reverts if it is pulled back toward a level. The simplest test regresses each day's change on the previous day's level: a clearly negative slope means a pull back.
A second check is the variance ratio: the variance of 10-day returns divided by 10 times the variance of 1-day returns. About 1 for a random walk, below 1 when moves reverse, above 1 when they continue. Two series are cointegrated when some mix of them (a spread) reverts even though each wanders: that is what makes a pair tradable.
Tests on a few years of data are noisy, and at the 5% level one random walk in twenty passes by chance. Testing a hundred candidate pairs and trading the five that pass is a recipe for trading noise (Track C, multiple testing).
- Series 1
- Series 2
- Series 3
| Series | Variance ratio (10 days) | Dickey–Fuller t | Half-life | Your call |
|---|---|---|---|---|
| Series 1 | 1.22 | -1.16 | 284 d | |
| Series 2 | 1.02 | -3.03 | 33 d | |
| Series 3 | 0.44 | -4.46 | 14 d |
Variance ratio below 1: moves tend to reverse. Above 1: they tend to continue. A Dickey–Fuller t below −2.86 rejects a random walk at the 5% level. Three years of data is not much, so the tests can disagree.
Correlated is not cointegrated: two random walks built to share most of their daily moves have a return correlation of 0.73, yet the spread between them has a Dickey–Fuller t of -0.25: it wanders off and never has to come back.
Generated markets, not real data. They show how a rule depends on the market it meets; they do not predict how real markets behave.
Half-life from a regression slope
- Regression slope b
- −0.08 per day
- Share of the gap kept each day
- 1 − 0.08 = 0.92
- Half-life
- ln 2 ÷ −ln 0.92 = 0.693 ÷ 0.0834 = 8.3 days
- After 2 half-lives
- a quarter of the gap is left
Two stocks have daily returns correlated 0.85, but their spread has a Dickey–Fuller t of −1.1. What do you conclude?
A series has a 10-day variance ratio of 0.62 and a Dickey–Fuller t of −3.4. What is it most likely?
A spread closes 25% of its gap to the mean each day (b = −0.25). What is its half-life?
Missed questions come back for review after one day, then three, then a week.
A spread closes 10% of its distance to the mean each day (regression slope b = -0.1). What is the half-life of a deviation, in days?
Hint: Each day keeps (1 + b) of the deviation. Half-life = ln 2 ÷ −ln(1 + b).
Three years of a fresh generated market are on screen; the next two years do not exist yet. Tune the rule on what you can see, commit to two predictions, then generate the future.
- Your rule so far
Over the next two years, after costs, this rule will…
What kind of market is this?
Generated markets, not real data. They show how a rule depends on the market it meets; they do not predict how real markets behave.