Statistical arbitrage
Pairs Trading
Learn statistical pairs trading with price spreads, regression, cointegration tests, z-scores and half-life estimates, including costs and structural-break risks.
What Is It?
Pairs trading is statistical arbitrage: it trades a historical relationship between two assets in the expectation that an unusual spread will revert. It is not a matched-payoff arbitrage, and neither cointegration nor a large z-score guarantees convergence or profit.
Correlation measures co-movement, often of returns. Cointegration asks whether nonstationary price series admit a stationary linear combination. High return correlation alone does not establish a stable price spread. Economic linkage, data adjustments and sample selection matter alongside test statistics.
How It Works
A price-level regression models asset A as an intercept plus β times asset B plus a residual. For β > 0, a high residual can motivate shorting one A share and buying β B shares; a low residual reverses those legs. This is a hedge for the modeled price spread, not automatically a dollar-neutral or beta-neutral book.
A log-price regression has a different interpretation: β is an elasticity. Approximate log-return hedging uses β units of B notional per unit of A notional, so the number of B shares depends on both prices. Reusing β as a share count from a log regression is a sizing error.
Normalize the residual using a trailing mean and standard deviation, with parameters fitted using information available before the decision. An illustrative rule might enter above |z| = 2, exit near zero and enforce a separate loss or time limit. Threshold selection and repeated pair testing can overfit; use held-out and walk-forward evaluation.
Mathematical Formula
Worked Example
Illustrative prices · not market data
Use a hypothetical price-level model A = 10 + 2B + residual. At entry A = 115 and B = 50. The trailing residual mean is zero and its standard deviation is 2.
- The entry residual is 115 − 10 − 2 × 50 = 5, giving z = 2.5. An illustrative high-spread trade shorts 100 A shares and buys 200 B shares.
- Suppose A later becomes 112 and B becomes 51; the residual is now zero. The A short gains 100 × (115 − 112) = 300 and the B long gains 200 × (51 − 50) = 200.
- Gross P&L is 500. With aggregate round-trip, borrow and financing costs of 80, net P&L is 420.
- The initial short notional is 11,500 while the long notional is 10,000. A β hedge is visibly not dollar-neutral. If b = −0.10 in a separate AR(1) fit, the exact estimated half-life is about 6.58 sampling intervals.
This favorable outcome is conditional, not expected guaranteed income. A spread that widens or breaks structurally can lose on both the signal and the hedge.
Execution Considerations
Align trading calendars, splits, dividends and currencies. Test nonstationarity and residual stationarity using a suitable Engle–Granger procedure and residual-based critical values, rather than interpreting ordinary ADF p-values as exact cointegration significance. Account for multiple comparisons and parameter uncertainty.
The pairs analytics use price-level regression, a simplified approximate ADF screen and an approximate half-life. Treat these outputs as diagnostics. Check simulated-data flags before interpreting signals. Re-estimate on a defined schedule, reserve margin, confirm stock borrow and apply position, loss and holding-time limits.
Risks & Limitations
Structural breaks, mergers, business changes and crowded positioning can stop mean reversion permanently. A historically stationary residual is not a contractual convergence mechanism.
Borrow recalls, dividend payments, liquidity gaps, beta exposure and changing hedge ratios undermine neutrality. Frequent rebalancing can consume the statistical edge. Half-life estimates describe a fitted model, not a deadline for profitable exit.
Frequently Asked Questions
Is high correlation enough to trade a pair?
No. Correlated returns can coexist with a price spread that drifts indefinitely. Check the economic hypothesis, spread definition, stationarity and out-of-sample behavior.
Does β make a pair market-neutral?
Not automatically. Price-level share hedging, dollar neutrality and market-beta neutrality are distinct objectives and generally require different position sizes.
Does a z-score of 2 imply a known win probability?
No. Financial residuals need not be independent, normally distributed or stable. A z-score measures standardized distance under the chosen window, not a calibrated profit probability.
Explore the Existing Tool
The existing pairs tool calculates historical statistics from Yahoo price series and uses clearly flagged simulated series when that source fails. Its simplified ADF p-values and half-life estimates are screening approximations, not proof of cointegration or trade profitability.
Open Pairs Trading AnalyticsRelated Strategies
References & Further Reading
Background sources for the concepts above. Apply the assumptions stated in this guide to each formula.
Educational material only; not investment advice or an offer to trade. Examples are hypothetical. Trading involves execution, financing and capital-loss risks; no return is guaranteed.