Skip navigation
Skip to article
Browse articles
On this page

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

PA,t=α+βPB,t+εt,zt=εt−μtσtP_{A,t}=\alpha+\beta P_{B,t}+\varepsilon_t,\qquad z_t=\frac{\varepsilon_t-\mu_t}{\sigma_t}
For a price-level model, residuals are in A-price units. μ and σ are estimated from an explicitly chosen trailing window; σ must be positive. The intercept matters for fair-value projection but is not a separate traded share.
Δεt=a+bεt−1+ut,h=ln⁡(0.5)ln⁡(1+b)\Delta\varepsilon_t=a+b\varepsilon_{t-1}+u_t,\qquad h=\frac{\ln(0.5)}{\ln(1+b)}
For a discrete AR(1) approximation, the exact half-life in sampling intervals requires 0 < 1+b < 1. The small-|b| approximation is −ln(2)/b. A fitted non-mean-reverting or oscillatory coefficient does not justify this formula unchanged.
Πgross=nA(PA,0−PA,1)+nB(PB,1−PB,0)\Pi_{\mathrm{gross}}=n_A(P_{A,0}-P_{A,1})+n_B(P_{B,1}-P_{B,0})
This cash P&L is for short A and long B with fixed positive share counts. Deduct both legs' round-trip trading costs, financing, stock-borrow costs and short dividend compensation. Account separately for distributions received.

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.

  1. 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.
  2. 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.
  3. Gross P&L is 500. With aggregate round-trip, borrow and financing costs of 80, net P&L is 420.
  4. 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

Analytics available · simulated fallback

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 Analytics

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.

Optional analytics and ad requests are off until you choose. Google's advertising consent service may contact Google to present regional choices. Read our Privacy Policy.

Your privacy choices

Core pages and scanners work without optional analytics or ad requests. Your selection is stored in this browser for up to 180 days.

If the consent service is unavailable, ad requests stay paused. Global Privacy Control also keeps them paused.