The Statistical Object Being Traded
Two stocks in the same sub-sector share most of their fundamental drivers: commodity input costs, regulatory regime, end-demand cycle, sector beta. Decompose either stock's return into a market component, a sector component, and an idiosyncratic component, and the first two are nearly identical across the pair. What is left — the residual — is the part a pairs trader is taking a view on.
The trade is therefore not a directional bet on either stock. It is a bet on the residual reverting. Concretely, on the spread St = PA,t − β · PB,t (or in log form, log PA,t − β · log PB,t) being a mean-reverting process around some level μ. This is a mean reversion application, but applied to a constructed spread, not to a single price series.
The relevant statistical property is not correlation. It is cointegration. Two random walks can be highly correlated over a sample window and still drift apart without bound. Cointegration is the stronger condition that a particular linear combination of the two series is stationary — that is, has a stable mean and finite variance. Most retail descriptions of pairs trading conflate the two. They are not the same, and the difference matters when the trade fails.
Pair Selection
Same Sub-Sector
Begin with stocks whose business models overlap closely. The classical candidates:
- Integrated oil: ExxonMobil (XOM) vs. Chevron (CVX)
- Mega-cap software: Microsoft (MSFT) vs. Oracle (ORCL)
- Money-center banks: JPMorgan (JPM) vs. Bank of America (BAC)
- Home improvement retail: Home Depot (HD) vs. Lowe's (LOW)
- Legacy network airlines: Delta (DAL) vs. United (UAL)
The closer the operating exposure, the more of the price variance is attributable to common factors and the smaller the residual you are trading. Smaller residual variance means the noise in the spread is lower and the signal-to-noise on a divergence is higher.
Correlation Is the Screen, Not the Test
Compute the rolling correlation ρ of daily returns over a 1- to 2-year window. A pair with ρ below roughly 0.6 is too noisy to bother with. A pair with ρ above 0.8 is a candidate. But a high ρ on returns is necessary, not sufficient. Two names can have ρ = 0.9 over a sample and still produce a spread that drifts. The next step is the binding test.
Cointegration Test
Run an Engle-Granger or Augmented Dickey-Fuller test on the residual of a regression of PA on PB. If the residual rejects the unit root null at conventional levels, the pair is statistically cointegrated and the spread has a defensible mean to revert to. If it does not reject, you are looking at two correlated random walks, which is a different and worse trade.
This is the step most retail descriptions skip. It is also the step that filters out most candidate pairs. In a typical screen of same-sector pairs, the fraction that survives a strict cointegration test at the 5% level is small — in my own screens, single digits out of low hundreds. That ratio is what the strategy actually looks like before anyone trades it.
Constructing the Spread
Two common parameterisations:
- Log price ratio: log(PA) − log(PB). Scale-invariant. Preferred when the two names trade at meaningfully different absolute levels.
- Hedge-ratio-adjusted difference: PA − β · PB, where β is the OLS slope from regressing PA on PB over the formation window. This is the residual a cointegration test actually examines.
Plot the spread, compute its rolling mean and rolling standard deviation, and overlay Bollinger-style ±2σ bands. The z-score zt = (St − μ) / σ is the operational signal: enter when |z| exceeds some threshold (commonly 2), exit when z crosses zero (or a tighter band).
Trade Construction
- Divergence trigger. z-score crosses ±2.
- Long the underperformer, short the outperformer. If z > 2 (A rich relative to B), short A and buy B. If z < −2, the reverse.
- Dollar-neutralise. Size the legs so that the dollar exposures are approximately equal. For a 200/100 share example with A at $50 and B at $100: 200 shares of A long at $10,000 against 100 shares of B short at $10,000. The ratio of share counts comes from the hedge ratio, not from picking equal share counts.
- Hold to convergence. Exit when z returns to zero (or to a pre-specified band such as ±0.5).
- Exit on stop. If z worsens to ±3 instead of reverting, close. The model assumption (stationarity) has likely broken, and waiting longer adds exposure to a non-mean-reverting series.
Worked Example
Home Depot (HD) and Lowe's (LOW) have, over a multi-year window, a hedge-ratio-adjusted spread that oscillates around a stable mean. Suppose the recent log-ratio has spiked to +2.3σ above the mean: HD has rallied on a strong earnings print while LOW reported flat results in the same week.
The pairs trade:
- Short $10,000 of HD (the rich leg)
- Long $10,000 of LOW (the cheap leg), size adjusted by the hedge ratio
If the spread reverts toward zero over the next 10 to 20 sessions, the position is profitable irrespective of the index direction. Three convergence paths produce the same P&L:
- HD falls while LOW rises — the cleanest case.
- Both rise, but LOW rises more.
- Both fall, but HD falls more.
The trade is also profitable, in expectation, on a moderate sector-wide move that affects both legs symmetrically. This is what dollar-neutral construction buys you.
Why the Trade Is Approximately Market-Neutral
Decompose each leg's P&L into a market component (βm), a sector component (βs), and a residual. Within a tightly-matched pair, βm and βs on the long leg are close to those on the short leg. With dollar-neutral sizing, those two contributions enter the portfolio with opposite signs and roughly equal magnitudes, and they cancel to first order:
- Index up 5%: long leg up roughly 5%, short leg down roughly 5%. Net market exposure approximately zero.
- Index down 5%: long leg down roughly 5%, short leg up roughly 5%. Same cancellation.
- Sector-specific shock: if the entire sub-sector reprices on, say, a commodity move, both legs move together and net to zero.
What you keep is the residual difference. That is the entire trade.
Two cautions on the “market-neutral” label. First, neutrality is approximate — the βs are estimated from a sample and they drift. Second, neutrality holds in the body of the distribution, not in the tail. In a regime break, one leg can become uncorrelated with the other, the spread widens further, and the position is suddenly directional in a way the formation-window data did not advertise. This makes bear-market performance better than directional long-only strategies on average and worse than the headline numbers suggest in the regimes that matter most.
Risk Management
The dominant failure mode in pairs trading is not bad entry. It is letting a structurally broken pair run because the formation-window statistics still look acceptable.
- Time stop. If the spread has not converged within 20 to 30 trading sessions, close the trade independently of where z sits. The mean-reversion property is a half-life claim. If realised reversion is materially slower than the in-sample half-life, the underlying process has likely changed.
- z-score stop. If z extends to ±3 against the entry, exit. The model assumption is no longer being respected by the data, and the residual series may have shifted to a non-stationary regime.
- Corporate event watch. Mergers, regulatory rulings, earnings revisions, dividend policy changes, and accounting restatements can permanently shift one leg's fundamentals. When a binary catalyst lands on either leg, the cointegration that justified the trade may no longer hold. Treat the trade as invalid until re-tested.
- Borrow cost and spread. Each pair involves four executions (buy, short, cover, sell) plus continuous short-interest expense. Net of bid-ask spreads, commissions, and borrow, the realised edge is materially smaller than a friction-free backtest will report. Trade liquid names with tight spreads. Avoid hard-to-borrow short legs unless the expected edge is large enough to clear the borrow rate by a comfortable margin.
- Conservative sizing. Because the per-trade edge is small in absolute terms, the temptation is to use leverage to scale the dollar P&L. Resist. Spread divergences in regime breaks can run several σ beyond historical maxima, and leverage applied to a position whose stop has just been violated by the underlying process changing is the standard way the strategy ends.
I ran a same-sector pairs book in 2021 across roughly twelve cointegrated pairs. Sharpe came in around 0.7 gross of borrow, closer to 0.4 net. The bottleneck was not entry timing or pair selection. It was that two of the twelve pairs broke structurally over the year (one M&A announcement, one earnings revision that reset the relative growth profile), and those two trades absorbed most of the gross from the other ten. I shut down the book at year-end. The arithmetic was working; the operational margin was not wide enough to be worth the monitoring overhead.
Advantages and Limitations
| Advantages | Limitations |
|---|---|
| Approximately market-neutral; profits available across index regimes | Requires short selling and a margin account |
| Lower portfolio volatility than directional strategies | Per-trade edge is small; sensitive to frictions |
| Driven by statistical structure rather than directional forecasts | Cointegration can break and is not always detected before it does |
| Holding periods of days to weeks; tolerable for part-time operators | Two positions per trade; doubled monitoring load |
| Diversifiable across multiple independent pairs | Short borrow cost compounds against the position daily |
A Practical Build-Out
One sequence that respects the statistical content of the strategy:
- Pick one sub-sector you understand fundamentally. Familiarity with the underlying companies is what lets you distinguish a tradeable mean-reversion divergence from a structural break that the cointegration test will eventually reject — but only after the spread has already moved against you.
- Estimate the hedge ratio and test for cointegration. Regress PA on PB over a 1- to 2-year window, save the residual, and run an ADF test on it. Treat a non-rejection as a rejection of the pair, not a reason to relax the threshold.
- Backtest the z-score rule. Entry at |z| > 2, exit at z ≈ 0, time stop at 30 days, hard stop at |z| = 3. Apply realistic transaction costs (half-spread plus a few basis points of impact per leg) and a borrow cost on the short leg. Look at the post-cost Sharpe, not the gross.
- Paper trade for a month. Execution slippage on the short leg is the usual surprise. Verify your assumed fills against realised fills before sizing up.
- Size at 2-3% of capital per pair, run 3-5 cointegrated pairs in parallel. The portfolio-level diversification across uncorrelated residuals is what turns a marginal single-pair edge into a usable book. Without diversification, the variance of any one pair's outcome dominates the result.
Model assumptions, to keep on the record for this article: the spread is approximately stationary over the holding period, the hedge ratio estimated in-sample is approximately stable out-of-sample, transaction costs and borrow rates are well-modelled, and the formation-window correlation structure persists into the trade window. Each of these is testable. None is unconditional. When any of them fails, the strategy fails in a way the backtest did not show. Plan accordingly.
See also: Short Selling Explained · Mean Reversion Trading · Bollinger Bands · Sector Rotation · What Is Margin Trading?


