Pair Trading Strategy: Co-integration, Long/Short & Hedging

28 July 2026
5 min read
Pair Trading Strategy: Co-integration, Long/Short & Hedging
whatsapp
facebook
twitter
linkedin
telegram
copyToClipboard

The toughest things to do in the market is to predict whether the market is going to go for go down. Is there a way to profit from stock market without even predicting the direction? The answer is yes. Peer trading is one such strategy in which the traders do not have to predict the overall market direction. 

Pair trading focuses on the relative movement between two correlated stocks. Rather than predicting the absolute direction, the goal is to just identify if the two stocks are temporary too far away from each other. Then the idea is to take delta neutral trade and wait for them to revert to the mean. Because one stock is bought while another is sold simultaneously, pair trading is often called a market-neutral strategy.

Key Takeaways

  1. Pair trading is based on the relative movement of two correlated stocks. 
  2. The aim is not to predict the market direction. 
  3. One stock is bought and one is sold, so it is market-neutral and the spread can still work even if the market crashes. 
  4. Cointegration is more important than correlation because it checks if the spread actually reverts to a stable mean. 

What Pair Trading Is

Pair trading is a strategy the trade is taken in 2 symbols simultaneously. One stock is bought and another stock or a related symbol is sold. Here is the idea behind it. If usually the two stocks move together, they are assumed that they will continue to move together in future also. However, there can be a temporary divergence, which is expected to normalize in the future. The aim is to take benefit of this divergence and place a delta neutral trade. 

For example, lets say stock A and stock B usually move together. Price of stock A is 100 and price of stock B is 200. That means if stock A goes up by 2 points, we expect the stock B to go up by around 4 points. Now, if for some reason, the stocks have a divergence, then we will take the trade. So if stock A has increased to 105, but stock B is at 201, then we can Sell Stock A and Buy Stock B. 

Now, if the spread between them narrows, the trade becomes profitable. The focus is not on whether the market rises or falls. The focus is on relative performance. This is why pair trading belongs to the broader category of statistical arbitrage.

Why Pair Trading Is Considered Market-Neutral

The best part above this strategy is that it is considered a market neutral strategy. The trader is generally not exposed to market crashes, index volatility and macro events. This is because one stock is bought and other stock is sold. So even if there is a market crash, both stocks may decline, but the relative spread may still converge profitably.

Correlation vs Cointegration: What Actually Matters

Now the question is how to find which stocks are the best pairs to do pair trading. Correlation and cointegration can help here. 

Correlation measures how similarly two stocks move. The value of the correlation range from -1 to +1. A high positive correlation means that the stocks generally move together. Some examples can be: 

  • Two banking stocks
  • Two auto stocks
  • Two oil companies

However, correlation alone is not enough. It is possible that the stocks trend upward together and still drift apart permanently. 

This is where cointegration helps. Cointegration checks whether the relationship itself is stable over time. This is the most important aspect because the entire premise of pair trading is going to have mean reversion in the future. Two stocks are cointegrated if their spread fluctuates around a stable long-term mean. So even if prices individually trend upward. Hence, the most important factor in pair trading is cointegration.

How to Choose a Stock Pair

There are 1000s of stocks in NSE. How do we find the pairs to do pair trading. Here are some ideas, which will good pairs:

  • Similar business models
  • Same sector exposure
  • Similar macro sensitivity

For example, the below pairs have historically worked very well as pair trading candidtes:

  • HDFC Bank vs ICICI Bank
  • Infosys vs TCS
  • Coke vs Pepsi globally

If you want to find new pairs, you can find stocks based on:

  • High historical correlation
  • Cointegration
  • Stable spread behavior
  • Similar volatility

How to trade

Here are the core building blocks of pair trading. 

Spread

The spread measures relative difference between the two assets. The formula of spread is 

Spread=P_A​−β*P_B​

Where:

  • (P_A) = price of Stock A
  • (P_B) = price of Stock B
  • (β) = hedge ratio

The spread is what traders monitor for mean reversion.

Hedge Ratio

The hedge ratio determines how much of one stock offsets the other. This is calculated using linear regression and it helps to neutralize price scale differences and volatility imbalance. For example, we may have to buy 1 share of Stock A and short 1.8 shares of Stock B

Z-Score

Z-score measures how far the spread is from its historical mean. The formula is:

Z=(X−μ)/ σ​

Where:

  • (X) = current spread
  • (μ) = average spread
  • (σ​) = standard deviation

Here is how we can interpret it. A high positive z-score means that that the spread is unusually wide. On the other hand, a high negative z-score means that the spread is unusually narrow. This helps identify trading opportunities statistically.

Entry and Exit Rules for Pair Trades

The entry is done when Z-score exceeds threshold. For example, long spread at Z < -2 and short spread at Z > +2. This assumes that extreme divergence will revert

The pairs are exited when the spread reverts toward mean. So, the z value will be close to 0 when we are exiting the trade. Also, some traders use time-based exits and stop-loss thresholds to exit the trade. 

When Pair Relationships Break Down

Like all strategies, it is possible that the pairs do not revert to the mean. This can happen when business fundamentals change, industry structure changes or when one company permanently outperforms. A pair that worked for years can suddenly stop mean reverting. This is why traders continuously revalidate cointegration and monitor spread stability

Final Thoughts

Pair trading is one of the most fascinating strategies in quantitative finance because it focuses on relationships rather than outright market direction. When this is done correctly, it can give traders a reduced market exposure while still able to exploit temporary inefficiencies. However, pair trading is not easy. Firstly it is tough to find the right pairs and secondly it is possible that the pairs do not revert due to correlation changes, breaking of cointegration or evolving of regime itself. 

Do you like this edition?