Skip to content
On this page
  1. Key Takeaways
  2. What It Is
  3. The Intuition
  4. How It Works
  5. Worked Example
  6. Common Mistakes
  7. Frequently Asked Questions
  8. Sources
  9. Disclaimer
← All concepts
Quant MethodsAdvanced5 min read

Cointegration Engle Granger Johansen: Pairs Trading Foundation

Cointegration is the property that two or more non-stationary time series can share a long-run equilibrium even though each one wanders individually. A linear combination of them is stationary, which means deviations from that equilibrium revert rather than drift.

Key Takeaways

  • Two series are cointegrated when each has a unit root but their linear combination is stationary, giving a tradable mean-reverting spread.
  • The Engle-Granger two-step procedure requires cointegration-specific ADF critical values, not standard textbook critical values.
  • High correlation between two assets does not imply cointegration; the two concepts describe different statistical relationships.
  • Pairs traders use the cointegrating vector as the hedge ratio and trade the spread when it deviates beyond a z-score threshold.

Key Takeaways

  • Two series are cointegrated when each has a unit root but their linear combination is stationary, giving a tradable mean-reverting spread.
  • The Engle-Granger two-step procedure requires cointegration-specific ADF critical values, not standard textbook critical values.
  • High correlation between two assets does not imply cointegration; the two concepts describe different statistical relationships.
  • Pairs traders use the cointegrating vector as the hedge ratio and trade the spread when it deviates beyond a z-score threshold.

What It Is

The concept was formalized by Robert Engle and Clive Granger in 1987 in a paper titled "Co-integration and Error Correction: Representation, Estimation, and Testing," published in Econometrica. They shared the 2003 Nobel Memorial Prize in Economic Sciences partly for this work.

Two series X_t and Y_t are cointegrated of order (1,1) if each is integrated of order 1, meaning a unit root makes them non-stationary, but there exists a constant beta such that Y_t - beta * X_t is stationary. The vector (1, -beta) is called the cointegrating vector, and beta is the hedge ratio.

Soren Johansen (1988, 1991) extended the framework to multivariate systems using vector autoregressions, giving rise to the widely used Johansen test.

The Intuition

Most asset prices are non-stationary. Regressing one on another typically produces a high R-squared even when the two are economically unrelated; this is the classic spurious regression problem (Granger and Newbold 1974).

Cointegration is the exception. If a linear combination of two non-stationary series is itself stationary, the two are tied together by some economic force: an arbitrage relationship, a common risk factor, a regulated spread. Short-run deviations exist, but they revert. That reversion is what pair traders, statistical arbitrage desks, and macro-hedgers try to monetize.

How It Works

Engle-Granger two-step procedure

Step 1. Test each series for a unit root using the Augmented Dickey-Fuller (ADF) test. Both should be I(1).

Step 2. Run the static regression Y_t = alpha + beta * X_t + u_t. Test the residuals u_t for stationarity with ADF using cointegration-specific critical values. If you reject the unit root, conclude the pair is cointegrated, and beta is the hedge ratio.

The Granger representation theorem guarantees that if X and Y are cointegrated, they admit an error-correction model (ECM):

dY_t = gamma_Y * (Y_(t-1) - beta * X_(t-1)) + lagged terms + eps_Y_t
dX_t = gamma_X * (Y_(t-1) - beta * X_(t-1)) + lagged terms + eps_X_t

The coefficients gamma_Y and gamma_X describe how each series corrects deviations from equilibrium.

Johansen procedure

For n variables, there can be up to n - 1 cointegrating vectors. Johansen formulates a vector error-correction model (VECM) and uses the rank of the long-run impact matrix Pi to count them. Two statistics are standard:

  • Trace test: tests the null of at most r cointegrating vectors.
  • Maximum eigenvalue test: tests the null of exactly r versus r + 1.

Johansen is preferred for three or more series, while Engle-Granger remains the intuitive two-variable workhorse.

Worked Example

Consider WTI and Brent crude oil futures, two grades of crude that are economically linked through shipping arbitrage. Daily log prices over several years both look like random walks; ADF fails to reject a unit root on either.

Regress log Brent on log WTI. Suppose you estimate beta = 0.97 and get residuals that look mean-reverting visually. Run ADF on the residuals and obtain a test statistic that rejects the unit-root null at 5 percent using the cointegration critical values.

You conclude Brent and WTI are cointegrated with hedge ratio 0.97. The residual series (spread) is the trade. When the residual falls 2 standard deviations below zero, long Brent and short 0.97 units of WTI; when it rises 2 standard deviations above zero, do the reverse. The half-life of mean reversion, estimated from an AR(1) on the residual, tells you roughly how long a position must be held.

Common Mistakes

  1. Confusing correlation with cointegration. Correlation measures short-run co-movement of returns. Cointegration measures long-run co-movement of levels. Two assets can be highly correlated in returns yet not cointegrated, and vice versa.

  2. Using standard OLS t-statistics on the cointegrating regression. The distribution of the OLS estimator in a cointegrating regression is non-standard. Use the cointegration-specific ADF critical values (Engle-Granger, MacKinnon) rather than the textbook ADF values.

  3. Assuming a fixed hedge ratio. The cointegrating relationship can drift over time, especially across regimes. Rolling or Kalman-filter-based hedge ratios often outperform a single fixed beta on real pair trades, at the cost of more parameters.

  4. Ignoring structural breaks. A regulatory change, a crisis, or a merger can break a previously cointegrated relationship. Tests that allow for structural breaks (Gregory-Hansen) help detect this before a trade blows up.

  5. Overfitting with too many series. Johansen on dozens of series produces unstable rank estimates. Keep the variable set small, economically motivated, and stable.

Frequently Asked Questions

Q: What is cointegration in simple terms? Two non-stationary price series are cointegrated when their prices can each wander freely but a specific linear combination of them stays bounded, meaning they share an economic tie that pulls them back together after short-run divergences.

Q: How does cointegration affect investment decisions? It provides the statistical foundation for pairs trading: if two assets are cointegrated, trading the spread when it deviates beyond a z-score threshold and closing when it reverts has a formal mean-reverting anchor rather than being purely discretionary.

Q: What is a real-world example of cointegration? WTI and Brent crude oil prices each look like random walks individually, but the spread between them is cointegrated because shipping arbitrage enforces a long-run pricing link, giving pairs traders a stationary mean-reverting signal.

Q: How can investors use cointegration? Investors run the Engle-Granger two-step procedure to estimate the hedge ratio, then monitor the spread's z-score and enter long-short positions when it exceeds two standard deviations, with the half-life of reversion guiding position sizing and holding period.

Q: How is cointegration different from correlation? Correlation measures how closely two return series move together in the short run. Cointegration measures whether two price level series share a long-run equilibrium. Two assets can be highly correlated in daily returns yet not cointegrated, and two assets with modest return correlation can still be cointegrated.

Sources

  1. Engle, R.F., Granger, C.W.J. (1987). "Co-integration and Error Correction: Representation, Estimation, and Testing." Econometrica 55(2), 251-276. https://users.ssc.wisc.edu/~behansen/718/EngleGranger1987.pdf
  2. Zivot, E. "Cointegration." Lecture notes, University of Washington. https://faculty.washington.edu/ezivot/econ584/notes/cointegration.pdf
  3. Boero, G. "Cointegration: the Engle and Granger Approach." Warwick University lecture notes. https://warwick.ac.uk/fac/soc/economics/staff/gboero/personal/hand2_cointeg.pdf

Disclaimer

This article is educational content only and is not financial advice. Nothing here is a recommendation to buy, sell, or hold any security. Consult a licensed advisor before making investment decisions.

Back to your knowledge path

The IWP Substack

You understand the concept. Now see it applied.

The Investing With Purpose Substack turns ideas like this into research and risk-managed trade plans on real stocks, updated every week.

Read on Substack (opens in a new tab)

Related concepts