advanced · advanced

Pairs Trading (Statistical Arbitrage)

A pairs trading strategy tries to profit when two related assets move out of line and then return toward their usual relationship. This lesson explains how traders test, build, and manage statistical arbitrage trades in a practical way.

In this lesson, you will learn how <strong>pairs trading</strong>, also called <strong>statistical arbitrage</strong>, works in real markets. You will see how traders choose two related assets, test whether their price relationship is stable, build a trading signal, size positions, and manage risk.

1. What Pairs Trading Is

A <strong>pairs trading strategy</strong> is a market-neutral strategy that trades two related assets at the same time. The trader usually buys the asset that looks cheap and sells the asset that looks expensive.

The goal is not to predict whether the whole market will rise or fall. The goal is to profit if the <strong>spread</strong> between the two assets returns to normal. The spread is the measured difference between the two assets, often adjusted by a hedge ratio.

For example, suppose two bank stocks usually move together because they are in the same industry. If Bank A falls sharply while Bank B stays strong, a pairs trader may:

  • <strong>Buy Bank A</strong> because it looks relatively cheap
  • <strong>Short Bank B</strong> because it looks relatively expensive
  • Close both trades if the relationship returns to normal
  • This is common in <strong>statistical arbitrage stocks</strong>, where traders use data and probability to find temporary mispricings. It can also be used in crypto, ETFs, futures, and commodities, but the quality of the data and execution costs matter a lot.

    Pairs trading is not risk-free arbitrage. <strong>Arbitrage</strong> usually means locking in a near-certain profit from a pricing difference. <strong>Statistical arbitrage</strong> means the trade has a statistical edge, but it can still lose money if the relationship breaks down.

    2. Correlation vs Cointegration

    Many beginners think pairs trading only needs high <strong>correlation</strong>. Correlation measures how closely two assets move together over a period, from -1 to +1. A correlation near +1 means they often move in the same direction.

    Correlation is useful, but it is not enough.

    Two assets can be highly correlated and still drift apart for a long time. For pairs trading, traders often care more about <strong>cointegration</strong>. <strong>Cointegration</strong> means two price series have a long-term relationship, even if each one moves around over time. In simple terms, their spread tends to return toward an average level.

    This is why <strong>cointegration trading</strong> is important. It focuses on whether the relationship between the two assets is stable enough to trade mean reversion. <strong>Mean reversion</strong> means a value tends to move back toward its historical average.

    Example:

  • Stock X and Stock Y both rise over several years.
  • Their individual prices are not stable.
  • But the difference between Stock X and a weighted amount of Stock Y stays around a normal range.
  • When the difference becomes unusually wide, a trader enters a pair trade.
  • Common statistical tools include:

  • <strong>Correlation test:</strong> Checks whether assets move together.
  • <strong>Cointegration test:</strong> Checks whether the spread has a stable long-term relationship.
  • <strong>Z-score:</strong> Measures how far the current spread is from its average in standard deviation units.
  • A <strong>standard deviation</strong> measures how much values usually move around their average. A z-score of +2 means the spread is about two standard deviations above its average, which may signal an unusually wide spread.

    3. Building a Practical Pairs Trade

    A basic pairs trading process has several steps.

    Step 1: Choose a logical pair

    Start with assets that have a real economic link. Good candidates include:

  • Two stocks in the same industry
  • Two share classes of the same company
  • Two ETFs tracking similar markets
  • Two crypto assets with a strong ecosystem relationship
  • Futures contracts on related commodities
  • Avoid choosing a pair only because a chart looks similar. There should be a reason the relationship may continue.

    Step 2: Estimate the hedge ratio

    The <strong>hedge ratio</strong> tells you how much of one asset to trade against the other. It is often estimated using regression. <strong>Regression</strong> is a statistical method that estimates how one variable changes when another variable changes.

    For example, a regression may show that Asset A tends to move 1.5 dollars for every 1 dollar move in Asset B. A trader might then buy $10,000 of Asset A and short $15,000 of Asset B, depending on the signal.

    The goal is to reduce exposure to the overall market and focus on the relative movement between the two assets.

    Step 3: Create the spread

    A simple spread formula is:

    <strong>Spread = Price of Asset A - Hedge Ratio × Price of Asset B</strong>

    If the spread is much higher than normal, Asset A may be expensive relative to Asset B. If the spread is much lower than normal, Asset A may be cheap relative to Asset B.

    Step 4: Use entry and exit rules

    A common advanced framework uses z-scores:

  • Enter short spread when z-score is above +2
  • Enter long spread when z-score is below -2
  • Exit when z-score returns near 0
  • Stop out if z-score moves beyond a risk limit, such as +3 or -3
  • If the spread z-score is +2.2, the trader may short Asset A and buy Asset B. If the z-score later falls to 0.2, the trader may close the position.

    These numbers are examples, not universal rules. Traders should backtest and adjust them based on the asset class, volatility, costs, and holding period.

    4. Example: Stock and Crypto Pair Setups

    Imagine two large payment company stocks have historically moved together. A trader tests five years of daily prices and finds that the spread is cointegrated. The current z-score is -2.1, meaning Asset A is cheap relative to Asset B.

    A possible trade plan:

  • Buy Asset A
  • Short Asset B
  • Size the trade using the hedge ratio
  • Exit if the z-score returns to -0.2 or 0
  • Stop out if the z-score falls below -3
  • Re-check the trade if there is major news, such as earnings or regulation
  • Now consider crypto. A trader may compare two liquid tokens in the same sector, such as two exchange tokens or two layer-1 blockchain assets. The trader could monitor spreads on a platform that supports the needed markets, such as CoinW, while making sure liquidity, fees, and borrow availability are acceptable.

    Crypto pairs require extra caution because relationships can change quickly. Token unlocks, exchange listings, funding rates, liquidity shocks, and protocol news can break a statistical relationship.

    In both stocks and crypto, the practical question is the same: <strong>Is the current spread unusual, and is there a good reason to believe it may normalize?</strong>

    5. Risk Management and Common Mistakes

    Pairs trading can look safe because one asset is long and the other is short. However, the risk can be serious.

    Key risks include:

  • <strong>Model risk:</strong> The statistical relationship may not work in the future.
  • <strong>Structural break:</strong> A permanent business, regulatory, or market change may destroy the relationship.
  • <strong>Execution cost:</strong> Fees, spreads, slippage, and borrowing costs can remove the edge.
  • <strong>Short squeeze risk:</strong> The short asset can rise sharply and force losses.
  • <strong>Liquidity risk:</strong> You may not be able to exit both legs at fair prices.
  • <strong>Overfitting:</strong> A backtest may look good because it was too closely fitted to past data.
  • Practical risk controls:

  • Use pairs with strong economic logic, not only strong statistics.
  • Test out-of-sample data, meaning data not used to build the model.
  • Include realistic fees, spreads, and slippage in backtests.
  • Limit position size so one pair cannot damage the whole account.
  • Monitor news and events for both assets.
  • Use stop-loss rules based on spread behavior and total portfolio risk.
  • Avoid entering trades right before earnings, token unlocks, or major announcements unless the event risk is part of the strategy.
  • A strong pairs trader does not simply buy one asset and short another. They define the relationship, test it, size it, execute carefully, and exit when the reason for the trade is gone.

    Key Takeaways

  • <strong>Pairs trading</strong> seeks profit from the relative movement between two related assets, not from predicting the whol
  • Interactive lesson at /learn/lesson/pairs-trading-statistical-arbitrage