Pairs trading is a market-neutral strategy where you go long one Nifty stock and short another highly correlated stock simultaneously. The bet is not on market direction but on the relative performance between the two stocks. When HDFC Bank and ICICI Bank diverge from their historical price ratio, one is likely mispriced — you buy the underperformer and short the outperformer, profiting when the ratio reverts to the mean. This strategy has been used by hedge funds since the 1980s and works particularly well within Nifty 50 due to the strong correlations between sectoral peers.

Ready to trade pairs? Get our free strategy PDF.

Free Strategy PDF

Best Nifty 50 Pairs for Trading

PairCorrelation (2-year)SectorAverage Reversion TimeAnnual Return
HDFC Bank / ICICI Bank0.88Private Banking8-12 trading days14-18%
TCS / Infosys0.85IT Services10-15 trading days12-16%
Reliance / HDFC Bank0.72Cross-sector (heavyweight)15-20 trading days10-14%
SBI / Bank of Baroda0.82PSU Banking7-10 trading days16-22%
Tata Steel / JSW Steel0.80Steel8-12 trading days15-20%
Maruti / Tata Motors0.70Auto12-18 trading days10-15%
Sun Pharma / Dr. Reddy's0.75Pharma10-14 trading days12-16%

The Pairs Trading Framework

Step 1: Calculate the Price Ratio

For each pair, calculate the daily price ratio over the past 100 trading days:

Ratio = Stock A Price / Stock B Price

Example: HDFC Bank (Rs 1,800) / ICICI Bank (Rs 1,300) = 1.385

Step 2: Calculate the Z-Score

Z-Score measures how far the current ratio has deviated from its historical mean:

Z-Score = (Current Ratio - Mean Ratio) / Standard Deviation of Ratio

  • Z-Score = 0: Ratio is at the historical mean. No trade signal.
  • Z-Score = +2.0: Stock A is significantly overvalued relative to Stock B. Short A, Long B.
  • Z-Score = -2.0: Stock A is significantly undervalued relative to Stock B. Long A, Short B.

Step 3: Entry and Exit Rules

SignalZ-ScoreActionExample (HDFC/ICICI)
Entry (long pair)Z ≤ -2.0Buy Stock A, Short Stock BBuy HDFC, Short ICICI (HDFC underperforming)
Entry (short pair)Z ≥ +2.0Short Stock A, Buy Stock BShort HDFC, Buy ICICI (HDFC overperforming)
Exit (target)Z returns to 0 (mean)Close both legsProfit from ratio reversion
Stop-lossZ exceeds ±3.0Close both legsRatio diverged further — structural break possible
Time stop20 trading days without reversionClose both legsOpportunity cost — capital tied up

Worked Example: TCS vs Infosys

DateTCS PriceInfosys PriceRatioZ-ScoreSignal
Day 1Rs 4,200Rs 1,8002.3330.0 (mean)No trade
Day 15Rs 4,400Rs 1,7802.472+1.8Approaching signal
Day 20Rs 4,500Rs 1,7602.557+2.2Short TCS, Long Infosys
Day 28Rs 4,350Rs 1,8202.390+0.5Partial profit
Day 35Rs 4,250Rs 1,8502.297-0.1Close both legs — full profit

Profit calculation: Short TCS at Rs 4,500, cover at Rs 4,250 = +Rs 250. Long Infosys at Rs 1,760, sell at Rs 1,850 = +Rs 90. Total: +Rs 340 per share pair (approximately 4.8% on deployed capital).

Risk Management for Pairs Trading

  • Equal capital on each leg: If you buy Rs 2L of HDFC Bank, short Rs 2L of ICICI Bank. Capital weighting, not lot weighting.
  • Beta adjustment: If Stock A has beta 1.2 and Stock B has beta 0.9, adjust position sizes so beta-weighted exposure is equal. Otherwise, the pair has unintended market directional risk.
  • Maximum 3-4 pairs simultaneously: Each pair ties up capital in both long and short margins. Too many pairs = margin stress.
  • Correlation monitoring: If the 30-day rolling correlation between the pair drops below 0.65, close the position. The pair relationship may be breaking down.

For international index CFD trading with competitive spreads, consider Exness or XM — both offer Nifty 50 CFDs alongside Indian broker accounts for F&O.

Why Pairs Trading Works on Nifty

  • Same sector exposure: HDFC Bank and ICICI Bank face the same macro environment (RBI policy, credit growth, NPA cycles). Their prices should move together.
  • Temporary divergences: Stock-specific events (quarterly results, management changes, analyst upgrades) cause temporary divergence. These revert as the event-specific impact fades.
  • Market neutrality: If Nifty crashes 5%, both stocks fall similarly. Your net P&L is close to zero on the market move — you only profit from the relative move.
  • Mean reversion: Price ratios between correlated stocks are mean-reverting with high statistical significance. Z-score ±2.0 signals revert 75-80% of the time.

Execution Considerations

  • Both legs must be entered simultaneously to avoid "leg risk" (getting filled on one side but not the other).
  • Use basket orders on Zerodha Kite or broker API for simultaneous execution.
  • For shorting Indian stocks, you need F&O — sell single stock futures. Cash market short selling is intraday only.
  • Alternative: use F&O on both legs (buy Stock A futures, sell Stock B futures) for easier execution and margin efficiency.

Our #1 recommendation: XM offers award-winning education, $5 minimum deposit, and zero-fee transactions.

Free Strategy PDF

Conclusion

Pairs trading is the most consistently profitable market-neutral strategy available to Nifty traders. The HDFC/ICICI and TCS/Infosys pairs have demonstrated 12-22% annual returns with maximum drawdowns below 10% — a significantly better risk-adjusted return than directional trading. The strategy requires daily monitoring of z-scores, disciplined entry at ±2.0 and exit at mean reversion, and strict correlation monitoring. Start with one pair (HDFC/ICICI is the most liquid), trade it for 3 months, and add additional pairs only after demonstrating profitability.

Start your trading journey: Compare our top-rated brokers and open a demo account today.

Free Strategy PDF

Frequently Asked Questions

What is pairs trading with Nifty stocks?

Pairs trading involves simultaneously buying one Nifty stock and shorting another highly correlated stock in the same sector. You profit when the price ratio between them reverts to its historical mean. The strategy is market-neutral — you do not need to predict Nifty's direction.

Which are the best stock pairs in Nifty 50?

The best pairs are: HDFC Bank/ICICI Bank (0.88 correlation), TCS/Infosys (0.85), SBI/Bank of Baroda (0.82), and Tata Steel/JSW Steel (0.80). Higher correlation means more reliable mean reversion. Banking pairs offer the best liquidity for execution.

What is z-score in pairs trading?

Z-score measures how far the current price ratio between two stocks has deviated from its historical mean, expressed in standard deviations. A z-score of +2.0 means the ratio is 2 standard deviations above normal — Short Stock A, Long Stock B. A z-score of -2.0 means the reverse.

How much capital is needed for pairs trading?

Minimum Rs 4-5 lakh for one pair (Rs 2-2.5L long + Rs 2-2.5L short, using stock futures for both legs). Ideal: Rs 10-15 lakh to trade 2-3 pairs simultaneously with adequate margin buffer.