EdgeProof

Strategies / Intermarket

Pairs / spread mean reversion

When two markets that usually move together drift unusually far apart, bet on them coming back together.

advanced1h · 4h · 1dStudy onlyTested in published research

Overview

This guide is study-only: the strategy needs a second market lined up candle by candle with the first, which the platform's setup bank does not provide yet, so there are no setups to practise or test.

Pairs trading looks for two markets that usually move together, such as EURUSD and GBPUSD. When they drift unusually far apart, it bets on the gap closing. Evan Gatev, William Goetzmann and Geert Rouwenhorst (2006) found it profitable on US stocks from 1962 to 2002, with returns declining in later years. Ernest Chan (2013) covers the method and its pitfalls.

The library's version builds a spread: the log price of this market minus β times the log price of the other, with β estimated from the previous 200 candles. It turns the spread into a z-score using the same 200 candles. When z rises above +2, this market is expensive compared with the other, so the rule sells it; below −2, it buys it.

Note that the library rule trades one leg only, this market, with a 1.5 × ATR(14) stop. A classic pairs trade holds both legs (sell the expensive one, buy the cheap one) so that moves they share cancel out. With one leg, you keep that shared risk.

The exact rules we test

These are the rules the platform runs over market history to find setups. Every setup you'll see in practice and tests matched them on a closed candle.

  1. Spread: log price of this market minus β × log price of the other (β from the look-back)
  2. Short this market when the spread's z-score is above k, long when below −k
SettingDefaultWhat it does
Look-back200 candlesCandles for β and the z-score.
Entry z2 σHow far apart the markets must drift.

Default exits: Exit when the z-score returns to 0; stop at 2k

Free with an account

Read the full Pairs / spread mean reversion guide

Create a free account to keep reading. It takes a minute, and you can practise and test this strategy straight after.

  • ✓ What forms the setup, with pattern diagrams
  • ✓ How to read the chart, step by step
  • ✓ Exactly where to enter, stop and take profit
  • ✓ Real examples and what happened next
  • ✓ When it works, and when it doesn't
  • ✓ How its setups did on this platform
  • ✓ Common mistakes and a pre-trade checklist
  • ✓ The evidence and references