Calculators › Trading
Pairs Trading Calculator
Find the hedge ratio that makes two legs dollar-neutral, read the spread z-score to time entries and exits, and split capital across both legs — backed by a live cointegration scanner that ranks how every instrument pairs with the one you want to trade.
Live pair scanner — pick one instrument, see every pairing
| Other leg | Anchor leg | Other leg size | Not $ | z | corr | Half-life | Risk | Relationship | |
|---|---|---|---|---|---|---|---|---|---|
| Press “Scan” to pull live data… | |||||||||
No connection needed. Use these to learn the math behind the scanner, or to size a pair when you already have your own β and spread statistics.
1 · Hedge ratio & spread
2 · Spread z-score & signal
3 · Two-leg position split
How it works
What this page does
Pairs trading bets that two related instruments, which usually move together, will snap back toward their normal relationship after they drift apart. You go long one leg and short the other, so broad market direction roughly cancels and you trade the spread between them. This page has a live scanner plus three manual calculators.
The live scanner
Pick an anchor — the instrument you actually want to trade — and how many lots or shares you intend to put on it. The scanner pulls daily prices for a basket of major FX pairs, metals, energy, indices, big tech stocks and BTC, then for each pairing it estimates the hedge ratio, the spread, its z-score, the rolling correlation, the mean-reversion half-life, and the size for the other leg. Every row carries an honest relationship badge:
- ✅ real pair — cointegration confirmed and the half-life is in a tradeable band, so the spread has historically mean-reverted (there is an edge to trade).
- ⚠️ weak — the two are correlated but cointegration did not pass or the spread reverts too slowly; size small and lean on discipline.
- ❌ none — correlation is too weak; the numbers only balance the legs mechanically, there is no spread edge to harvest.
Zero ✅ rows is normal — genuine cointegration is rare and fragile. The scanner reads delayed Yahoo daily data cached on our server (refreshed hourly); it is research, not a trade signal, and connects to no account.
1 · Hedge ratio & spread
The hedge ratio β sets how much of leg B you short per dollar of leg A. With β = 1 the two legs carry equal dollar notional — dollar-neutral. Short shares of B come from β × (shares_A × price_A) / price_B, and the price spread shown is A − β·B. The scanner's spread is the log version, ln(A) − β·ln(B) − intercept, fitted by an Engle–Granger cointegration regression.
2 · Spread z-score & signal
The z-score says how far today's spread sits from its recent average, in standard deviations: z = (spread − mean) / std. The bigger the absolute value, the more stretched the pair. A common rule enters when |z| crosses a threshold (2.0σ for the cleanest pairs, higher for weaker ones) and flattens once it falls back inside ±0.5σ. A positive z means the spread is rich (short it); negative means cheap (long it).
3 · Two-leg position split
Given the capital you want deployed gross, it splits across the two legs at the β notional ratio: A notional = capital / (1 + β) and B notional = capital × β / (1 + β), then converts each to a share or lot count at the prices you enter. At β = 1 the split is even and market-neutral.
What it deliberately does not do
It will not promise the spread reverts — cointegration breaks, especially around earnings or regime shifts, and after costs the edge in pairs trading is thin. Lot and contract sizes are estimates; the robust outputs are the ratio and the spread statistics, not a share count down to the decimal. This is an information tool for education, not investment advice.
Frequently asked questions
What is a pairs trading calculator?
How do I calculate the hedge ratio for a pair?
β × (shares_A × price_A) / price_B; with β = 1 each leg carries the same dollar notional. The live scanner estimates β statistically from an Engle–Granger cointegration regression on the two price series.What spread z-score should I enter a pairs trade at?
What does the cointegration badge mean?
Is the live scanner real-time?
Does this calculator give trading advice?
Related calculators
Information tool only — not investment, trading, tax, or financial advice. All computation runs in your browser.