Cointegration: The Engle-Granger Two-Step Method
When can you trust a regression between two non-stationary series? Cointegration, the Engle-Granger two-step method, the critical-value trap in residual-based unit root testing, and why spurious regression still ruins empirical work.
Start with a move that macro papers got away with for decades. Regress U.S. real GNP on money supply over a multi-decade sample. Both series trend upward the whole way. The comes out at 0.95, the -statistic on the slope is 12.4, and you write a paper claiming money supply drives output. Submit that today and it gets rejected on sight — not because the conclusion is unwelcome, but because the regression proves nothing at all.
The relationship is nonsense. Both series are trended, and any two trended series can appear highly correlated in finite samples, even when they are generated by completely independent random walks. Granger & Newbold (1974) proved it: under the null of no relationship, when both series are non-stationary, the -statistic does not follow the -distribution — it diverges to infinity. Nor does converge to zero; it converges to a non-degenerate distribution. This is spurious regression, and it has ruined more empirical work over the decades than any other single econometric mistake.
If you don’t believe it, run it yourself. Generate two independent random walks and regress one on the other:
import numpy as np
import statsmodels.api as sm
rng = np.random.default_rng(42)
T = 200
x = np.cumsum(rng.standard_normal(T))
y = np.cumsum(rng.standard_normal(T))
X = sm.add_constant(x)
res = sm.OLS(y, X).fit()
print(f"R²: {res.rsquared:.3f}")
print(f"Slope t-stat: {res.tvalues[1]:.3f}")
print(f"Slope p-value: {res.pvalues[1]:.4f}")
Vary the seed and rerun. Roughly 30% of the time you will see and -statistics in the double digits — with and completely independent. This is not a typo or a bug. It is a fundamental property of regressions with trended variables. Whenever you see a paper regress one I(1) variable on another without testing for cointegration or differencing first, that paper is probably wrong.
Does that mean regressions in levels are always forbidden? No. Engle & Granger (1987) worked out exactly when the exception holds, and the result is one of the most useful ideas in modern econometrics — and one of the most misapplied. The core insight: if two or more I(1) series share a long-run equilibrium relationship, a specific linear combination of them is I(0), even though each series is non-stationary in levels. Back to the example: if money supply and GNP are both driven by a common long-run trend (the economy grows, both grow with it), then a combination like “log money supply minus log GNP” might be stationary. That stationary combination is the cointegrating relation, and it hands you a stationary error-correction term for a dynamic model. Model it correctly and your inference is valid.
This article covers the Engle-Granger two-step method in detail, including its well-known weaknesses. The textbook treatments are Hamilton (1994, Ch. 19), Tsay (2010, Ch. 7-8), and Campbell, Lo, & MacKinlay (1997, Ch. 6); specific results are cited where they come up.
Cointegration, Formally
A set of time series is cointegrated if both of the following hold:
- Each is I(1): non-stationary in levels and stationary in first differences.
- There exists a non-zero vector such that is I(0), or stationary.
The vector is the cointegrating vector; the combination is the cointegrating relation. Economically it reads as a long-run equilibrium: deviations from it are stationary, so they must eventually return to zero.
A system can contain more than one such combination. If there are multiple cointegrating relations, the system has cointegration rank . For variables the rank can be anywhere from 0 (no cointegration) to ; rank would mean every variable is stationary on its own, contradicting condition 1. Hold on to the rank concept — the deepest limitation of the Engle-Granger method is buried right there, and we will come back to it.
Step 1: Estimate the Cointegrating Vector by OLS
Run a regression of on (or any normalization you prefer):
Note the absence of on the right side: one variable must be normalized (here , as the dependent variable) with its coefficient set to 1. This is just a normalization choice; you could have put a different variable on the left — and that choice will come back to bite later, so keep it in mind. The OLS estimate is the cointegrating vector estimate.
The estimate has an unusual property: it is super-consistent. , much faster than the usual , because the OLS objective function has a non-standard limit under cointegration; Stock (1987) proved it. The intuition: the dependent and independent variables are both diverging, but the cointegrating relation ties them together, so the noise in is dominated by the lower-order terms. Super-consistency is the load-bearing wall of the whole two-step construction — the estimation error from step 1 decays fast enough that step 2 can treat as a stand-in for the true residuals.
Step 2: Test the Residuals for a Unit Root
Compute the OLS residuals and run an ADF test on them:
The null is (a unit root in the residuals, i.e. no cointegration); the alternative is (stationary residuals, i.e. cointegration). Reject no-cointegration if the ADF statistic is more negative than the critical value.
The entire method lives or dies on this step, and this step is also where it gets misused the most. The most common mistake: judging the residuals against standard ADF critical values. You can’t. is not an observed series — it was estimated in step 1, and the estimation error in makes the residuals look more stationary than the true errors are, so the residual-based test needs critical values that are larger in absolute value. Engle & Yoo (1987) tabulated them: with variables, the 5% critical value is approximately , versus for standard ADF. Judge against and you reject too often, declaring cointegration in systems that have none. MacKinnon (1996) later provided more precise critical values via response surface regressions, which is what most software implements; the general pattern is that critical values get more negative as grows, but the effect is modest.
Three more traps, all in the test specification. First, the number of lagged differences must be chosen to whiten the residuals, typically via AIC or Schwert’s rule; too few lags leaves autocorrelation in the residuals and the test is mis-sized. Second, if the variables carry deterministic trends, the cointegrating regression needs a trend term — omit it and the residuals are misspecified, so you are testing the wrong object. Third, do not treat a high from the step-1 regression as evidence of cointegration — the opening demonstration already showed that trended variables produce high with no relationship at all. The only thing that counts is the ADF on the residuals.
Note also that everything above rests on the premise that each variable is I(1). Engle-Granger does not test that premise for you; run unit root tests on each variable first. Let an I(0) variable slip in and the test is invalid.
If you reject the null — correctly — you have evidence that the variables are cointegrated with cointegrating vector approximately , and you can move on to modeling the dynamics.
Code: Engle-Granger in statsmodels
statsmodels packages both steps; coint uses the MacKinnon response-surface critical values directly:
import pandas as pd
import statsmodels.api as sm
from statsmodels.tsa.stattools import adfuller, coint
X = sm.add_constant(y['log_gnp'])
eg_reg = sm.OLS(y['log_money'], X).fit()
print(eg_reg.summary())
residuals = eg_reg.resid
# Engle-Granger critical values from MacKinnon response surface
eg_stat, eg_p, eg_crit = coint(y['log_money'], y['log_gnp'], trend='c', autolag='aic')[:3]
print(f"Engle-Granger test stat: {eg_stat:.3f}, p-value: {eg_p:.3f}")
# Alternative: ADF on residuals with custom critical values
adf_stat, _, _, _, adf_crit, _ = adfuller(residuals, regression='c', autolag='aic')
print(f"ADF on residuals: {adf_stat:.3f}")
print(f"Standard ADF crit values: {adf_crit}")
# Compare to Engle-Granger crit values (e.g., -3.37 for K=3 at 5%)
The manual adfuller route requires you to swap in your own critical values — what it prints are the standard ADF ones, exactly the set the previous section told you not to use. It is included here so you can see how far apart the two sets are.
After Cointegration: The Error Correction Model
With cointegration established, write the dynamics as a VECM:
and so on. The coefficient on the lagged residual is the adjustment speed: how much corrects in period in response to last period’s deviation from equilibrium. For a stable error-correction mechanism, the adjustment coefficient should be negative for the variable that does the correcting (the dependent variable in the cointegrating regression); more generally, the jointly have to push deviations back toward equilibrium rather than away from it. And whenever cointegration holds, the Granger representation theorem guarantees at least one is nonzero — the error-correction form is not a modeling choice but a consequence of cointegration (Engle & Granger, 1987).
Exogeneity: Who Does the Adjusting
Put the first two VECM equations back on the table, this time looking only at the ‘s:
If , then is weakly exogenous for the cointegrating parameters: it does not adjust to deviations from equilibrium at all — the other variables do the restoring. You can then model as a univariate process (an ARIMA, say) without losing any information about .
Why does weak exogeneity matter? Note that it is not required for consistency — OLS estimation of the cointegrating regression is super-consistent even with endogenous regressors (Stock, 1987). What it buys you is efficiency: if , you can estimate the VECM in a smaller system that excludes the dynamic equation for , with smaller standard errors. Testing is straightforward: test via a -test or Wald test in the VECM, and if you cannot reject, treat as weakly exogenous.
There is a stronger notion, strong exogeneity: and, in addition, all the coefficients on lagged in the equation for are zero. Under strong exogeneity the entire system splits into a series of independent equations with no cross-equation correlation. It is rarely satisfied in practice; it is enough to know it exists.
Where the Method Is Fragile
Engle-Granger is conceptually clean and computationally trivial — one OLS and one ADF, runnable in any software. But the cheapness has costs, and every one of them is documented in the literature.
The most fundamental limitation sits in the cointegration rank. The method tests for a single cointegrating relation — and recall that a system of variables can have rank up to . When multiple cointegrating vectors actually exist, the test loses power, and that “which variable goes on the left” normalization choice from step 1 stops being harmless. With a unique cointegrating relation, different normalizations yield vectors that differ only by a scalar multiple, and inference is unchanged. With multiple vectors, different normalizations land on different directions in the cointegrating space — the vectors are no longer proportional, and the result genuinely depends on which variable you put on the left. In the bivariate case, reordering just gives you a proportional vector; with more variables, that guarantee is gone. Handling multiple vectors requires the Johansen method, covered in the next article.
Small samples are a practical problem too. Super-consistency is an asymptotic property; Banerjee, Dolado, Hendry, & Smith (1986) showed the bias in can be substantial for , and it propagates into the VECM, dragging the adjustment-speed estimates into inconsistency with it. Thirty years of monthly data is only 360 observations; daily data clears the bar easily but brings problems of its own. Know your sample size.
On power, Phillips & Ouliaris (1990) document that the test has low power against cointegration with weak long-run coefficients: when the relationship is real but loosely binding, the test frequently fails to see it. And the integration-order premise from earlier carries an extra bill here: the method assumes every variable is I(1), the asymptotics break down if some are I(2) or I(0), and the pre-testing that guards against this has its own error rates — another layer of noise on the whole procedure.
Finally, endogeneity. The right-hand-side variables of the cointegrating regression are endogenous in the VECM. This is fine for the long-run coefficients — super-consistency saves you — but the standard errors in the dynamic equations must account for it, and plain OLS standard errors there are inconsistent.
A Finance Example: The Term Structure
Here is a case where the cointegration hypothesis carries real economic content: the short rate (say, the 3-month Treasury) and the long rate (say, the 10-year Treasury yield). Both are persistent; both are driven by monetary policy and inflation expectations. If they are cointegrated, the spread (or some scaled version of it) is stationary. That makes economic sense: the spread is the term premium, which should mean-revert over time as monetary policy and inflation expectations adjust.
The procedure runs exactly as above: regress on , ; compute the residuals ; run the ADF on with critical values from MacKinnon (1996). If the residuals are stationary, and are cointegrated, and the cointegrating vector describes the long-run relationship between short and long rates.
Run this yourself on a long monthly sample of U.S. Treasury yields and the typical result is that the Engle-Granger test rejects no-cointegration at 5%, with an estimated below one — the long rate moves less than one-for-one with the short rate. The residuals are highly persistent — high autocorrelation — but stationary. The exact numbers shift with the sample period; don’t memorize them as constants. In plain terms: short and long rates share a long-run equilibrium, the spread wanders away from it, and the wandering comes back.
The trading implication is direct. When the spread is far from its equilibrium value (large ), expect reversion: go long the spread when it is too low, short when it is too high, with as the hedge ratio. But be clear about what the trade is betting on. The cointegrating relationship can break down entirely at regime changes — say, when the Fed changes its policy framework — and the Engle-Granger test, being purely in-sample, cannot catch that kind of rupture. Monitor the trade; don’t trust the test blindly.
Other Cointegrating Relations in Finance
Wherever theory posits an equilibrium relationship, a cointegration test has work to do — and the theory usually predicts what the cointegrating vector should look like. International finance supplies three classics. Purchasing Power Parity (PPP) says the real exchange rate is stationary, which is equivalent to the nominal exchange rate, the domestic price level, and the foreign price level being cointegrated; the test is to regress the log nominal exchange rate on log domestic and log foreign prices, then run the ADF on the residuals. Uncovered Interest Parity (UIP) says the expected change in the exchange rate equals the interest rate differential, implying the log exchange rate and the differential are cointegrated — but the empirical evidence is weak, and UIP violations are persistent. The Fisher effect says the nominal interest rate equals the real rate plus expected inflation, implying nominal rates and inflation are cointegrated.
In monetary economics, log money, log prices, and log income are cointegrated, and the cointegrating vector is the money demand function — a relationship that has been stable for many decades. On the rates side there is the term structure, just covered. In asset pricing, under a stable dividend discount model, log stock prices and log dividends are cointegrated — the testable form of present value models. And the most practical entry for traders: two cointegrated assets form the basis of a pairs trading strategy — the same logic as the term-structure trade above, deviation faded with as the hedge ratio, transplanted onto any cointegrated pair.
What makes this list valuable is that each theory predicts a specific cointegrating vector, so the empirical tests become verdicts on the theories: PPP, money demand, and the term structure are confirmed; UIP and the simple Fisher effect are rejected.
When Engle-Granger Is Enough
After the fragility list you might conclude the method is unusable. It isn’t. With two variables () and a single cointegrating relation, there is no rank problem and the normalization is harmless — using it is entirely reasonable. For exploratory analysis where you just want a quick read on whether cointegration is present, it is the cheapest answer available. And in theory-driven models where the cointegrating vector has a natural interpretation — the money demand equation constant, for instance — its estimate is directly readable.
Beyond that range, switch tools: more than two variables, multiple potential cointegrating vectors, or formal inference on the cointegrating parameters call for the Johansen method. That is the next article.
References
- Banerjee, A., Dolado, J. J., Hendry, D. F., & Smith, G. W. (1986). Exploring equilibrium relationships in econometrics through static models: Some Monte Carlo evidence. Oxford Bulletin of Economics and Statistics, 48(3), 253-277.
- Campbell, J. Y., Lo, A. W., & MacKinlay, A. C. (1997). The Econometrics of Financial Markets. Princeton University Press. Ch. 6.
- Engle, R. F., & Granger, C. W. J. (1987). Co-integration and error correction: Representation, estimation, and testing. Econometrica, 55(2), 251-276.
- Engle, R. F., & Yoo, B. S. (1987). Forecasting and testing in co-integrated systems. Journal of Econometrics, 35(1), 143-159.
- Granger, C. W. J., & Newbold, P. (1974). Spurious regressions in econometrics. Journal of Econometrics, 2(2), 111-120.
- Hamilton, J. D. (1994). Time Series Analysis. Princeton University Press. Ch. 19.
- MacKinnon, J. G. (1996). Numerical distribution functions for unit root and cointegration tests. Journal of Applied Econometrics, 11(6), 601-618.
- Phillips, P. C. B., & Ouliaris, S. (1990). Asymptotic properties of residual based tests for cointegration. Econometrica, 58(1), 165-193.
- Stock, J. H. (1987). Asymptotic properties of least squares estimators of cointegrating vectors. Econometrica, 55(5), 1035-1056.
- Tsay, R. S. (2010). Analysis of Financial Time Series (3rd ed.). Wiley. Ch. 7-8.