Markets: A Rigorous Course

13A.5 The Engle–Granger two-step

Core about 10 min

Motivation

The simplest test for a pair: estimate the hedge ratio, then test the residual for a unit root. The catch is that the second step needs its own critical values.

13A.5.1Step 1: the cointegrating regression and superconsistency#

Run

pt1=μ+b pt2+ut(13A.14)p^1_t = \mu + b\,p^2_t + u_t \tag{13A.14}

by OLS. If the pair is cointegrated, utu_t is stationary.

Proposition 13A.5superconsistency

If p2p^2 is I(1)I(1) and uu is I(0)I(0), then b^−b=Op(T−1)\hat b - b = O_p(T^{-1}).

Proof sketch

b^−b=∑(pt2−pˉ2)ut/∑(pt2−pˉ2)2\hat b - b = \sum(p^2_t - \bar p^2)u_t\big/\sum(p^2_t-\bar p^2)^2. The denominator is Op(T2)O_p(T^2) (Proposition 13A.3). The numerator is a sum of products of an I(1)I(1) and an I(0)I(0) variable: T−1∑(pt2−pˉ2)utT^{-1}\sum (p^2_t-\bar p^2)u_t converges to a functional of the form ∫W~ dB+Λ\int \tilde W\,dB + \Lambda, where BB is the Brownian motion of uu's partial sums and Λ\Lambda a one-sided long-run covariance. So the numerator is Op(T)O_p(T) and the ratio Op(T−1)O_p(T^{-1}).∎

Superconsistency makes the estimation error in b^\hat b negligible compared with the spread itself. It does not make OLS tt-statistics on b^\hat b valid: the limit is non-normal and has a second-order bias from Λ\Lambda (endogeneity and serial correlation). For inference on bb, use dynamic OLS (add leads and lags of Δp2\Delta p^2; Stock and Watson 1993) or fully modified OLS (Phillips and Hansen 1990).

13A.5.2Step 2: testing the residual, with the right critical values#

Apply the ADF regression to u^t\hat u_t without deterministic terms (they are absorbed in step 1, and u^\hat u has mean zero by construction):

Δu^t=γ u^t−1+∑j=1pδjΔu^t−j+et.(13A.15)\Delta\hat u_t = \gamma\,\hat u_{t-1} + \sum_{j=1}^p\delta_j\Delta\hat u_{t-j} + e_t. \tag{13A.15}

H0H_0: no cointegration (uu has a unit root). Reject for large negative tt-ratios on γ\gamma.

Why DF critical values are wrong here Under H0H_0 the step-1 regression is spurious: b^\hat b is a random variable (Proposition 13A.3), not an estimate of anything. And OLS picks b^\hat b to minimise ∑u^t2\sum\hat u_t^2, i.e. to make u^\hat u look as stationary as possible. Both effects push the statistic to the left. Its limit is a functional of an nn-dimensional Brownian motion that depends on the number of variables nn and on the deterministic terms in step 1 (Phillips and Ouliaris 1990). MacKinnon (2010) gives response surfaces; statsmodels.tsa.stattools.coint uses them.

Engle–Granger, constant in step 1 1% 5% 10%
n=2n=2 (a pair), asymptotic (MacKinnon 2010) −3.90 −3.34 −3.04
n=2n=2, simulated T=500T=500, 5,000 draws (m13a_adf.py) −3.87 −3.35 −3.06
n=3n=3, asymptotic (MacKinnon 2010) −4.29 −3.74 −3.45
For comparison, DF with constant −3.43 −2.86 −2.57

A residual statistic of −3.10 for a pair rejects at 10% and not at 5%. With DF critical values it would wrongly be called significant at 5%.

Exercise link engle_granger in m13a_adf.py must reproduce statsmodels.coint(trend="c", maxlag=1, autolag=None) exactly. A test checks that, for independent random walks, the EG critical value rejects about 5% of the time while the DF critical value rejects noticeably more.

13A.5.3Weaknesses#

  • Normalisation. Regressing p1p^1 on p2p^2 and p2p^2 on p1p^1 gives different residuals and can give different test conclusions in finite samples. Johansen's method (13A.6) is invariant to it.
  • One vector only. With n≥3n\ge3 assets, EG finds one combination and cannot tell whether there are more.
  • Multiple testing. Screening 50 bank and NBFC stocks gives (502)=1,225\binom{50}{2} = 1{,}225 pairs. At a 5% level, about 61 will "cointegrate" by chance if none truly do. Apply the multiple-testing machinery of M04 (Bonferroni or Holm for family-wise error, Benjamini–Hochberg for false discoveries), and above all test out of sample.

Create a free account

Reading is open to everyone. An account keeps your progress, answers, notes and code drafts, and gives you the study plan, the journals and the simulator. Running code needs an account approved for it.