---
title: "Pair trading: correlation versus cointegration"
description: "What a pair trade bets on and why correlation is not enough: a cointegration test and a walk forward check on Nifty and Bank Nifty closes, with India specifics."
source_url: "https://www.rupeecase.com/learn/path-18/module-18-3-pair-trading-intuition"
---

[Path 18 3 of 14](/learn/path-18/)Pair trading intuition: correlation is not cointegration[Next 18.4](/learn/path-18/module-18-4-futures-calendar-arbitrage)

From 1 Jul 2025 to 15 Sep 2026 Nifty and Bank Nifty rose and fell together almost every day. Their daily returns correlated at 0.91. Over the same 300 sessions the Nifty ended 9.5% below where it began and Bank Nifty 2.9% below. Two series that move together day to day still ended the stretch far apart. A pair trade is a bet that a gap like that closes, and whether it does depends on something correlation does not measure. This lesson explains the trade, the difference between correlation and cointegration, and how to test the difference on real closes. Every figure comes from NSE end of day files, dated and not live.

3By the end you can

1. Explain a pair trade, its spread, the hedge ratio and the z score.
2. Say the difference between correlation and cointegration and read a unit root test on a spread.
3. Name the India specific limits on pairs, and why the pair must be judged on days it was not fitted on.

## The idea, plainly

A pair trade holds one thing long and a related thing short, in proportion. If both rise or fall together, the two legs largely cancel. What is left is the spread, the gap between the two. The bet is that the gap goes back to where it usually sits.

A pair is judged on data it was not fitted on

The order matters. Choosing a pair and testing it on the same days is look ahead bias, and it makes almost any pair look good. Illustration of the method, with no prices. Source: RupeeCase illustration of an Engle Granger style pair test. As of 17 Oct 2026.
Read 3 more paragraphs, 301 words
The spread needs a recipe. Take the log of each price. Regress one on the other over a formation window and the slope is the hedge ratio, the amount of the second leg held against the first. The spread is the first log price less the hedge ratio times the second, less the constant from the regression. To judge how far the spread has strayed, subtract its average and divide by its usual size. That is the z score. A z of two says the gap is two usual sizes from home. Many people act when it passes two. That is a habit, not a law.

Now the point of the lesson. Correlation asks whether the *changes* of two prices move together. Cointegration asks whether the *gap* between them stays near a home. Picture two walkers heading the same way. Their steps agree, so they are correlated, yet they can drift apart for as long as they walk. Tie them with a rope and the distance keeps coming back. Only the rope makes a pair trade, and it is a property of the spread, which correlation says nothing about.

The test for a rope is a unit root test on the spread. This one is the Engle Granger step: the regression first, then the Dickey Fuller statistic of the residual spread. The critical values are stricter than the ordinary tables, because the hedge ratio was chosen from the same data and makes the spread look tamer than it is. At the usual five percent level the statistic has to be below −3.34 in the Engle Granger tables. A second number, the half life, says how many sessions the gap takes to close half the distance. A half life that is long next to the sample is no use for a trade.

## Worked example: Nifty and Bank Nifty, 1 Jul 2025 to 15 Sep 2026

I picked these two because their closes are in the files, not because they are a good pair. They share many of their biggest stocks, which is one reason they move together and one reason they are a poor pair in practice. Here are the 300 closes, rebased to a common start, with the rolling z score of the spread below.

The two indices move together, and still the gap wandered

Nifty 50 and Bank Nifty closes from 1 Jul 2025 to 15 Sep 2026, rebased to a common start, and the z score of the log spread over a rolling window of 60 sessions. The window measures the spread against its own recent past, so it forgets a slow drift. It is a teaching view, not a tradable one. Source: NSE end of day data, computed by RupeeCase. As of 15 Sep 2026.
Moving together day by day, the two still ended the stretch far apart

First close to last close, 1 Jul 2025 to 15 Sep 2026, over 300 sessions. A gap of that size is what a pair trade bets will close, and a test of the spread is the way to ask whether it has a home. Source: RupeeCase calculation on NSE end of day index closes. As of 15 Sep 2026.
Fit on the first part, judge on the rest

1. 1 Jul 2025**Formation window opens**First close in the file. The hedge ratio and the spread's average and size are fitted from here.

2. 4 Feb 2026**Formation window ends**Everything fitted so far is frozen.

3. 5 Feb 2026**Test window opens**The frozen ratio is carried forward on days it never saw.

4. 15 Sep 2026**Test window ends**Last close in the file.

The walk forward split used for the test below. The formation window is the first half of the sessions and the test window the second half. Nothing fitted on the later days is allowed to touch the ratio. Source: NSE end of day data, computed by RupeeCase. As of 15 Sep 2026.

* Daily returns move together: yes.

* The spread stays near a home: no.

* A hedge ratio fitted early holds later: no.

Read 3 more paragraphs, 197 words
On daily returns the pair looks tied. On the log prices the correlation was 0.72, lower than on returns, and the spread tells the real story. The Dickey Fuller statistic of the full sample spread came to −0.49, nowhere near the cutoff. So the data give no reason to think the gap has a home. A rope would have shown a statistic far below it. The two walkers share a direction, and that is all they share.

Does it matter if I had looked only at the early part? I did the more honest test. I fitted the hedge ratio on the first half of the sessions, up to 4 Feb 2026, and carried it unchanged through the second half.

On the later days the spread did not return. Measured in the formation window's own standard deviations, it ended 7.5 below its formation average, and on no single session of the test window was it back at that average. A trader who had met a gap of two usual sizes in the test window would have faced more of the same, not a return. The pair had been fitted well and had not been tied.

### Read the chart yourself

Use the pair chart above. In the upper panel note which index sits higher at the right edge. In the lower panel count how many sessions the z score line is beyond two on either side. Then check, for one of those days, whether the gap had closed a week later. Do it for a few days and write down how many closed and how many widened. Nothing here is a rule, and a handful of days proves nothing, but the habit of asking what came next is the habit a test makes formal.

The term this section turns on: Z score

From the module glossary; every term is in the Learn glossary too. Source: Module 18.3, Pair trading intuition: correlation is not cointegration.

### Where this meets India

Most traders think of pairs as two stocks. I know of no NSE or SEBI list of pairs. The lists online are screens built by third parties on past prices, and pairs break. NSE publishes the stocks that have futures and options, and their lot sizes, and nothing about which stocks belong together. Several Indian features bend the trade, and each one is a cost or a limit that a paper spread does not show. In the cash market a retail short sale has to be closed the same day, and stock lending is thin, so both legs are usually stock futures. Lot sizes differ, so the hedge ratio comes in lumps. Take one lot of Nifty and one of Bank Nifty at the last closes: the first is 23,118.60 times 65 units and the second 55,794.75 times 30 units, and the two values are not equal, so a whole number of lots leaves part of the position unhedged. Monthly futures force a roll. A stock in the F&O ban period blocks new positions in that leg. And each futures leg pays STT of 0.05% on the sell side. The short answers are on the pages for [pair trading](/learn/questions/what-is-pair-trading) and for [cointegration against correlation](/learn/questions/cointegration-vs-correlation). The longer treatment is module [A23](/learn/path-18/module-18-8-pair-trading-with-stock-futures), and the testing toolkit is in module [A22](/learn/path-18/module-18-7-cointegration-toolkit).

## The common mistake

The belief: These two move together at 0.91, so any gap between them will close. A correlation of daily returns is silent about the level of the gap. In this sample the daily return correlation was high and the gap ended far wider than it began. Over the 300 sessions Nifty changed by −9.5% and Bank Nifty by −2.9%, and the fitted spread did not come home on any test day. Look for evidence about the spread itself: a unit root test with the strict tables, a half life short against the sample, and a result that survives on days the fit never saw. Even then a pair can break.

Watch in the terminal: how closely did two lines move together? A short tutorial on sample data.

## Key takeaways

* A pair trade bets on the gap between two prices, not their direction.
* Correlation is about changes. Cointegration is about the gap staying near a home.
* Test the spread with strict tables, then judge it on later days.
* A long half life next to the sample means no trade.
* India: both legs are usually stock futures, with lumpy lots and monthly rolls.
* No NSE pair list exists. Online lists are screens on past prices.

Two terms to hold on to from 18.3

From the module glossary. Source: Module 18.3, Pair trading intuition: correlation is not cointegration.
**Before you trade.** Derivatives trading carries a high risk of loss. SEBI's study "Profitability of Individual Traders in the Equity Derivatives Segment (FY25 to FY26)" (August 2026) found that 87.7% of individual traders in equity F&O made net losses in FY26, with aggregate net losses of Rs 91,685 crore. [Read the SEBI study](https://www.sebi.gov.in/reports-and-statistics/research/aug-2026/study-profitability-of-individual-traders-in-the-equity-derivatives-segment-fy25-fy26-_103835.html)

What does Pair trading intuition: correlation is not cointegration cover?Two prices can move together every day and still drift apart. A pair trade needs the gap to have a home. It works through The idea, plainly, Worked example: Nifty and Bank Nifty, 1 Jul 2025 to 15 Sep 2026, The common mistake, Key takeaways. It is module 18.3 of Path 18, Arbitrage and Relative Value, about 8 minutes of reading, free.

  AF&O on RupeeCase

## Hedging only, in development
F&O at RupeeCase will do one job: protect a portfolio you already own, by a rule published before it runs. No speculation, no naked option selling, no leveraged bets. It is not available yet.

  [How hedging will work](/hedging)[Sign up for RupeeCase](https://invest.rupeecase.com/signup)

  [No hedgeFalls with the marketWith a putA floor, for a premiumIllustration with made up numbers, not a product and not a recommendation.](/hedging)

QQuick check

## 10 questions, 7 to pass.
Each attempt draws 10 of the 15 questions in this module's bank, and a retake draws a fresh set. A pass gives this module's Certificate of Completion. Your result stays on this device and counts towards the Path 18 certificate.

7 of 10 correct passes module 18.3

Every answer is explained when you check; a retake is always free. Source: RupeeCase Learn quiz rules (70% to pass).

  Passed

###

  Certificate ID

Download PNGPrint or save as PDF[Check the ID](/learn/certificates/verify)
Self paced and unproctored. A record of completing free education by RupeeCase; not a NISM certificate and not endorsed by NISM, NSE, BSE or SEBI. It qualifies no one to deal, advise or publish research.

CCheck yourself

## Path 18 so far.
Your quick check results on this device, stop by stop.

Stop 3 of 14 on Path 18

Arbitrage and Relative Value: every live stop, this module ringed. Source: RupeeCase Learn, Path 18.

1. [18.1Cash futures arbitrage and the Nifty 50 Arbitrage indexNot yet](/learn/path-18/module-18-1-cash-futures-arbitrage)
2. [18.2Conversions and reversalsNot yet](/learn/path-18/module-18-2-conversions-and-reversals)
3. [18.3Pair trading intuition: correlation is not cointegrationNot yet](/learn/path-18/module-18-3-pair-trading-intuition#quiz)
4. [18.4Futures calendar arbitrage and roll dynamicsNot yet](/learn/path-18/module-18-4-futures-calendar-arbitrage)
5. [18.5Box spreads with European index optionsNot yet](/learn/path-18/module-18-5-box-spreads)
6. [18.6Parity deviations in practice: what the frictions costNot yet](/learn/path-18/module-18-6-parity-deviations)
7. [18.7Cointegration toolkit: Engle Granger, ADF, half life and z scoreNot yet](/learn/path-18/module-18-7-cointegration-toolkit)
8. [18.8Pair trading with Indian stock futuresNot yet](/learn/path-18/module-18-8-pair-trading-with-stock-futures)
9. [18.9Mean reversion against momentumNot yet](/learn/path-18/module-18-9-mean-reversion-vs-momentum)
10. [18.10Implied correlationNot yet](/learn/path-18/module-18-10-implied-correlation)
11. [18.11Dispersion trades: construction and risksNot yet](/learn/path-18/module-18-11-dispersion-trades)
12. [18.12The correlation risk premiumNot yet](/learn/path-18/module-18-12-correlation-risk-premium)
13. [18.13Baskets, PCA stat arb and Johansen testsNot yet](/learn/path-18/module-18-13-pca-stat-arb)
14. [18.14Kalman filter hedge ratiosNot yet](/learn/path-18/module-18-14-kalman-filter-hedge-ratios)
15. [TPath test, 30 questionsNot yet](/learn/path-18/module-18-14-kalman-filter-hedge-ratios#pathTestSection)

Path 18 in reading time: 143 minutes over 14 modules

Minutes of reading per module, this one in amber. Source: RupeeCase Learn, Path 18.

    Explore next

## Put the module to work.

* [Free module 12.6The real cost of a trade: STT, exchange fees, SEBI fee, GST and stamp duty7 min read](/learn/path-12/module-12-6-cost-of-an-fo-trade)
* [ToolOption payoff builderLegs on a dated Nifty chain, breakevens and charges](/learn/tools/payoff-builder)
* [Free module 18.7Cointegration toolkit: Engle Granger, ADF, half life and z score10 min read](/learn/path-18/module-18-7-cointegration-toolkit)
* [Free module 18.8Pair trading with Indian stock futures10 min read](/learn/path-18/module-18-8-pair-trading-with-stock-futures)
* [Free module 18.1Cash futures arbitrage and the Nifty 50 Arbitrage index9 min read](/learn/path-18/module-18-1-cash-futures-arbitrage)
* [Free module 18.2Conversions and reversals9 min read](/learn/path-18/module-18-2-conversions-and-reversals)

      Community

## Join my WhatsApp group.

      Scan the code, fillFill one short form, and join my WhatsApp group. Slides, sources, factsheets and the rebalance logs live there, and members join a daily Google Meet with me.

      New to RupeeCase? [Getting started](/getting-started) [See the terminal](/terminal)

        [Sign up for RupeeCase](https://invest.rupeecase.com/signup)
        [Join the WhatsApp group](https://forms.gle/C6HMtM1Z2GfeocQV7)

      [One form, one group](https://forms.gle/C6HMtM1Z2GfeocQV7)Scan with your phone camera

SSources

## Go to the source.
11 sources, NSE the most cited

The publisher of each source listed below. Source: Module 18.3 source list.
1. [NSE, list of underlyings with futures and options, and lot sizes](https://www.nseindia.com/products-services/equity-derivatives-list-underlyings-information) NSE
2. [NSE, lot sizes of equity derivatives (fo_mktlots)](https://nsearchives.nseindia.com/content/fo/fo_mktlots.csv) NSE
3. [NSE, securities transaction tax on equity derivatives](https://www.nseindia.com/static/products-services/equity-derivatives-securities-transaction-tax) NSE
4. [NSE circular NSE/FATAX/73524, STT rates from 1 Apr 2026](https://nsearchives.nseindia.com/content/circulars/FATAX73524.pdf) NSE
5. [NSE Indices, Nifty 50](https://niftyindices.com/indices/equity/broad-based-indices/nifty-50) NSE
6. [NSE Indices, Nifty Bank](https://www.niftyindices.com/indices/equity/sectoral-indices/nifty-bank) NSE
7. [SEBI Investor, Understanding derivatives](https://investor.sebi.gov.in/understanding_derivatives.html) SEBI
8. [NISM, Series VIII Equity Derivatives certification examination](https://www.nism.ac.in/revamp-nism/equity-derivatives/) NISM
9. [Engle, R. and Granger, C. (1987), Co-integration and error correction, Econometrica](https://doi.org/10.2307/1913236) Paper
10. [Gatev, E., Goetzmann, W. and Rouwenhorst, K. (2006), Pairs trading: performance of a relative value arbitrage rule, Review of Financial Studies](https://ideas.repec.org/a/oup/rfinst/v19y2006i3p797-827.html) Paper
11. Chan, E., Algorithmic Trading, Wiley Book

GTerms

## 6 terms from this module.
Pair tradeOne leg long and a related leg short, in proportion, to bet on the gap between them and not on the market.
SpreadThe first log price less the hedge ratio times the second, less a constant. It is the gap a pair trade bets on.
Hedge ratioThe slope from regressing one log price on the other. It says how much of the second leg is held against the first.
CointegrationTwo prices whose spread stays near a home level, even though each wanders. Correlation of changes does not show it.
Z scoreThe spread less its average, divided by its usual size. It says how far the gap has strayed in usual sizes.
Half lifeThe number of sessions the spread takes to close half its distance from home. A long one means no practical trade.
[All 230 terms in the glossary](/learn/glossary)

[Question people askWhat is pair trading, and is there an NSE pair trading stock list?A short answer with a dated chart](/learn/questions/what-is-pair-trading)[Question people askCointegration or correlation: what is the difference?A short answer with a dated chart](/learn/questions/cointegration-vs-correlation)[Related module18.7 Cointegration toolkit: Engle Granger, ADF, half life and z score10 min, Advanced](/learn/path-18/module-18-7-cointegration-toolkit)[Related module18.8 Pair trading with Indian stock futures10 min, Advanced](/learn/path-18/module-18-8-pair-trading-with-stock-futures)[Pillar guideDerivatives and Quant115 modules across paths 12 to 19](/learn/derivatives)

Education only, not investment advice, a research report or a recommendation to buy, sell or hold any security. RupeeCase (QC Alpha Technologies Pvt Ltd) is not registered with SEBI as an investment adviser or research analyst. Contracts and prices shown are for illustration only, come from NSE end of day files at least 30 days old, and are not recommendatory. Derivatives trading carries a high risk of loss.
