Pairs Trading Explained: Spread, Hedge Ratio, Example and Risk

Pairs trading is a market-neutral strategy that buys one instrument and sells a related one at the same time, so the result depends on the gap between their prices, the spread, returning to its usual level. The direction of the whole market matters less. A pairs trading strategy needs two related instruments, a hedge ratio that sizes the two sides and rules for cancelling the trade.
TL;DR
- Pick two instruments with an economic link and measure the spread between them: price A minus beta times price B.
- Sell the one that has grown too expensive against the other and buy the other one, with sizes set by the hedge ratio so that the two sides offset each other as far as the hedge ratio holds.
- Cancel the trade in advance on a fixed spread level, count the costs of both sides and plan for one leg failing to fill.
This method can be applied to the currency, stock, and commodity markets. The hardest part of this method is choosing the type of assets.
This article covers the main principles of pairs trading, the steps for choosing instruments, a numerical example of the spread and examples from three markets, and ends with the risks.
What Is Pairs Trading and How Does It Work?
Pairs trading is a method based on trading two correlating financial instruments simultaneously in opposite directions.
Correlation is a statistical link between two or more values (assets). It can be direct and inverse. In the first case, one asset tends to move in the same direction as the other one. If the correlation is inverse, the charts of two instruments are mirror-like.
As an example of direct correlation, take the behavior of oil prices and stock prices of oil companies. When oil prices grow, stocks also grow. And vice versa: when oil prices are falling, the stocks of oil companies tend to fall too.
However, each oil company will grow or fall in its own way, faster or slower. This temporary divergence of prices can be used for pairs trading.
The strategy of pairs trading uses the principle of balance: it presumes that divergences of correlating instruments tend to return to their average values. This is an assumption, and the next section shows when it fails. Such divergences happen after some important fundamental events: changes in interest rates by Central banks, corporate events, etc.
To trade by the strategy, find a highly correlating pair of financial instruments, one of which has grown or fallen compared to the other. We expect the gap to close with time, after which you close the position.

Correlation vs Cointegration in Pairs Trading
Correlation measures how the price changes of two instruments move together. Pearson's correlation coefficient runs from -1 to +1, and the higher it is, the more likely the two move in one direction. Correlation says nothing about whether the gap between the two prices returns to its average.
Here is a synthetic counterexample. Over one year, the price of A rises in a near-straight line from 100 to 160, and the price of B rises in a near-straight line from 100 to 120. The correlation is close to 1. With beta fixed at 1, the spread A minus B grows from 0 to 40 and keeps growing. Selling A and buying B at any point of that year would have lost money.
Both prices rise and correlation is near 1, yet the gap grows from 0 to 40
Synthetic prices over one year. The vertical scale starts at 100.
A and B: 100 A: 160 B: 120 Start End of year
- A +60%, B +20%.
- Spread A − B: 0 → 40.
Source: the synthetic example in this article, calculated 23 November 2026.roboforex.com/blog
Cointegration is the property that matters for the trade. Two prices are cointegrated when a combination of them, price A minus beta times price B, stays around a stable average instead of drifting away. It is checked with statistical tests, such as the Engle-Granger test, on a long history.
In practice, correlation is a quick filter for finding candidates, and a stable spread is the condition for trading them. Neither guarantees the future: a merger, a new product or a regulation can break the link between two companies at any time.
How to Choose Instruments for Pairs Trading
Choosing assets for this strategy implies using fundamental and technical analysis, as well as statistical calculations. Work through these steps in order:
- Economic link. Look for a reason why the two prices should move together. On the whole, you can start among the stocks of companies of one market sector; contracts for similar instruments such as Brent and WTI oil, gold and silver; or interconnected currencies.
- Comparable data. Take the same timeframe and the same trading hours for both instruments, and for stocks use prices adjusted for splits and dividends.
- Stable spread. Build the spread and check that it returns to an average repeatedly over a long period, not only in one stretch of the chart. Correlation and a cointegration test belong here.
- Hedge ratio. Estimate beta, usually as the slope of a regression of price A on price B, and re-estimate it from time to time.
- Test outside the training period. Estimate beta and the average on one period, check the entry and cancel rules on a later period that the estimate did not use, and then practice on a demo account.
A chart comparison stays useful as a first look. Display the chosen instruments on one chart. To do it on the MetaTrader 4 trading platform, you will need to find and install special scripts and indicators. But also, you can use ready-made Internet resources, such as TradingView.
Uniting two assets on one chart, we can see how far they diverge on the chosen timeframe. The difference between the prices, the spread, is the main landmark for your trading decisions: take its average value and watch the deviations. In the picture below, there are two instruments on one chart: Brent and WTI oil.

Pairs Trading Example: Spread and Position Sizes
The numbers below are synthetic, chosen to show the arithmetic of a pair trade. They are not taken from a market. The spread is price A minus beta times price B, where beta is the hedge ratio estimated from history.
Spread at 4.25 is past the entry line: 4.25 to the target, 1.75 to the cancel level
Synthetic spread, price A minus 1.5 × price B. Not market data.
Now 4.25 Target 0 Entry 4.0 Cancel 6.0 +425 USD before costs −175 USD before costs
- After 25 USD of costs: +400 USD at the target, −200 USD at the cancel level.
Source: the synthetic example in this article, calculated 23 November 2026.roboforex.com/blog
| Item | Value | How it is found |
|---|---|---|
| Price A and price B | 125.00 and 80.50 | Current prices |
| Beta (hedge ratio) | 1.5 | Estimated from history |
| Spread | 4.25 | 125.00 − 1.5 × 80.50 |
| Usual spread | Average 0, standard deviation 2.0 | History of the spread |
| Entry condition | Spread above +2 standard deviations, that is above 4.0 | Met: 4.25 is above 4.0 |
| Position | Sell 100 units of A, buy 150 units of B | 150 = 100 × 1.5 |
| Value of each side | 12,500 USD short, 12,075 USD long | 100 × 125.00 and 150 × 80.50 |
| Target | Spread back to 0 | Gain of 4.25 × 100 = 425 USD before costs |
| Cancel level | Spread at +3 standard deviations, that is 6.0 | Loss of (6.0 − 4.25) × 100 = 175 USD before costs |
| Costs of both sides | 25 USD | Assumed 0.05 per unit per side, paid on entry and on exit: (100 + 150) × 0.05 × 2 |
| Result after costs | +400 USD at the target, −200 USD at the cancel level | 425 − 25 and −175 − 25 |
The two sides hold 100 units of A and 150 units of B, because each unit of A moves with 1.5 units of B. Equal numbers of units are not automatically neutral. With 100 units of B instead of 150, 50 units of B would stay exposed to the market, and the trade would no longer depend on the spread alone. Equal money on both sides does not make the pair neutral either: the hedge ratio sets the sizes.
The costs of the example include the spread, commission and slippage of both sides. In real trading, add the swap for each night a position stays open and, for stocks, the cost of borrowing a share to sell it. Compare the cancel loss with the capital you accept to lose on one trade and size the volumes with the forex calculator.
Trade on the Go With RoboForex MobileTrader
Watch the spread on two charts and open both sides of the trade from your phone, on Android and iOS.
Pairs Trading Examples in Three Markets
The examples below are historical and read from the charts of the original article. They show the idea on real instruments and ignore costs. Check any spread you want to trade yourself.
Stock market
Pairs trading can be used for trading stock indices and the shares of companies working in one or connected sectors of economy. Some events can violate the correlation of such assets, for example, signing large contracts or designing new products. Also, the general stock market sentiment influences the correlation significantly. Stocks of the pair are listed on the stocks page.
Example:
- On the chart, there are the quotations of the stocks of two oil companies: Exxon Mobil (NYSE: XOM) and Chevron (NYSE: CVX).
- The history of these stocks shows high correlation; an average spread of this pair is 40 USD.
- At the beginning of 2020, while the stock market was falling, the spread between the two stocks narrowed by half, to 20 USD. At that moment, you could buy Chevron and simultaneously sell Exxon Mobil in equal numbers, a 1 to 1 ratio as in the original example, expecting the spread to return to its average value.
- Two or three months later, the spread returned to its average value of 40 USD; closing the position could bring about 20 USD per share of the pair, before costs.

Commodity market
For pairs trading, you can choose contracts for similar commodities, such as oil and natural gas, gold and silver. Also, you can use different types of contracts for the same commodity.
Example:
- On the chart, you can see the quotations of a spot contract for XAU/USD and a futures contract for GC gold.
- The contracts have very high correlation; the usual spread is about 10 USD.
- At one moment the spread was abnormally high, about 60 USD. You could sell the leading GC futures and simultaneously buy the XAU/USD spot contract.
- Two weeks later, the spread returned to 10 USD; closing both positions would bring about 50 USD per unit of the spread, before costs.
Before sizing the two legs, compare the value and the specification of each contract. A futures contract and a spot lot can represent different amounts of gold, so equal numbers of contracts do not make the legs equal. Part of a gap between futures and spot also comes from the basis, which depends on the expiry of the futures contract.

Forex
For pairs trading in Forex, you will need two correlating currency pairs. For example, EUR/USD and GBP/USD have positive correlation. However, this dependence is unstable, which means the quotations can diverge significantly and stay away from each other for a long time. In essence, trading the spread between EUR/USD and GBP/USD is like trading their cross-rate: EUR/GBP. When there is a stable trend in EUR/GBP, the correlation between EUR/USD and GBP/USD gets violated.
Example:
- In the chart, there are the quotations of EUR/USD and GBP/USD.
- These pairs correlate moderately, an average spread on the chart is about 0.1500, which is 1,500 pips.
- When markets were falling, and investors were fleeing to protective assets, the spread narrowed two times, to 0.0750, or 750 pips. At that moment, you could buy GBP/USD at a serious decline and simultaneously sell EUR/USD in the same volume, a 1 to 1 ratio as in the original example.
- A month later, the spread returned to 0.1500, and closing both positions would bring 0.0750, or 750 pips of profit, before costs.

Risk Management in Pairs Trading
As with any trading strategy, you will need risk management in pairs trading. Though the position is market-neutral, unexpected news influencing one or the other asset can change the speed and direction of the spread movement abruptly. Hence, formulate the criteria of risk management in advance. Five risks need a rule:
- Spread risk. The spread can keep widening after your entry, and the link between the two instruments can break for good.
- Risk of each leg. Each side is an ordinary position with its own price swings, gaps and costs. Market-neutral does not mean riskless.
- Execution risk. One side can fill and the other one not, or fill at a worse price, especially when the two instruments trade at different hours or one of them is illiquid.
- Closing one leg. If one position is closed by a stop, a margin shortage or a trading halt, the other one becomes a plain directional trade.
- Costs. Spread, commission and swap are paid on both sides.
As one option, you can follow the overall loss of both positions together. Set an acceptable loss size for one trade (for example, 3% of your capital) and a cancel level for the spread, and close both positions when either is reached. A Stop Loss on each leg can serve as protection against a one-sided failure. Place it beyond the cancel level of the spread, because a stop that closes only one leg turns the pair into a directional trade. Check how your drawdown looks when several pair trades fail in a row.
Bottom Line
Pairs trading is a popular market-neutral strategy. It seems simple at first glance only. To succeed, a trader will need to find suitable instruments, test the spread on data outside the training period, size both sides with a hedge ratio and fix the cancel level before entering.
Also, stick to risk-management rules. A set of rules like this one is a system that needs testing: see how forex trading systems are built and checked. Before risking your real capital, test the strategy and your skills on a demo account.
FAQ
Is high correlation enough for pairs trading?
High correlation is a filter for finding candidates and does not prove that the spread returns to its average. Two prices can rise together for a year while the gap between them keeps widening. A cointegration test, a spread that returns to its average over a long period and a check on later data add evidence. None of them guarantees the future.
Why is a hedge ratio needed?
The hedge ratio says how many units of instrument B offset one unit of instrument A in the spread A minus beta times B. Equal numbers of shares or contracts are neutral only when beta equals 1. In the example, 100 units of A are paired with 150 units of B.
What happens if only one side of the trade is executed?
The position is an ordinary directional trade with the market risk of a single instrument. Decide in advance what to do: close the filled side at once, or wait for the second one within a set time or price. Limit orders control the price of each side, but one of them can still fill alone, so the plan for that case has to exist before the entry. Filling the less liquid side first is one way to reduce the risk.
- Drawdown in Trading: how a run of losing trades adds up and what it takes to recover.
- Forex Trading Systems: how a set of rules like this one becomes a complete system.
- 7 Trading Strategies for Beginners and Advanced: other strategies to compare with pairs trading.
Any information provided in articles on this website is based solely on the personal opinions of the authors. These articles should not be construed as trading recommendations or a call to action. The authors and RoboForex accept no responsibility for the results of any trades made on the basis of these recommendations and reviews. Past performance is not indicative of future results. Trading stocks and CFDs involves a high risk of capital loss.