Methodology · Tool · Last updated 2026-05-08
How Cointegration Half-Life Solver works
How the Cointegration Half-Life Solver regresses two series, tests the residual for stationarity, and estimates the spread's mean-reversion half-life.
Step 1 — Engle-Granger regression
A_t = α + β · B_t + s_t OLS estimates α and β. The residual s_t is the spread. If the inputs look like returns (mean ≈ 0, max |x| < 0.5), we cumulate them into a synthetic price series first; cointegration is a level relationship, not a return relationship.
Step 2 — Augmented Dickey-Fuller on the spread
We regress the differenced spread on its lag (no constant, no trend, no augmentation lags — the simplest case):
Δs_t = γ · s_{t−1} + ε_t The ADF t-statistic on γ is compared to the MacKinnon (1996) critical values for a one-regressor cointegration residual:
1% critical: −3.90
5% critical: −3.34
10% critical: −3.04 The tool interpolates a p-value through these anchors. p < 0.05 supports rejecting the unit-root null; the spread is plausibly stationary.
Step 3 — Ornstein-Uhlenbeck half-life
The discrete OU process s_t = (1 + γ)·s_{t−1} + ε_t has half-life:
half_life = ln(2) / −γ (when γ < 0) γ ≥ 0 is reported as ∞ (no mean reversion).
References
- Engle, R. F., Granger, C. W. J. (1987). "Co-integration and error correction: Representation, estimation, and testing." Econometrica 55(2): 251–276. DOI: 10.2307/1913236.
- Dickey, D. A., Fuller, W. A. (1979). "Distribution of the estimators for autoregressive time series with a unit root." JASA 74(366a): 427–431. DOI: 10.1080/01621459.1979.10482531.
- MacKinnon, J. G. (2010). "Critical values for cointegration tests." Queen's Economics Department Working Paper 1227.
- Vidyamurthy, G. (2004). Pairs Trading: Quantitative Methods and Analysis. Wiley. ISBN: 978-0-471-46067-1.
Limitations
- Single regressor only — multivariate cointegration (Johansen) is not implemented.
- p-value interpolation is approximate; cite exact MacKinnon critical values for publication.
- Half-life estimates are noisy with N < 100; bootstrap CIs would be a future addition.