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, builds the spread as a process with a speed, sizes the legs in whole lots, and tests the difference between correlation and cointegration on real closes. Every figure comes from NSE end of day files, dated and not live.
3By the end you can
- Write the spread as a process with a speed, and read the half life and the Dickey Fuller statistic of a spread.
- Size the legs in whole lots from the hedge ratio, and see how far the ratio moves between windows.
- Name the India rules on the short leg, stock futures settlement, the ban period, charges and margin, and why a pair is 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.
Read 2 more paragraphs, 189 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 model: a spread with a speed
Write the spread as s. The simplest model of a rope is that each session closes a fixed share of the distance to home, plus noise.
s(t+1) = phi x s(t)
+ noise
Here phi is a number below one. It is the share of the distance that survives a session. One less phi is the speed of return. The expected distance k sessions later is phi^k times today's. The time to close half the distance, the half life, follows from setting that to one half.
Half life =
ln 2 / (−ln phi)
change in s = c + g x s(t−1)
+ h x change in s(t−1)
Read 3 more paragraphs, 244 words
When phi is one the gap has no home. It wanders, with a variance that grows with time, and the average and the standard deviation used for the z score mean nothing, because they keep moving. That is a unit root, and it is the null the test works against. The Dickey Fuller step runs the regression of the change in the spread on its lagged level, and looks at the t statistic of the coefficient, which is phi less one. A coefficient far below zero rejects the unit root.
The twist for pairs is that s was built with a hedge ratio fitted to the same data. The regression picks the ratio that makes the spread as calm as it can be, so the plain Dickey Fuller tables are too kind. Engle and Granger worked out stricter critical values by simulation for this two step test. The engine behind this lesson uses the asymptotic values for two series with a constant, so a statistic must be below −3.34 to pass at five percent. A plain test would accept a much less negative number.
Three numbers describe a candidate: the statistic, the half life and the size of the spread. For this pair on the whole sample the statistic was −0.49 and the half life about 205 sessions. The size of the spread matters for the trade, the half life for the patience, and the statistic for whether there is a trade at all.
The hedge ratio, in lots
The ratio from the regression is in logs, so it is an elasticity. Nifty moved about 0.71 percent for each one percent in Bank Nifty, in the sense of this fit. The rupee value of the second leg is that ratio times the rupee value of the first. Futures trade in whole lots, so the ratio meets a grid. At the last closes of the file one Nifty lot of 65 units is worth Rs 15,02,709 and one Bank Nifty lot of 30 units Rs 16,73,843. The ratio asks for Rs 10,66,923 of Bank Nifty for each Nifty lot, which is 0.64 of a lot. The nearest whole numbers of lots are three of Nifty against two of Bank Nifty: Rs 45,08,127 against Rs 33,47,685, where the ratio asks for Rs 32,00,770. The leg is 4.6% too big, and no smaller whole combination does better.
A pair is judged on data it was not fitted on
Read 2 more paragraphs, 179 words
The ratio itself moves. Fit it on the first 150 sessions and it is 0.54. Fit it on the second 150 and it is 0.65, which is 21% higher. A trader who sized the legs on the first half and kept them carried a ratio 17% below the second half's. That is the size of the error before the pair has even started to wander.
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.
A model case: speed against cost
Model, not market data. Take a pair sized as above, three Nifty lots against two Bank Nifty lots, a spread whose usual size is 1% of the first leg, and an entry at a z of 2. A full return to home pays Rs 90,163 on the first leg. Half of it, Rs 45,081, is the target for the comparison. Two spreads, with the same size and the same entry, differ only in speed.
- A fast rope. A phi of 0.95 gives a half life of 13.5 sessions. On average the half is captured inside one monthly contract, about 21 sessions.
- The sample's rope. The pair of this lesson has a half life of about 205 sessions. Capturing half the gap takes about 10 monthly contracts.
Read one more paragraph, 122 words
A round trip, opening the pair and closing it, and each roll, pays STT of 0.05% on the legs sold, stamp duty on the legs bought and the exchange charge, SEBI fee and GST on every trade. For this lot pair a round trip or a roll comes to about Rs 4,440. The fast rope pays it once and keeps most of Rs 45,081: the cost is 10% of the gain. The slow one pays it about 10 times, Rs 44,400, which is 98% of the same gain, before the spread widens or the ratio moves. So the half life is not a detail. The same z score is worth a trade in one and nothing in the other.
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 large 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
Moving together day by day, the two still ended the stretch far apart
Fit on the first part, judge on the rest
- Formation window opens
First close in the file. The hedge ratio and the spread's average and size are fitted from here.
- Formation window ends
Everything fitted so far is frozen.
- Test window opens
The frozen ratio is carried forward on days it never saw.
- Test window ends
Last close in the file.
- Daily returns move together: yes.
- The spread stays near a home: no.
- A hedge ratio fitted early holds later: no.
Read 4 more paragraphs, 263 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.
Put rupees on the last line. The formation window's standard deviation of the spread was 1.06% of the first leg, so a gap of seven and a half of them is about 7.9% of its value. On three Nifty lots of Rs 45,08,127 that is Rs 3,56,007, the distance between where the spread started to trade and where it ended, with the ratio held still.
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
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 rules bend the trade, and each one is a cost or a limit that a paper spread does not show.
- The short leg in cash. SEBI's master circular (30 Dec 2024), chapter 1, annexure 3, lets all classes of investors short sell but does not permit naked short selling: every investor must deliver at settlement. A retail short sale in the cash market is therefore an intraday trade, and a short held overnight needs borrowed shares through the lending and borrowing scheme or a short future. Both legs are usually futures.
- Stock futures settle in shares. SEBI's circular of 31 Dec 2018 (SEBI/HO/MRD/DOPI/CIR/P/2018/161) made physical settlement mandatory for all stock derivatives, phased in by October 2019 expiries. A stock pair held to the last Tuesday of the month (NSE/FAOP/68747) ends as shares, so pair traders roll before the expiry. An index pair is cash settled.
- The ban period. A stock is banned in derivatives once its market wide future equivalent open interest passes 95% of the market wide position limit, set as the lower of 15% of the free float and 65 times the average daily delivery value (SEBI CIR/2025/79, para 5.2 for the limit and para 5.3 for the ban period). After that, trading in the scrip has to reduce the entity's open interest by the end of the day. A new leg that adds to the entity's open interest in a banned stock cannot be opened.
- Lot sizes. The ratio comes in lumps, as the three against two above shows.
- Charges. STT of 0.05% on each futures leg sold, the exchange charge, SEBI fee, GST and stamp duty on the buy side, at every open, close and roll.
- Margin. Extreme loss margin of 2% of the notional of each future, on top of SPAN, which for the three against two lots is Rs 1,57,116. NSE Clearing gives index futures on eligible pairs of indices a cross margin benefit, with spread margins of 30% of the upfront margins on the offsetting positions in the same expiry and 40% in different expiries. A pair is eligible only if the correlation between the index values over six months is above 0.90, at least 80% of the constituents of one index sit in the other, and the smaller index has at least 80% of its free float weight in the larger. The exchange tests this on the 15th of each month. I did not test any pair against it.

The short answers are on the pages for pair trading and for cointegration against correlation. The longer treatment is module A23, and the testing toolkit is in module A22.
What the research says
Engle and Granger set out the test. A set of series that each need differencing to become stationary are cointegrated if a linear combination is already stationary, which means deviations from the long run equilibrium are stationary with finite variance although the series themselves are not. They calculated the critical values of seven test statistics by simulation, and recommended one procedure. That is the stricter table used above. Gatev, Goetzmann and Rouwenhorst tested the trade itself on daily US data from 1962 to 2002: stocks matched into pairs with the minimum distance between normalised historical prices, and a simple rule, gave average annualised excess returns of up to 11% for self financing portfolios of pairs, profits that typically exceeded conservative estimates of transaction costs. They linked the profit to temporary mispricing of close substitutes and to a common factor in the returns.
Read one more paragraph, 151 words
The later evidence is less kind and more careful. Do and Faff, in a paper written to ask whether simple pairs trading still works, confirmed a continuing downward trend in profitability and found the strategy performs strongly in periods of prolonged turbulence, including the global financial crisis. Krauss reviewed over a hundred studies and sorted the approaches into five groups: distance, cointegration, time series, stochastic control and others, with a closing look at profitability in the light of market frictions. For India, Tayal and Lalitha's study of pairs on the National Stock Exchange used clustering to build the search space for pair selection and compared it with a traditional method, finding more profitable pairs that were less volatile and less exposed to the market. None of this is a forecast. The shared lesson is that the edge, where there is one, is the selection and the cost control, not the correlation.
Stretch: when the ratio moves
The ratio drifted by about a fifth between the halves of this sample. Methods that let it move are the next step: a filter that updates the ratio each session, a rolling regression, or a joint test across more than two series. Module E11 builds the filter, module E10 extends the idea to many series, and module A24 asks when a spread that has stopped coming back should be left alone.

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.
- Sizing by one lot against one lot. A Nifty lot is Rs 15,02,709 and a Bank Nifty lot Rs 16,73,843, so equal lots leave Rs 6,06,919 of the second leg against the first.
- Fitting the ratio once. It moved by 21% between the halves of the sample, which on three Nifty lots is a hedge of Rs 5,15,744 out of line.
- Ignoring the cost of a slow spread. A half life of 205 sessions meant about 10 contracts of costs, Rs 44,400, in the model case.
- Holding a stock leg into expiry. Stock futures settle in shares, and an index pair does not.
What I'd keep from this
- 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.
- A spread has a speed: the half life sets how many contracts of costs.
- The hedge ratio comes in whole lots and moves between windows.
- India: stock futures settle in shares, shorts in cash are intraday, banned stocks cannot grow.
- No NSE pair list exists. Online lists are screens on past prices.
Two terms to hold on to from 18.3
Where this section sits in module 18.3
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