Cointegration
Cointegration is a statistical relationship between two or more non-stationary time series in which a linear combination of those series is stationary (mean-reverting), implying a long-run equilibrium relationship that persists even as individual series exhibit random walk behavior.
Key takeaways
- Two or more I(1) (integrated of order 1, i.e., non-stationary) series are cointegrated if there exists a linear combination that is I(0) (stationary).
- The Engle-Granger two-step method and the Johansen trace/max-eigenvalue test are the standard statistical procedures for testing for cointegration.
- Cointegration provides the theoretical foundation for pairs trading and statistical arbitrage: if two assets are cointegrated, short-term price divergences will revert to the long-run equilibrium.
- The error correction model (ECM) captures both the short-run dynamics and the long-run equilibrium adjustment between cointegrated series.
- Cointegration is distinct from correlation: two series can be highly correlated but not cointegrated (no long-run equilibrium), or weakly correlated but cointegrated (strong long-run structural relationship).
Explanation
Cointegration, introduced by Engle and Granger (1987), represents a fundamental advance in time series econometrics and quantitative finance. Standard statistical tools (regression, correlation analysis) assume stationary data — series with constant means and variances. Financial price series typically are non-stationary (I(1)): they exhibit random walk behavior with no tendency to revert to a mean. Regressing one non-stationary series on another produces 'spurious regression' — high R² and t-statistics that are statistical artifacts of the trending data rather than genuine economic relationships.
Cointegration identifies genuine long-run economic relationships between non-stationary series. If two stock prices P1_t and P2_t are both I(1) but some linear combination β₀ + β₁P1_t − P2_t = ε_t is stationary (has constant mean and variance), they are cointegrated with cointegrating vector (1, −β₁). The stationary residual ε_t is the 'spread' between the two prices, adjusted for their long-run relationship. When this spread deviates from its mean, it is expected to revert — the statistical equivalent of pairs trading.
The Engle-Granger two-step procedure provides a straightforward cointegration test: (1) Regress P2_t on P1_t to estimate the cointegrating vector β₁; (2) Test the residuals from this regression for stationarity using an augmented Dickey-Fuller (ADF) test. If the ADF test rejects the unit root hypothesis for the residuals (at 5% significance), the series are cointegrated. The Johansen procedure (1991) extends this to multiple series, testing for the number of cointegrating relationships (the 'rank' of the cointegration space) using trace and maximum eigenvalue test statistics.
The error correction model (ECM) formalizes the short-run adjustment dynamics: ΔP2_t = α(ε_{t-1}) + γΔP1_t + δ_t, where α is the error correction coefficient (speed of adjustment — how quickly the spread reverts to equilibrium after a shock), γ captures short-run dynamic correlation, and ε_{t-1} is the lagged residual from the cointegrating regression. A negative α means that when the spread is above its mean (ε_{t-1} > 0), P2 tends to fall in the next period, driving reversion. The magnitude of α determines the half-life of deviations from the equilibrium spread.
Practical pairs trading implementation requires: (1) identifying cointegrated pairs through statistical testing on historical data; (2) estimating the cointegrating hedge ratio (β₁) using OLS or Kalman filter (for dynamic estimation); (3) computing the normalized spread z-score; (4) entering trades when the z-score exceeds a threshold (typically ±2 standard deviations) and exiting when it reverts to zero. The strategy fails when cointegration breaks down — two companies in the same industry may have been cointegrated until a structural change (merger, bankruptcy, regulatory change) severs the relationship, causing spread divergence rather than reversion.
Formula
Cointegration: β₀ + β₁X_t − Y_t = ε_t where ε_t is I(0); ECM: ΔY_t = α(ε_{t−1}) + γΔX_t + δ_t
Example
A quantitative fund identifies that oil major Exxon (XOM) and Chevron (CVX) stock prices are cointegrated using daily data from 2015-2023 (Johansen trace statistic = 18.7, exceeding the 5% critical value of 15.5). The cointegrating vector implies: XOM − 0.85 × CVX = spread. The spread has a mean of $12 and standard deviation of $4. When XOM rises sharply relative to CVX, pushing the spread to $22 (z-score = 2.5), the fund enters a pairs trade: short $1 million of XOM and long $850,000 of CVX (maintaining the hedge ratio). Over the next three weeks, the spread reverts to $13, generating a profit of approximately $85,000 on the $1.85 million gross exposure. The strategy assumes the cointegrating relationship — driven by common oil price exposure, refining margins, and macro factors — persists through the trade horizon.
Related terms
Correlation Cross Sectional Momentum Hedge Ratio Pairs Trading Quantitative Analysis Random Walk Sentiment Analysis Speed Standard Deviation Stock Time Series Analysis Time Series Momentum