The idea of pairs trading
Two stocks driven by the same economics, such as two oil majors, tend to move together. When the gap between them is unusually wide, bet that it will close: buy the cheap one and sell the rich one. The position is roughly market-neutral, so its profit comes from the relative move rather than from the market.
The traded quantity is the spread, usually in logs:
with the hedge ratio estimated by regression. A common rule enters when the z-score passes and exits near .
Correlation is not cointegration
Correlation describes how returns move together over short horizons. Cointegration says that a combination of price levels is stationary, so the gap is pulled back over time. Pairs trading needs cointegration.
- Two random walks with highly correlated increments can still drift arbitrarily far apart. They are correlated but not cointegrated.
- Two series can be cointegrated while their daily returns have only modest correlation.
The Engle–Granger test regresses one price on the other and tests the residual for a unit root. For more than two assets, the Johansen test finds all cointegrating combinations.
Modelling mean reversion
The continuous-time model for a mean-reverting spread is the Ornstein–Uhlenbeck process:
is the speed of mean reversion. The key numbers are
Sampled at interval , an OU process is an AR(1) with . So you can estimate by regressing on and setting .
Worked example
from AR(1) to half-life
Regressing a daily spread on its previous value gives . What are and the half-life? Is a strategy that holds positions for about 3 days well matched to this spread?
Show solutionHide solution
per day, so the half-life is days.
A 3-day holding period captures only a small part of the expected reversion ( of the gap), so trading costs would eat much of the edge. Holding periods should be comparable to the half-life.
What goes wrong
- Structural breaks. A merger, a change in regulation or a new business line can end the relationship for good. A spread that "always comes back" is a short option position on that not happening.
- Estimation error. The hedge ratio and the mean are estimated from the past and drift over time. Use rolling or Kalman-filter estimates and test out of sample.
- Costs and borrowing. Short positions need borrowing; spreads, fees and market impact add up when signals are frequent.
- Crowding. When many funds hold the same trades, forced selling by one can widen every spread at once, as in the August 2007 "quant quake".
Knowledge check
Two stocks' daily returns have correlation 0.9. Which conclusion is justified?
Knowledge check
An OU spread has κ = 0.1 per day. What is its half-life?
Knowledge check
An OU spread has per day and per . What is its stationary standard deviation?
Practice problems
Finished reading?
Answer the 3 knowledge checks to complete this lesson (0 done).