Guide

Pairs trading explained

Harbor Capital's energy desk watched two large integrated oil majors trade in near-lockstep for years — same basin exposure, similar dividend policies, comparable refining footprints. In March the spread between them widened to a three-year extreme: one name sold off on a one-off refinery outage while the other held flat on buyback news. The portfolio manager did not pick a market direction. She opened a market-neutral pairs trade: long the laggard, short the leader, sized so a 1% move in the S&P 500 would largely cancel out. Six weeks later the spread mean-reverted; the fund captured the convergence while benchmark beta stayed near zero. That is the core idea behind pairs trading — a relative-value strategy that profits when two historically linked securities temporarily diverge, then come back together. Pioneered by quantitative groups at Morgan Stanley and others in the 1980s, pairs trading sits between directional stock picking and full statistical-arbitrage baskets. This guide explains how spreads are built, why cointegration matters more than raw correlation, hedge-ratio math, common entry and exit rules, a Harbor Capital energy-pair worked example, a strategy decision table, pitfalls that blow up “safe” trades, and a production checklist. It complements risk management and position sizing and short selling mechanics without replacing portfolio diversification or options hedging when relationships structurally break.

What pairs trading is (and is not)

A pairs trade is a long-short position in two related instruments designed to isolate relative mispricing. You are not betting the market rises or falls; you are betting the spread between A and B returns toward a historical norm. The long leg benefits if the underperformer catches up; the short leg benefits if the outperformer gives back excess gains.

Pairs trading is not guaranteed arbitrage. Spreads can widen further, relationships can break permanently (mergers, bankruptcies, regulatory shocks), and borrow costs on the short leg eat returns. It is also not the same as buying two stocks because they are in the same sector — sector ETFs move together but offer no convergence edge without a defined spread model.

Common pair categories

  • Same-industry peers — two banks, two grocers, two semiconductor equipment names with overlapping customers.
  • Share class / listing arbitrage — ordinary vs ADR, dual-listed tickers (subject to currency and liquidity frictions).
  • ETF vs basket — index ETF vs a replication portfolio (often HFT territory at tight spreads).
  • Cross-asset cousins — gold miners vs gold price, refiner vs crude (higher fundamental risk).

Merger arbitrage (deal spreads) is a specialized cousin with event-driven risk; classic statistical pairs trading focuses on co-moving equities without a pending acquisition catalyst.

Correlation vs cointegration

Beginners pick pairs by high correlation — two stocks with 0.85 daily return correlation must mean-revert, right? Not necessarily. Correlation measures whether returns move together over a window; it says little about whether the price level spread is stationary. Two stocks can drift apart for years while daily returns remain correlated (both rise, one faster).

Cointegration is the stronger test: a linear combination of prices is mean-reverting even when each price series alone is non-stationary (random-walk-like). The Engle-Granger two-step method and Johansen tests are standard econometric tools; practitioners also monitor rolling half-life of spread mean reversion. A pair that fails cointegration on a rolling 12-month window should be dropped even if the headline correlation looks attractive.

Building the spread

Define a spread series St = PA,t − β PB,t where β (hedge ratio) is estimated by regressing A's price (or log-price) on B's over a training window. OLS on levels is common; log prices stabilize variance for long horizons. Re-estimate β periodically — static ratios from 2019 rarely fit 2026 capital structures after buybacks and spinoffs.

Normalize the spread into a z-score: z = (St − μ) / σ using rolling mean μ and standard deviation σ. Entry rules often trigger at |z| > 2 and exit near z = 0 or |z| < 0.5. Stop-outs at |z| > 3–4 cap losses when the relationship breaks.

Market neutrality and beta hedging

A dollar-neutral pair (equal dollars long and short) is not automatically beta-neutral. If the long stock has beta 1.4 and the short stock has beta 0.8, a rally in the index hurts the position even if the spread is flat. Harbor Capital sizes legs so portfolio beta toward the benchmark is near zero:

SharesA × βA ≈ SharesB × βB (simplified; multi-factor models add size, value, and sector exposures).

Residual sector risk remains: two oil majors still share oil-beta even after index hedging. Some desks add a third leg — short an energy ETF — to neutralize factor exposure, at the cost of tracking error and extra borrow.

Entry, exit, and position sizing

Signal design

  • Threshold entries — open when |z| exceeds 2.0; scale in at 2.5 if conviction and liquidity allow.
  • Time stops — close if spread has not reverted within N trading days (half-life estimate informs N).
  • Fundamental filters — skip pairs with pending M&A, accounting restatements, or dividend cuts on one leg only.
  • Earnings blackouts — avoid holding through single-name earnings when the catalyst is idiosyncratic.

Sizing the book

Risk budget per pair, not per leg. A common rule: risk 0.25–0.5% of portfolio equity if the spread hits the stop z-score. Translate z-stop distance into dollar P&L using historical spread volatility. Multiple overlapping pairs in the same sector stack correlated drawdowns — cap sector gross exposure. The Kelly criterion applies to the edge and variance of the spread trade, not each stock independently; most shops use fractional Kelly or fixed fractional rules on spread volatility.

Harbor Capital energy pair: worked example

Harbor Capital's systematic sleeve monitored integrated majors Northport Petroleum (NPP) and Seaboard Energy (SBE) — fictional tickers representing a realistic peer pair. Over 252 trading days, log-price regression gave β = 0.94 (one share of NPP hedged by 0.94 shares of SBE). Rolling 60-day spread mean μ and σ produced a live z-score.

  1. Signal: z reached +2.3 — NPP rich vs SBE after a refinery fire depressed NPP sentiment disproportionately.
  2. Trade: Short $2.0M NPP, long $1.88M SBE (beta-adjusted toward S&P 500 neutrality using 30-day betas 1.05 and 0.98).
  3. Borrow: NPP general collateral, 35 bps annualized; checked locate before entry.
  4. Stop: Hard stop if z > 3.5 or 40 trading days elapse without reversion.
  5. Exit: z fell to +0.4 after six weeks as outage repairs progressed; gross spread P&L +4.1% on deployed capital; net +3.6% after borrow and commissions.

Benchmark return over the holding period was +2.8%; pair P&L correlation to SPY daily returns was 0.12 — largely idiosyncratic to the spread. The desk logged the trade in their journal with cointegration p-value at entry (0.03) for post-hoc review.

Strategy decision table

Situation Recommended approach Avoid
High correlation, low cointegration Reject pair; search for better hedge or different horizon Trading correlation alone
Strong cointegration, low liquidity on short leg Smaller size, wider z-entry, or skip Forced short without borrow
Structural break (merger, spinoff) Close and re-estimate; do not average down the spread Hoping reversion overrides corporate actions
Many pairs in one sector Factor-neutral overlay or reduced per-pair size Treating pairs as independent bets
Retail account, hard-to-borrow names Liquid large-cap peers only; consider options substitutes Shorting meme/low-float legs
Crypto perpetual pairs Funding-rate-adjusted spreads, exchange basis risk Assuming equity-style cointegration on thin history

Pairs trading vs alternatives

Approach Exposure Best when
Pairs / stat arb Market-neutral relative value Stable cointegration, liquid borrow, mean-reverting spreads
Directional long-only Full market beta Strong fundamental view, accepts drawdowns
Index hedge (beta overlay) Reduces net beta, not pair-specific Keep winners, trim market risk
Options (spreads, straddles) Defined or convex payoff Vol view, catalyst timing, borrow unavailable

See options fundamentals for constructing defined-risk relative-value structures when short stock is impractical.

Common pitfalls

  • Look-ahead and overfitting — optimizing z thresholds on the same data used to test cointegration inflates backtests. Walk-forward validation is mandatory.
  • Ignoring transaction costs — four round trips per round-trip pair (open/close both legs) plus borrow; edges below 50 bps per trade rarely survive reality.
  • Stale hedge ratios — post-buyback share counts shift β; quarterly re-fit minimum.
  • Short squeeze on one leg — crowded shorts in the outperformer leg turn pairs into directional nightmares.
  • Regime change — OPEC policy, rate shocks, or antitrust rulings permanently re-rate one name; mean reversion becomes a value trap.
  • Leverage creep — market-neutral books often run 2–4× gross leverage; a correlated spread widening hits all pairs at once.

Production checklist

  • Verify cointegration on rolling windows, not a single full-history test.
  • Estimate hedge ratio with log prices; re-fit on a fixed calendar schedule.
  • Confirm short locate and borrow fee before entry; model dividend payment on short.
  • Size from spread stop distance and portfolio heat, not equal dollars alone.
  • Beta- and sector-neutralize when the mandate requires true market neutrality.
  • Document entry z-score, β, half-life, and fundamental news at trade open.
  • Set time stops and hard z-stops; review pairs that hit stops for relationship death.
  • Stress-test gross leverage when 30% of pairs move against you simultaneously.

Key takeaways

  • Pairs trading is a spread bet — profit comes from convergence, not market direction.
  • Cointegration beats correlation — test whether the spread itself mean-reverts.
  • Hedge ratios drift — static β from years ago misstates risk today.
  • Neutrality is engineered — dollar-equal legs still carry beta and sector risk.
  • Relationships break — stops and fundamental filters are not optional.

Related reading