Skip to main content
aifinhub
general Calculator Guide

How to use Pair Trading Cointegration Tester

Paste two price series. The page runs the Engle-Granger cointegration test (OLS hedge ratio + ADF on residuals), estimates Ornstein-Uhlenbeck half-life, and plots z-score so you can tell whether the pair is mean-reverting on a tradeable timescale.

By Orbyd Editorial · AI Fin Hub Team

What It Does

Use the calculator with intent

Paste two price series. The page runs the Engle-Granger cointegration test (OLS hedge ratio + ADF on residuals), estimates Ornstein-Uhlenbeck half-life, and plots z-score so you can tell whether the pair is mean-reverting on a tradeable timescale.

Stat-arb developers screening candidate pairs who need a fast cointegration + half-life check before committing to a full backtest.

Interpreting Results

ADF p-value below 0.05 means residuals are stationary (the pair cointegrates). Half-life translates to your holding period — under 10 trading days is daily-strategy territory, 30+ days is monthly-strategy territory.

Input Steps

Field by field

  1. 1

    Upload data

    Upload two price series for the pair. The tester runs the Engle-Granger cointegration test first; failure → no test.

  2. 2

    Set parameters

    Set entry threshold (z-score for opening), exit threshold (z-score for closing), and stop-loss (z-score for kill-switch).

  3. 3

    Set parameters

    Set lookback window for the rolling z-score computation (default 60 days).

  4. 4

    Run calculation

    Run the backtest. Read realized Sharpe, max drawdown, trade count, and win rate.

  5. 5

    Sweep inputs

    Sweep entry threshold to see the trade-frequency-vs-Sharpe surface. Tighter thresholds = more trades, lower per-trade quality; looser = fewer trades, higher quality.

Common Scenarios

Use realistic starting points

Industry-pair candidate

Series A

Major bank A

Series B

Major bank B

Lookback

2 years daily

Sometimes cointegrated, sometimes not — the relationship breaks during earnings season and merger speculation. Out-of-sample test is essential.

ETF-pair candidate

Series A

SPY

Series B

VOO

Very tight cointegration (both track S&P 500), very short half-life, very small spread — capacity is the limit, not signal.

Try These Tools

Run the numbers next

FAQ

Questions people ask next

The short answers readers usually want after the first pass.

Z-score-based mean-reversion entry/exit on a candidate pair, with parameterized lookback, entry threshold, exit threshold, and stop-loss. Outputs include realized Sharpe, max drawdown, trade count, and win rate. The methodology page documents every parameter.

Related Content

Keep the topic connected

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