Skip to main content
aifinhub

Playground

Cointegration Half-Life Solver

Engle-Granger residual ADF + Ornstein-Uhlenbeck half-life from any two price/return series. Spread chart, hedge ratio, p-value.

Inputs
Paste + configure
Runtime
1–15 s
Privacy
Client-side · no upload
API key
Not required
Methodology
Open →

Education · Not investment advice. BaFin/EU framework. Past performance does not indicate future results. Editorial standards Sponsor disclosure Corrections

Inputs

Lookback window (rows)252

Half-life (days)

175.5

β = 1.426 · ADF p = 0.755 · no clear mean reversion

Cointegration diagnostics

Hedge ratio β

1.426

A = α + β·B + s

0.147

OLS fit

ADF stat

-0.53

t-stat on Δs

AR(1) φ

0.996

<1 ⇒ reverting

Spread series

Reading the result

Half-life is the OU-process time to revert half-way to the spread mean. Pairs with half-life under 30 days are typical stat-arb candidates. ADF p-value < 0.05 lets you reject the unit-root null at 5%. See methodology.

How to use

Step-by-step

Full calculator guide →
  1. 1

    Upload two price series for the candidate pair. The tool will normalize and align timestamps.

  2. 2

    Run the cointegration test (Engle-Granger ADF on residuals from the cointegrating regression). The tool refuses to estimate half-life if the test rejects.

  3. 3

    If cointegration passes, the tool fits the OU mean-reversion process and reports half-life with standard error.

  4. 4

    Compare half-life across rolling windows (1-year, 3-year, full sample). Stable half-life across windows = robust pair; unstable = the relationship is regime-dependent.

  5. 5

    If half-life is under 30 days and cointegration is stable, the pair is a candidate for further backtesting. Above 90 days, alpha decays before transaction costs amortize.

Glossary references

Terms used by this tool

All glossary →

Questions people ask next

FAQ

What's cointegration half-life?

How long it takes for half of a cointegrated spread's deviation from equilibrium to mean-revert. From the Ornstein-Uhlenbeck speed-of-mean-reversion parameter θ: half-life = ln(2) / θ. Pairs with half-life under 30 days are typically tradeable; above 90 days, the alpha decays before round-trip costs are recovered.

How is θ estimated?

Linear regression of Δspread_t on spread_(t-1). The regression slope is -θ. The methodology page documents the OLS form and the standard error, plus a check on residual autocorrelation (Ljung-Box) — if residuals aren't white, the OU model is mis-specified and the half-life estimate is unreliable.

Does the tool test for cointegration first?

Yes — Engle-Granger two-step test (ADF on the residuals from the cointegrating regression) and Johansen test for the rank of the cointegrating relationship. The tool refuses to compute half-life if the test rejects cointegration; the methodology explains why a half-life on a non-cointegrated series is meaningless.

How sensitive is half-life to lookback length?

Highly. Estimating from 6 months gives a different number than 5 years. The tool computes half-life across rolling 1-year, 3-year, and full-sample windows and flags pairs where the estimate is unstable across windows. Stability matters more than the absolute number.

Can I use this for cross-asset pairs?

The math doesn't care about asset class — it works for stock pairs, ETF arbitrage, crypto pairs, FX pairs. But the cointegration premise (a stable long-run equilibrium) is most credible for assets with structural linkage: dual-listed shares, ETF-vs-creation-basket, futures-vs-cash. Speculative pair trades on non-linked assets often produce false-positive cointegration tests.

Complementary tools

Planning estimates only — not financial, tax, or investment advice.