---
title: "Pair Lab: Hedge Ratio, ADF, Half Life, Z Score | RupeeCase"
description: "Free pair lab on dated NSE Nifty and Nifty Bank closes: hedge ratio, ADF test, half life, z score bands, a held out split and whole lot rounding."
source_url: "https://www.rupeecase.com/learn/tools/pair-lab"
---

* Hedge ratio (log slope)**1.07**Rs of Nifty per Rs of Nifty Bank, fitted on the first 180 sessions
* ADF, fitted span**−0.67**Engle Granger 5% value −3.34: does not pass
* Half life**123.0 sessions**of the spread, fitted span
* ADF, held out span**−1.08**same ratio and intercept held fixed

**Nifty Bank regressed on Nifty, 300 sessions from 1 Jul 2025 to 15 Sep 2026.** The ratio and intercept were fitted on the first 180 sessions, to 19 Mar 2026, then held fixed over the last 120 sessions. Refitting on the held out span alone moves the ratio from 1.07 to 1.37 (+28.4%). The spread passes the 5% value on neither span.

|  | Fitted | Held out | Held out, refit |
| --- | --- | --- | --- |
| Sessions | 180 | 120 | 120 |
| Hedge ratio | 1.07 | 1.07 | 1.37 |
| ADF statistic | −0.67 | −1.08 | −0.73 |
| Half life, sessions | 123.0 | 23.1 | 32.4 |
| Readings beyond 2 z | 1 (4%) | 1 (38%) | n/a |
| Back through zero | 0 of 1 | 0 of 1 | n/a |
| Largest z | 2.38 | 2.77 | n/a |

Held out holds the ratio and intercept of the fitted span; held out, refit estimates them again on the held out sessions alone. Readings beyond the band are counted with the share of sessions they cover. The z score is the spread less the fitted span's mean, over the fitted span's standard deviation, so the held out span is judged with only what was known at the split. A reading beyond 2 z that later crosses zero counts as back through zero; one still open at the end of the data does not. Few readings is a small sample, and readings in a row are not independent.

The spread is stretched on 2 occasions beyond 2 z, 1 before the split and 1 after

Upper panel: both closes rebased to 100. Lower panel: the spread in standard deviations of the fitted span, with the split after 19 Mar 2026. Source: NSE end of day index closes, computed by RupeeCase. As of 15 Sep 2026.After the split the spread reached 2.8 z and 0 of 1 stretches came back through zero

Only the held out sessions, 20 Mar 2026 to 15 Sep 2026, with the fitted ratio and intercept unchanged. Lines at zero and at plus and minus 2 z. Source: NSE end of day index closes, computed by RupeeCase. As of 15 Sep 2026.

### Whole lots: the ratio never fits exactly

| Nifty Bank lots | Nifty lots | Nifty Bank value | Nifty value | Mismatch |
| --- | --- | --- | --- | --- |
| 1 (yours) | 1 | Rs 16.7 L | Rs 15.0 L | −16.1% |
| 5 | 6 | Rs 83.7 L | Rs 90.2 L | +0.7% |
| 10 | 12 | Rs 1.67 cr | Rs 1.80 cr | +0.7% |
| 6 | 7 | Rs 1.00 cr | Rs 1.05 cr | −2.1% |
| 9 | 11 | Rs 1.51 cr | Rs 1.65 cr | +2.6% |

Value is the notional of the lots at the last close of 15 Sep 2026, in lakh (L) and crore (cr), with the lot sizes of the 2026 contracts: 65 units for Nifty and 30 units for Nifty Bank. Mismatch is the notional held in Nifty against the notional the ratio asks for. The first row is your lots; the others are the four closest whole lot pairs up to 10 lots. A mismatch is a directional exposure left in the pair, and it changes as the two prices move.

Method: logs of the two closes, ordinary least squares of y on x, the spread y less ratio times x less intercept. The ADF statistic is the Dickey Fuller test on that spread with one lagged difference, judged against Engle Granger critical values (5%: −3.34), because the ratio was estimated from the same data. Half life is minus ln 2 over ln of the AR(1) coefficient of the spread, in sessions. Two indices that share constituents are not an accident to find related; the test here asks only whether the gap kept coming back. This page cannot trade.

  Closes come from NSE index files, dated on the page. A statistical test on past data, not a signal. There are no orders and this page cannot trade.

## How to read it

### The hedge ratio

Regress the log of one close on the log of the other. The slope says how many rupees of the second leg offset one rupee of the first, to a first approximation. Swapping which index is y gives a different slope, because a regression is not symmetric.

### The test

The spread is y less slope times x less the intercept. If it keeps returning to a mean, a Dickey Fuller test on it gives a statistic below a critical value. The values used are the Engle Granger ones, because the slope was estimated from the same data, and they are stricter than the plain tables.

### The half life

Fit the spread today on the spread yesterday. A coefficient between 0 and 1 means it pulls back, and the half life is how many sessions it takes to close half of a gap. A half life much longer than the sample is not evidence of anything.

### The held out part

Everything above is estimated on the first part of the sessions only. The ratio, intercept, mean and spread of the fitted part are then carried over, unchanged, to the rest. If the relationship is real the held out spread should look like the fitted one. [The cointegration module](/learn/path-18/module-18-7-cointegration-toolkit) builds the test and [the walk forward module](/learn/path-19/module-19-7-walk-forward-testing) explains why the split matters.

## What it leaves out

Daily closes of two indices are not futures prices: a real pair would trade two futures that roll every month, with margin, costs and bid ask spreads. Both indices contain the large banks, so a link between them is expected, which is not the same as a gap that can be traded. One split is one test; changing the window and the split until the numbers look good defeats the purpose. The count of stretched readings is a count of past gaps, not a promise about the next one.

## Go to the source

1. [NSE, equity derivatives contract specifications: lot sizes of the Nifty and Nifty Bank contracts](https://www.nseindia.com/static/products-services/equity-derivatives-contract-specifications)
2. [Engle and Granger, Co-integration and error correction: representation, estimation and testing, Econometrica (1987)](https://doi.org/10.2307/1913236) paper
3. [MacKinnon, Critical values for cointegration tests, Queen's University working paper 1227 (2010)](https://www.econ.queensu.ca/sites/econ.queensu.ca/files/qed_wp_1227.pdf) paper
4. [Gatev, Goetzmann and Rouwenhorst, Pairs trading: performance of a relative value arbitrage rule, Review of Financial Studies (2006)](https://doi.org/10.1093/rfs/hhj020) paper

What does it mean when the ADF statistic is below the critical value?The test rejects the idea that the spread wanders without returning. It is evidence about the past sample, at a stated error rate, and it does not guarantee the next gap closes.

Why hold out part of the data?A ratio fitted on all the data will look good on that data by construction. Holding out the later sessions asks the fairer question of whether the ratio still worked on data it never saw.

Why can the lots never match the ratio exactly?A lot is a fixed number of units, so the notional of each leg moves in steps. The table shows the mismatch left for each whole lot pair; it also changes every time either price moves.

LLearn it in depth

[Module 18.7Cointegration toolkit: Engle Granger, ADF, half life and z scoreAdvanced, Path 18](/learn/path-18/module-18-7-cointegration-toolkit)[Module 18.8Pair trading with Indian stock futuresAdvanced, Path 18](/learn/path-18/module-18-8-pair-trading-with-stock-futures)[Module 19.7Walk forward and out of sample testingAdvanced, Path 19](/learn/path-19/module-19-7-walk-forward-testing)[ToolPayoff builderLegs from a dated chain](/learn/tools/payoff-builder)[Pillar guideDerivatives and QuantPaths 12 to 19](/learn/derivatives)

    Explore next

## Learn the idea behind the numbers.

* [CalculatorGreeks calculatorDelta to rho, and vanna to colour in expert mode, from one Black 76 engine.](/learn/tools/greeks-calculator)
* [QuestionsQuestions on futures and optionsShort answers, each with a dated chart](/learn/questions/)
* [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)
* [ToolOption payoff builderLegs on a dated Nifty chain, breakevens and charges](/learn/tools/payoff-builder)
* [PillarDerivatives and QuantFutures, options, Greeks and more, from dated NSE data](/learn/derivatives)

      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

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.
