Cointegration, Unit Root Tests & Error Correction Models
Many financial variables — stock prices, exchange rates, interest rates — wander unpredictably over time. Regressing one wandering series on another can produce results that look statistically significant but are completely meaningless. Cointegration solves this problem by identifying pairs of non-stationary series that share a genuine long-run equilibrium relationship. This guide covers unit root testing, spurious regression, the Engle-Granger cointegration test, and error correction models — the essential toolkit for analyzing long-run dynamics in financial time series. For foundational concepts on time series regression, including trends and stationarity, see our companion article.
What Is a Unit Root?
A unit root describes a time series whose shocks are permanent rather than temporary. The concept starts with the first-order autoregressive model, AR(1):
Where:
- yt — observed value of the series at time t
- α — intercept (drift term)
- ρ — autoregressive coefficient measuring shock persistence
- yt−1 — lagged value of the series (one period prior)
- et — white noise error term at time t
A unit root exists when ρ = 1. In this case, every shock permanently shifts the level of the series — there is no tendency to revert to a long-run mean. The most common unit root process is the random walk, though more generally any process with ρ = 1 exhibits permanent shock persistence.
When α = 0 and ρ = 1, the series follows a random walk without drift — each value equals the previous value plus a random shock. When α ≠ 0, the series follows a random walk with drift, where the expected value grows (or declines) linearly over time:
Where:
- yt — observed value of the series at time t
- α — drift term representing the expected per-period change in the series
- yt−1 — value of the series one period prior
- et — white noise error term (random shock) at time t
Econometricians classify series by their order of integration. An I(0) series is stationary — shocks fade and the series reverts to its mean. An I(1) series has one unit root and must be differenced once to become stationary. Stock price levels are the classic I(1) example: daily log prices wander as a random walk, but daily log returns (first differences) are approximately I(0).
The Dickey-Fuller and ADF Test
The Dickey-Fuller (DF) test is the standard method for detecting unit roots. It rearranges the AR(1) model by subtracting yt−1 from both sides and defining θ = ρ − 1:
Where:
- Δyt — first difference of the series (yt − yt−1)
- α — intercept term
- θ — test coefficient, defined as ρ − 1; equals zero under the unit root null hypothesis
- yt−1 — lagged level of the series
- et — white noise error term
The Dickey-Fuller test statistic does not follow the standard t-distribution. The DF distribution is left-skewed, with critical values more negative than the usual −1.65 one-sided threshold. The table below shows critical values for the no-trend specification. When a linear time trend is included in the test equation (appropriate for series with a visible upward or downward drift), the critical values become even more negative. Using standard t-critical values would cause massive over-rejection of the unit root null.
| Significance Level | 1% | 5% | 10% |
|---|---|---|---|
| DF Critical Value (no trend) | −3.43 | −2.86 | −2.57 |
| Standard t Critical Value | −2.33 | −1.65 | −1.28 |
In practice, the basic DF test often suffers from serial correlation in the errors. The Augmented Dickey-Fuller (ADF) test addresses this by including lagged changes as additional regressors:
Where:
- Δyt — first difference of the series (yt − yt−1)
- α — intercept term
- θ — test coefficient (ρ − 1); equals zero under the unit root null hypothesis
- yt−1 — lagged level of the series
- γ1, …, γp — coefficients on lagged first differences, included to absorb serial correlation
- Δyt−1, …, Δyt−p — lagged first differences of the series (p lags)
- p — number of augmenting lags, chosen by information criteria (AIC or BIC)
- et — white noise error term
The number of lagged difference terms (p) in the ADF test matters. Too few lags leave serial correlation in the errors; too many waste degrees of freedom. Use information criteria like the AIC or BIC to select the optimal lag length.
Spurious Regression
When two independent I(1) series are regressed against each other, the results are dangerously misleading. Granger and Newbold (1974) identified the spurious regression problem: standard OLS regression between unrelated non-stationary series produces statistically significant t-statistics and high R-squared values — even though no real relationship exists. Subsequent simulation studies confirmed the severity: with two independent I(1) series and n = 50, the standard 5% t-test falsely rejects the null of no relationship approximately 66% of the time.
Suppose a researcher regresses the S&P 500 index level on the price of Brent crude oil using monthly data from 1990 to 2024. Both series are I(1) in levels. OLS yields R² = 0.72 and a t-statistic of 8.4 on the oil price coefficient — seemingly strong evidence of a relationship.
But this result does not establish a structural relationship. The high R² and significant t-statistic arise because both series trend upward as non-stationary processes, not because oil prices drive stock prices. The regression residual is itself nonstationary, violating the assumptions that make OLS inference valid.
The root cause is that the regression error ut inherits the non-stationarity of the I(1) variables. Because ut is itself nonstationary, the Gauss-Markov assumptions fail and all standard inference (t-tests, F-tests, R-squared) becomes unreliable. The solution is either to first-difference the data or to test whether the series are cointegrated — meaning their linear combination is genuinely stationary.
What Is Cointegration?
Cointegration describes a remarkable statistical property: two series that individually wander without bound (each is I(1)), yet their linear combination is stationary (I(0)). This means the series share a long-run equilibrium — they may drift apart temporarily, but economic forces always pull them back together.
Two I(1) processes yt and xt are cointegrated if there exists a parameter β such that yt − βxt is I(0). The parameter β is the cointegrating coefficient, and the stationary linear combination represents the long-run equilibrium relationship.
Before testing for cointegration, you must first confirm that both series are I(1). Apply the ADF test to each variable individually. If both fail to reject the unit root null, proceed to test whether their linear combination is stationary. If either series is already I(0), cointegration does not apply — use standard regression instead.
The standard procedure for testing cointegration is the Engle-Granger two-step method:
Step 1: Estimate the cointegrating regression by OLS on levels:
Where:
- yt — dependent I(1) variable at time t
- β0 — intercept of the cointegrating regression
- β1 — cointegrating coefficient (long-run multiplier relating x to y)
- xt — independent I(1) variable at time t
- ut — regression residual; if I(0), the series are cointegrated
Step 2: Apply a Dickey-Fuller or ADF test to the residuals ût. If the test rejects the unit root null, the residuals are I(0) and the series are cointegrated. Note that the critical values for this test are larger in magnitude than the standard DF values because OLS residuals are constructed to minimize the sum of squares, biasing them toward appearing stationary. The table below shows the no-time-trend critical values (when a trend is included, even more negative values are required):
| Significance Level | 1% | 5% | 10% |
|---|---|---|---|
| Engle-Granger Critical Values | −3.90 | −3.34 | −3.04 |
| Standard DF Critical Values | −3.43 | −2.86 | −2.57 |
The 6-month Treasury bill rate (r6) and the 3-month rate (r3) are each I(1) — interest rate levels have unit roots. However, the term spread (r6 − r3) is stationary, reverting to its long-run mean. An ADF test on the Engle-Granger residuals yields a test statistic of −4.12, which rejects the null at the 1% level.
This cointegration reflects the expectations hypothesis of the term structure: while individual rates wander, the spread between them is anchored by arbitrage forces and expectations about future short-term rates.
Cointegration also appears in exchange rate analysis: purchasing power parity (PPP) implies that nominal exchange rates and relative price levels are cointegrated, with the real exchange rate as the stationary linear combination.
Error Correction Models
When two series are cointegrated, an error correction model (ECM) is the appropriate specification. The ECM captures both short-run dynamics (how changes in x affect changes in y) and long-run equilibrium adjustment (how the system corrects deviations from the cointegrating relationship):
Where:
- Δyt — first difference of the dependent variable (change in y from t−1 to t)
- γ0 — intercept term
- γ1 — short-run effect of a change in x on the change in y
- Δxt — first difference of the independent variable
- δ — speed-of-adjustment parameter; must be negative for equilibrium correction
- yt−1 − βxt−1 — error correction term (lagged deviation from the long-run equilibrium)
- β — cointegrating coefficient from the first-step levels regression
- ut — white noise error term
The parameter δ measures how quickly the system corrects deviations from the long-run equilibrium. A δ of −0.84 means 84% of any deviation is corrected within one period. When yt−1 is above its equilibrium value relative to xt−1, the negative δ pulls Δyt downward, closing the gap. A positive δ would imply divergence from equilibrium — a sign that the model is misspecified or the series are not truly cointegrated.
The ECM is estimated using the Engle-Granger two-step procedure: first estimate the cointegrating parameter β via OLS on levels (Step 1 above), then substitute the estimated residuals into the ECM. A key property is that sampling variation in the first-step estimate of β has asymptotically no effect on the efficiency of the ECM estimates.
Based on Wooldridge’s Example 18.7 (simplified notation), using quarterly data on 6-month and 3-month Treasury bill holding yields (n = 122), the estimated ECM is:
Δhyt6,3 = 0.009 + 0.012Δhyt3 − 0.84(hyt−16,3 − hyt−13)
The speed-of-adjustment coefficient δ = −0.84 indicates that when the 6-month holding yield exceeds its equilibrium spread above the 3-month yield, 84% of the gap closes in the next quarter. This rapid correction reflects active arbitrage in the Treasury market.
Forecasting I(1) and Cointegrated Series
Autoregressive models provide the foundation for time series forecasting. For a stationary AR(1) process, the one-step-ahead forecast is simply:
Where:
- ŷt+1 — forecasted value of y for time t+1
- α̂ — estimated intercept from the AR(1) model
- ρ̂ — estimated autoregressive coefficient from the AR(1) model
- yt — current observed value of the series at time t
Multi-step forecasts are constructed iteratively, substituting each forecast back into the AR equation. Forecast accuracy is evaluated using out-of-sample metrics such as root mean squared error (RMSE) and mean absolute error (MAE). The key principle: estimate parameters on a training sample, then evaluate forecast accuracy on data the model has never seen.
For I(1) series, typically difference before forecasting. Forecast Δy using an AR model on the differenced series, then reconstruct levels by adding the forecasted change to the last observed value. This avoids the non-stationarity that invalidates standard prediction intervals. For cointegrated series, an ECM can produce forecasts that incorporate both short-run dynamics and long-run equilibrium adjustment.
I(0) vs. I(1) Processes
The distinction between stationary and unit root processes is fundamental to choosing the correct regression strategy. Using the wrong approach leads to either spurious results or lost information.
I(0) — Stationary
- Constant mean and constant variance over time
- Shocks are temporary — effects fade exponentially
- Mean-reverting: series returns to long-run average
- Standard OLS and t-tests are valid
- Examples: stock returns, inflation rate, T-bill spread
- Strategy: regress in levels with standard inference
I(1) — Unit Root
- No fixed mean; variance grows with time
- Shocks are permanent — each one shifts the level forever
- No mean-reversion: series wanders without bound
- OLS produces spurious results; t-tests are invalid
- Examples: stock prices, exchange rates, interest rate levels
- If not cointegrated: first-difference, then regress
- If cointegrated: use an error correction model (ECM)
Common Mistakes
Working with non-stationary time series introduces pitfalls that are easy to fall into — even for experienced analysts. Here are the most common errors:
1. Regressing non-stationary data without testing for unit roots. Running OLS on two I(1) series in levels produces spurious regression results — high R-squared and significant t-statistics even when the series are unrelated. Always apply the ADF test to each variable before interpreting a levels regression.
2. Assuming first-differencing is always correct. When two I(1) series are cointegrated, first-differencing discards the long-run equilibrium information embedded in the levels relationship. An error correction model is the appropriate specification because it preserves both the short-run dynamics and the long-run adjustment.
3. Confusing cointegration with correlation. These are fundamentally different concepts. Two stationary series can be highly correlated without being cointegrated (cointegration requires I(1) series). Conversely, two cointegrated series may exhibit low short-run correlation even though they share a stable long-run equilibrium. Cointegration is about the order of integration of the linear combination, not the strength of the contemporaneous association.
4. Using standard t-distribution critical values for Dickey-Fuller tests. The DF test statistic follows its own non-standard distribution with critical values more negative than the usual −1.96. At the 5% level, the correct critical value is −2.86 (without a trend). Using standard values rejects the unit root null far too often, leading researchers to incorrectly conclude a series is stationary.
5. Testing for cointegration before confirming both series are I(1). The Engle-Granger procedure requires that both variables have unit roots. If one series is already stationary (I(0)), cointegration is not applicable and the test results are meaningless. Always run the ADF test on each series individually before testing for a cointegrating relationship.
Frequently Asked Questions
Disclaimer
This article is for educational and informational purposes only and does not constitute investment or financial advice. The numerical examples (T-bill rates, test statistics) are illustrative and based on textbook results from Wooldridge (2025). Always conduct your own analysis with current data and consult a qualified professional before making financial decisions.