WhitmanTrading

Pairs Trading: Betting on the Gap

Pairs trading means holding a long position in one instrument and a short position in a related one, sized so broad market direction roughly cancels. The trade is a bet on the relationship between the two, not on either price, and it profits only if the gap between them closes.

How it works

A candlestick chart of the site's shared price history. The headline on the chart reads: Long one, short the other, bet on the gap.
Long one, short the other, bet on the gap. Illustrative chart - not real market data.

Long one instrument, short a related one, sized so market direction roughly cancels. What remains is a position in the spread, not in either price.

The trade wins when the gap closes and loses when it widens. Which leg rises does not matter, provided the long one beats the short one.

A gently rising stretch of the long price series with an account equity curve beneath it. The headline on the chart reads: It removes the market and keeps the comparison.
It removes the market and keeps the comparison. Illustrative chart - not real market data.

It removes broad market direction and keeps the comparison, which is why it can make money in a falling market and lose in a rising one.

It is a form of statistical arbitrage, a cousin of arbitrage proper — that one closes a difference that must close; this bets on one that usually has.

The short leg makes it a short selling position, and the hedging logic removes one risk by accepting another.

Choosing the pair

A calmly advancing stretch of the long price series with a slowly rising equity curve beneath it. The headline on the chart reads: The pair needs a reason, not just a correlation.
The pair needs a reason, not just a correlation. Illustrative chart - not real market data.

The pair needs a reason, not just a correlation. A high historical correlation is an observation, and across enough candidates some will show one by chance.

The reason has to be structural: the same inputs, the same customers, the same regulatory regime, naming why the two prices should track at all.

A flat, quiet stretch of the long price series with a gradually rising equity curve beneath it. The headline on the chart reads: And the sizes must be matched by exposure, not by shares.
And the sizes must be matched by exposure, not by shares. Illustrative chart - not real market data.

And the sizes must be matched by exposure, not by shares. Equal share counts are no hedge when one leg costs several times the other; match by beta.

A strongly rising stretch of the long price series with an account curve breaching its limit. The headline on the chart reads: A gap that should close can widen for a long time.
A gap that should close can widen for a long time. Illustrative chart - not real market data.

A gap that should close can widen for a long time. No level exists at which a spread must stop moving, and nothing brings the prices back on any schedule.

A choppy, directionless stretch of the long price series. The headline on the chart reads: And sometimes it widened because one of them changed.
And sometimes it widened because one of them changed. Illustrative chart - not real market data.

And sometimes it widened because one of them changed. A gap that opens for a reason is not a gap that closes, and nothing in the price series tells you which kind you are looking at.

In practice

A declining stretch of the long price series. The headline on the chart reads: The short leg costs money every day you hold it.
The short leg costs money every day you hold it. Illustrative chart - not real market data.

The short leg costs money every day you hold it, so time is a cost even when nothing moves.

A 72-bar candlestick section of the shared price history with an account curve shown with and without fees. The headline on the chart reads: Two legs, two round trips, twice the cost.
Two legs, two round trips, twice the cost. Illustrative chart - not real market data.

Two legs, two round trips, twice the cost. One idea pays the entry cost twice and the exit cost twice.

A candlestick chart with a volume histogram beneath it, with the volume histogram emphasised. The headline on the chart reads: And the thinner leg sets the position size.
And the thinner leg sets the position size. Illustrative chart - not real market data.

And the thinner leg sets the position size. Whatever volume the less liquid instrument trades is the ceiling for both.

A long-horizon candlestick view of the same price series. The headline on the chart reads: Convergence is measured in weeks, not sessions.
Convergence is measured in weeks, not sessions. Illustrative chart - not real market data.

Convergence is measured in weeks, not sessions, which exposes the trade to borrow, to corporate events, and to a relationship that quietly ended.

A candlestick series containing several opening gaps, with the largest opening gap marked. The headline on the chart reads: An earnings gap in one leg breaks the pair.
An earnings gap in one leg breaks the pair. Illustrative chart - not real market data.

An earnings report hits one leg and not the other. Dividends and index changes do the same, and an opening gap is the shape it takes.

A declining stretch of the long price series, with the entry price and the level at which a stop would trigger drawn as horizontal lines. The headline on the chart reads: So the stop belongs on the spread, not on either leg.
So the stop belongs on the spread, not on either leg. Illustrative chart - not real market data.

So the stop loss belongs on the spread, not on either leg. Express it in units of the spread’s own standard deviation, and set it before entry.

A stop on one leg converts a hedged position into a directional one, in a market you chose to have no view on.

A candlestick chart of the site's shared price history, annotated with the round-trip cost. The headline on the chart reads: Every round trip costs 2% of a bar.
Every round trip costs 2% of a bar. Illustrative chart - not real market data.

On this site’s shared history one round trip costs 2% of a median bar’s range, and a pair pays it on both legs.

Checking a candidate pair honestly

Start with the reason, written in a sentence, before any chart is opened. If you cannot say why the two instruments should move together, there is nothing worth testing yet.

Then look at the spread’s own history rather than at the two price lines. The question is whether the difference behaves like something that returns: how far it usually strays, how long it takes to come back, and whether it has ever simply stopped coming back.

Then ask the question almost nobody asks — how many pairs did you look at before this one? If a scanner examined every combination it could reach and handed back the best, the correlation you are admiring is partly a selection effect.

Its evidential value falls with every pair you rejected, which is overfitting in different clothes — the mechanism that flatters a backtesting run, arriving before the backtest has begun.

What pairs trading is not

It is not arbitrage. Nothing forces this gap to close.

It is not market-neutral because the legs are the same size. Neutrality is an estimate, and estimates drift.

It is not protective hedging. Both legs are opinions, and both can be wrong at once.

And it is not a gentler version of a directional trade. It swaps market risk for relationship risk.

When it fails

A sideways, range-bound candlestick series. The headline on the chart reads: In a quiet market the pair just sits there costing.
In a quiet market the pair just sits there costing. Illustrative chart - not real market data.

In a quiet range the pair just sits there costing. Nothing converges because nothing diverged, while borrow and commissions accrue against a spread doing what it should.

The second failure is the divergence that never returns. Mean reversion is the assumption under the whole structure, and when it is false the position has no natural exit.

A third is the pair chosen by scanner. Picking the highest correlation from a large set produces coincidences, which dissolve once money is committed.

A fourth is a corporate event. Results, an index reweighting or a dividend lands on one leg alone, and the spread jumps to a level it never comes back from.

A fifth is the short leg becoming expensive or unavailable. A recall closes half the position and hands back a directional trade nobody chose.

And a sixth is drift in the hedge ratio. Beta is estimated from the past; if it has moved and you have not re-measured, the position stopped being neutral some time ago.

The original data

Across the 31,760 videos in research/search-study-corpus.jsonl, four carry “pairs trading” in the title and nine carry “correlation”. The four pairs-trading videos hold a median of 14,568 views from three channels and a maximum of 98,599; the nine correlation videos manage a median of 1,162 from five channels. Statistical arbitrage appears once, at 13 views; arbitrage three times, at a median of 2,143; hedging ten times, at a median of 9,853 across seven channels. The strategy is better covered than the concept it is entirely built on, which is the wrong way round, and the counts in research/broker-coverage.json explain why most published pairs are picked by scanning for a high correlation rather than by naming a reason.

A strongly rising stretch of the long price series, cut short at the decision bar. The headline on the chart reads: The spread is at a two-year extreme. Fade it?
The spread is at a two-year extreme. Fade it? Illustrative chart - not real market data.

One round trip on this site’s shared 576-bar history costs 0.0098 price units — 2% of a median bar’s range, 45% of the smallest bar, and more than 10% of a bar’s range on 15 of the 576 bars. Measured by site/measure_series.py into research/series-measurements.json. A pair has two legs, so one idea pays that twice going in and twice again coming out. Write down the reason the two instruments are linked before you open a single chart; if the only reason you can write is a correlation number, you do not have a pair.

Correlation is the measurement every pair rests on, and why the number is weaker evidence than it looks. Mean reversion is the assumption that the spread comes back, tested on this site’s own series. And statistical arbitrage is the wider family, where the same logic runs across many pairs.

What I actually do

I held one of these far longer than I should have, on a pair I was certain moved together. The gap kept opening, and every week I told myself it had to snap back, while the short leg quietly cost me to carry. What had actually happened was that one of the businesses had changed and I was arguing with the news. I closed it for a reason I should have written down before I ever opened it.

— Michael Whitman

This page is educational, not financial advice. Test every idea on your own charts before risking money.