Selecting Mean-Reverting Equity Spreads with Cointegration Tests
Summary
This implementation describes a systematic filter for candidate equity pairs or larger baskets. It first constructs a spread using a chosen hedge-ratio method, including ordinary or total least squares, minimum half-life, minimum ADF, Johansen, or Box–Tiao approaches. It then records spread diagnostics and retains baskets that pass a set of criteria: an Engle–Granger cointegration test threshold, a Hurst exponent below a chosen ceiling, enough crossings of the spread’s historical mean, and a positive half-life no longer than a specified maximum.
The code supports configurable thresholds and stores hedge ratios and selection statistics, but it does not define entry, exit, sizing, or execution rules. The criteria are screening heuristics drawn from a cited research framework; the document supplies no independent performance results. In practice, estimates can change across samples, candidate generation and data handling matter, and mean reversion may weaken or disappear out of sample.
Key ideas
- Candidate baskets are converted into spreads using a selectable hedge-ratio estimator.
- ADF-based cointegration, Hurst exponent, mean crossings, and half-life jointly determine whether a spread passes.
- The selector supports both pairs and baskets with more than two assets.
- Passing the screen identifies candidates only and does not specify a complete trading strategy.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.