education

Pairs Trading Explained: How to Trade Two Related Stocks Against Each Other

Pairs trading bets on the gap between two related stocks, not the market's direction. Learn how pairs are chosen, how the spread is measured, a real KO vs PEP divergence, the risks, and how to watch it with alerts.

Stock Alarm Team
Market Analysis
6 min read
#pairs trading#relative value#market neutral#trading strategy#spread trading

Most trades are a bet on direction: the stock goes up, or it goes down. Pairs trading is a bet on a relationship. You pick two stocks that usually travel together, and you trade the gap between them.

This guide explains how the idea works, walks through a real divergence between two famously linked stocks, covers what goes wrong, and shows how to monitor a pair with alerts.

What Is Pairs Trading?

A pairs trade has two legs:

  • Long the stock that looks cheap relative to its partner
  • Short the stock that looks expensive relative to its partner

If the gap closes, the trade can work whether the overall market rose, fell, or went nowhere. The market's push is meant to cancel out between the two legs, which is why the approach is often called market neutral. (If short selling is new to you, read our short selling guide first.)

The strategy dates back to quantitative trading desks in the 1980s. Today the same idea is used at every scale, from large funds to individual traders watching a single ratio.

The Core Idea: The Spread

The spread is simply how far apart the two stocks are. Traders measure it two common ways:

MeasureFormulaWhy use it
Price ratioPrice of A / Price of BEasy to chart; shows relative strength
Price differencePrice of A - Price of BWorks when prices are similar in size

The bet is mean reversion: when the spread stretches well beyond its usual range, it tends to drift back. A trader defines "usual" from history, often with an average and a standard deviation band, and acts when the spread moves far outside it.

A Real Example: Coca-Cola vs. PepsiCo

KO and PEP are textbook partners: two giant beverage and snack franchises with similar customers and similar sensitivity to consumer spending. Here is what actually happened to them over the past year, from closing prices:

Nov 3, 2025 closeNov 6, 2026 closeChange
Coca-Cola (KO)$67.97$95.67+40.8%
PepsiCo (PEP)$143.60$141.34-1.6%
KO / PEP price ratio0.4730.677+43.0%

Two stocks that many investors treat as near-substitutes ended the year more than 42 percentage points apart. Over that stretch, PEP traded as high as $170.49 (Feb 6, 2026) while KO was in the high $70s, so the ratio did not move in a straight line.

What a pairs trader would ask

  1. Why did they diverge? If one company changed (new products, margins, a restructuring, a spin-off), the gap may be deserved. If nothing fundamental changed, the gap might be an opportunity.
  2. Is the ratio stretched against its own history? A ratio of 0.677 is far above where it sat a year ago. Whether that is "stretched" depends on how long a window you choose.
  3. Could the gap keep widening? Absolutely. That is the central risk, covered below.

This table is a snapshot of what happened, not a trade recommendation. A divergence that already ran 40+ points does not tell you which way the next move goes.

How to Build a Pairs Trade, Step by Step

  1. Start with a story, not a statistic. Look for two companies in the same industry with similar drivers: two payment networks, two home-improvement retailers, two big oil producers. Our sector rotation guide is a useful way to see which sectors to scan.
  2. Check the history. Chart the price ratio over one to three years. Do the two stocks tend to snap back after wide gaps, or does the ratio drift in one direction?
  3. Define the trigger in advance. For example: act only when the ratio is more than two standard deviations from its average. Write it down before you trade.
  4. Balance the legs. Size the long and short in similar dollar amounts so market moves roughly offset.
  5. Set an exit for both outcomes. One exit when the spread reverts, and one when it keeps widening and you are proven wrong. See our stop-loss risk management guide.
  6. Mind the costs. Borrow fees on the short leg, margin interest, and trading costs all eat into a trade that is aiming for a modest convergence.

Where Pairs Trading Goes Wrong

  • The relationship breaks. The most dangerous failure. A merger, an accounting problem, or a business model shift can end the historical link for good. "It has to come back" is not a strategy.
  • Correlation is not stable. Two stocks that moved together for three years can stop doing so after one earnings season.
  • Short-side risk. A short position has no ceiling on losses, and a short squeeze can hit hard and fast.
  • Hidden exposure. Two "similar" stocks may respond differently to rates, currencies, or commodity prices, so the pair is less neutral than it looks.
  • Slow convergence. Even if the spread does revert, it can take longer than your borrow costs and patience allow.
  • Crowding. Famous pairs are watched by many traders, and gaps can be quickly competed away or overshoot when everyone exits at once.

Using Alerts to Watch a Pair

You do not need to stare at two charts all day. A practical routine:

  1. Pick the pair and write down your reference levels for each stock: the price at which the gap would look stretched or would have closed.
  2. Set a price alert on each leg. When either stock reaches its level, you get notified and can check the ratio. See how to set stock price alerts.
  3. Add an earnings and news watch. Company-specific events are the most common reason pairs break. Our guide to market news alerts covers the setup.
  4. Set a stop alert on both sides. If the trade moves against you, you want the notification before the loss is large.

With Stock Alarm Pro you can set alerts on both stocks of a pair in the same place and keep them on your watchlist, so a move in either leg reaches you without constant monitoring.

Key Takeaways

  • Pairs trading bets on the gap between two related stocks, not on market direction
  • The core idea is mean reversion of a spread, measured as a ratio or a price difference
  • KO and PEP moved +40.8% and -1.6% over the same year, a reminder that even close partners can drift far apart
  • The biggest risk is that the relationship permanently breaks
  • Short borrowing costs, sizing, and exits matter as much as the entry
  • Price and news alerts on both legs let you monitor a pair without watching screens all day

This article is educational and not investment advice. Price data is from closing prices on the dates shown. Short selling and leveraged strategies carry a risk of substantial loss, and past relationships between stocks do not guarantee future behavior.

Stock Alarm on your phone

Set price alerts and follow the stocks you track in the Stock Alarm app for iPhone and Android.

Want alerts like these? Get started free.

Join 295,000+ traders using Stock Alarm to stay ahead of the market.

See it work — free

Track markets, screen stocks, and set price alerts with Stock Alarm Pro. Explore the live markets free — no account needed. Trusted by 295,000+ investors.

S&P 500 Screener

Filter by metrics, fundamentals

Price Alerts

Never miss a move

35+ Global Markets

Stocks, crypto, futures

AI Analysis

Ask questions, get answers

Explore the markets free
Data is provided for informational purposes only and does not constitute investment advice. Past performance is not indicative of future results.