---
title: "What is a Kalman filter pairs strategy | RupeeCase"
description: "A Kalman filter pairs approach updates the hedge ratio between two series after each new price, rather than fitting it once on a past window."
source_url: "https://www.rupeecase.com/learn/questions/kalman-filter-pairs"
---

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

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](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 is a Kalman filter pairs strategy?A Kalman filter pairs approach updates the hedge ratio between two series after each new price, rather than fitting it once on a past window, so it can follow a relationship that drifts. It does not make a pair stable, so the spread still needs a test that uses only the data a trader would have had at each date.

LGo deeper

## Where Learn teaches this.
[Go deeperPair trading intuition: correlation is not cointegration8 min, Intermediate](/learn/path-18/module-18-3-pair-trading-intuition)[Go deeperCointegration toolkit: Engle Granger, ADF, half life and z score10 min, Advanced](/learn/path-18/module-18-7-cointegration-toolkit)[Try itPair z score labHedge ratio, ADF test, half life and z score bands on two dated series.](/learn/tools/pair-lab)

SSources

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

The publisher of each source listed below. Source: Module undefined source list.
1. [NSE, equity derivatives contract specifications (instruments, expiry, lot size and settlement)](https://www.nseindia.com/static/products-services/equity-derivatives-contract-specifications) NSE
2. [SEBI investor education, Understanding derivatives](https://investor.sebi.gov.in/understanding_derivatives.html) SEBI

?Questions people ask

## Related questions.
[QuestionWhat is pair trading, and is there an NSE pair trading stock list?Intermediate, trap check](/learn/questions/what-is-pair-trading)[QuestionCointegration or correlation: what is the difference?Advanced](/learn/questions/cointegration-vs-correlation)[QuestionHow do I compute the half life and z score of a pair?Advanced](/learn/questions/pair-half-life-and-z-score)[QuestionHow do people pair trade in India without shorting stocks overnight?Advanced](/learn/questions/pair-trading-without-overnight-shorts)

[All 130 questions](/learn/questions/)

    Explore next

## Go deeper on this question.

* [QuestionDoes machine learning work for trading?A short answer with a dated chart](/learn/questions/does-machine-learning-work-for-trading)
* [ToolOption payoff builderLegs on a dated Nifty chain, breakevens and charges](/learn/tools/payoff-builder)
* [GlossaryInvesting glossary, 230 termsPlain word definitions, and the app’s own](/learn/glossary)

      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.
