Skip to content
LeetQuant
QR09 Alpha Research and Signal Modelling

QR09 · Alpha Research and Signal Modelling · Lesson 1 of 5

Statistical Arbitrage Concepts

Pairs trading, cointegration and mean reversion half-lives.

30 min

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:

st=ln⁡PtA−βln⁡PtB,s_t = \ln P^A_t - \beta \ln P^B_t ,

with the hedge ratio β\beta estimated by regression. A common rule enters when the z-score (st−μ)/σ(s_t - \mu)/\sigma passes ±2\pm 2 and exits near 00.

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:

dst=κ(μ−st) dt+σ dWt.ds_t = \kappa(\mu - s_t)\,dt + \sigma\,dW_t .

κ\kappa is the speed of mean reversion. The key numbers are

half-life=ln⁡2κ,stationary std. dev.=σ2κ.\text{half-life} = \frac{\ln 2}{\kappa}, \qquad \text{stationary std. dev.} = \frac{\sigma}{\sqrt{2\kappa}} .

Sampled at interval Δt\Delta t, an OU process is an AR(1) with ϕ=e−κΔt\phi = e^{-\kappa\Delta t}. So you can estimate κ\kappa by regressing sts_t on st−1s_{t-1} and setting κ=−ln⁡ϕ^/Δt\kappa = -\ln\hat\phi / \Delta t.

Worked example

from AR(1) to half-life

Regressing a daily spread on its previous value gives ϕ^=0.95\hat\phi = 0.95. What are κ\kappa and the half-life? Is a strategy that holds positions for about 3 days well matched to this spread?

Show solution

κ=−ln⁡0.95≈0.0513\kappa = -\ln 0.95 \approx 0.0513 per day, so the half-life is 0.693/0.0513≈13.50.693 / 0.0513 \approx 13.5 days.

A 3-day holding period captures only a small part of the expected reversion (1−0.953≈14%1 - 0.95^3 \approx 14\% 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 κ=0.05\kappa = 0.05 per day and σ=0.02\sigma = 0.02 per day\sqrt{\text{day}}. What is its stationary standard deviation?

Practice problems

Finished reading?

Answer the 3 knowledge checks to complete this lesson (0 done).