72lab
Sign up free
Arbitrage Strategies· Lesson 7 of 10· 7 min

Pairs Trading: Statistical Arbitrage

Two stocks that have long moved together drift too far apart: buy the cheap one, sell the expensive one, and wait for them to come back together. It's a bet that the relationship holds.

Risk warning: forex, CFDs, options, futures and crypto assets usually involve leverage or high volatility, and you can lose more than you put in. This lesson only teaches the concepts; all numbers are for illustration and are not investment advice.

This lesson is free: sign up for an account to use the interactive simulation

Every lesson has an interactive simulation you can drag and play, plus a quick quiz. Sign up free to use them and save your progress automatically. Here is the text version of this lesson.

Not sure yet? Try the first lesson (no sign-up needed)「What Is Arbitrage?」。

Text version · Arbitrage Strategies, lesson 7: “Pairs Trading: Statistical Arbitrage”

Two stocks that have long moved together drift too far apart: buy the cheap one, sell the expensive one, and wait for them to come back together. It's a bet that the relationship holds.

A bet that "the spread will come back"

Two companies in similar businesses whose stocks have risen and fallen together for a long time. When the spread strays too far from normal (z-score beyond ±2), short the expensive one and buy the cheap one, then wait for the spread to revert: that's pairs trading.

A statistical pattern isn't a guarantee

It's a form of statistical arbitrage: the edge comes from a historical pattern, not from prices locked in when you open. Once the relationship between the two companies changes, the spread may never come back, so you must use a stop-loss.

You need cointegration, not just correlation

Two stocks can rise and fall together every day (high correlation) and still have a spread that drifts steadily away. What pairs trading really needs is cointegration: the spread is tied by a rubber band and always comes back near its mean. Before trading, test whether the spread itself reverts, and balance the two legs' amounts by their volatility.

Key takeaways

  • Pairs trading: when the spread strays too far, buy the relatively cheap stock and short the relatively expensive one, profiting as the spread reverts.
  • Use a z-score to measure how many standard deviations the spread has strayed. A common rule is to enter beyond ±2 and close near 0.
  • What you need is a spread that reverts (cointegration), not just daily moves that are correlated.
  • It isn't risk-free arbitrage: the relationship can break down permanently, so you must use a stop-loss.

Try it yourself

You can do these exercises in this lesson's interactive simulation:

  1. Keep "Stable relationship" and press ▶ to the end: how many trades in total? At what z-score did each enter and exit?
  2. Change the entry threshold from ±2 to ±1.5 and to ±3: how do the trade count and cumulative P&L change?
  3. Switch to "Relationship breaks" and play with the stop-loss on: what happens after day 150? Where does the stop trigger?
  4. Turn off the stop-loss and play "Relationship breaks" again: how much did you lose in the end? What does this tell you about why pairs trading isn't risk-free arbitrage?

Quiz and explanations

1. The spread's z-score is +2.5, meaning A is expensive relative to B. A pairs trade would…
Answer: Short A, buy B.Sell the expensive one, buy the cheap one, and wait for the spread to fall back.
2. What's the biggest risk in pairs trading?
Answer: The relationship between the two stocks changes permanently and the spread stops reverting.A statistical pattern isn't a guarantee. When the relationship breaks, the spread keeps widening.
3. Two stocks have a daily return correlation as high as 0.9, but the spread between them has widened steadily for years and never come back. Is this pair suitable for pairs trading?
Answer: No: pairs trading needs a spread that reverts to its mean (cointegration), not just correlated moves.Correlation only means they move together day to day; it doesn't guarantee the spread reverts. Pairs trading is a bet on mean reversion in the spread.

Terms in this lesson

  • cointegration (Cointegration): Two prices each wander freely, but some combination of them (like the spread) keeps returning to its mean; pairs trading really needs cointegration, not just correlation.
  • correlation (Correlation): How much two prices move together, from −1 to 1; the closer to 1, the more in sync.
  • mean reversion (Mean Reversion): The tendency of a price or spread to drift back to its average after straying from normal.
  • pairs trading (Pairs Trading): With two closely correlated stocks, buy the cheap one and short the expensive one when their spread widens, then wait for it to revert.
  • statistical arbitrage (Statistical Arbitrage): Trading on historical statistical patterns (such as spreads reverting); it has an edge, but it isn't risk-free.
  • z-score (z-Score): How many standard deviations a value is from its average; z = +2 means 2 standard deviations above normal.
Pairs Trading: Statistical Arbitrage (Arbitrage Strategies) · 72lab