Identifying that two stocks might be cointegrated from sector membership or historical co-movement is only the first step. Before capital is committed, the hypothesis must be tested: is the spread actually stationary, or does it merely look stationary in a finite sample? Two formal testing procedures answer this question. The Engle-Granger (1987) two-step test is the simpler of the two and applies directly to a pair; the Johansen (1988) VAR-based test is more powerful in finite samples and generalises naturally to more than two series.
This note derives both procedures, explains when each is preferred, and closes with practical guidance on implementation for a pairs-trading desk.
Learning objectives. By the end of this note you should be able to:
- execute the Engle-Granger two-step procedure: OLS estimation of , then ADF test on the residuals;
- state the null and alternative hypotheses of both tests;
- set up the Johansen VAR, write the VECM reparameterisation, and state the trace and max-eigenvalue statistics;
- explain the rank condition that determines the number of cointegrating relationships;
- choose between Engle-Granger and Johansen given the specific testing context.
In this lesson
-
- The Engle-Granger two-step test
-
- The Johansen test
-
- Practical comparison
Before you start
- Stationarity, Non-Stationarity, and the Tradability of Spreads
- Cointegration and the Common-Trends Model
The full lesson, with worked examples and exercise solutions, is for members.
Read the full lessonNew to SelfMadeQuant.com? See membership options or browse the Statistical Arbitrage syllabus.