Two index levels drift apart for weeks, so a hedge ratio fitted once goes stale

Two index levels drift apart for weeks, so a hedge ratio fitted once goes staleUpper panel: Nifty 50: from 100 at 1 Jul 2025 to 91 at 15 Sep 2026, high 103 at 2 Jan 2026, low 87 at 30 Mar 2026. Nifty Bank: from 100 at 1 Jul 2025 to 97 at 15 Sep 2026, high 107 at 18 Feb 2026, low 87 at 30 Mar 2026. Lower panel: z-score of the spread, with 27 readings beyond 2 standard deviations.Both rebased to 100 at the startNifty 50Nifty Bank9095100105z score of the spread, in standard deviations01−12−2Jul 2025OctJan 2026AprJul
Nifty 50 and Bank Nifty closes, and the z score of their log spread on a rolling window of about three months. The window is the sample a fixed fit would use, not a filter. Source: NSE end of day data, computed by RupeeCase. As of 15 Sep 2026.

The chart puts the Nifty 50 and Bank Nifty closes side by side from 1 Jul 2025 to 15 Sep 2026, with the z score of their log spread below. Two index levels can drift apart for weeks, and the z score shows how far a spread sits from its recent average.

A pair trade needs a hedge ratio: how many units of one leg offset one unit of the other. The usual method fits a straight line on a past window and reads its slope as the ratio. That ratio stays fixed until the next fit, so it goes stale when the true relationship moves.

A Kalman filter treats the ratio as a value that moves over time. Each new price updates the estimate, with a weight that depends on how noisy the data are compared with the moves in the ratio. The result is a ratio that adapts a little on every observation.

The filter does not settle whether the pair works. A filter fitted on the full sample looks good by construction. Cointegration found on one window often fails on the next, so the test must run forward on data each date would have had, with every rebalance costed.

In India a short cash leg is hard to hold overnight, so both legs are usually futures. Lot sizes make the ratio lumpy, and a ban on new positions can block one leg. Each of these changes the model before the filter runs. This page teaches the method and describes no trade.

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