Kalman Filtering for Dynamic Pairs-Trading Hedge Ratios
Summary
This implementation uses a Kalman filter to update the intercept and hedge ratio between two assets as each new observation arrives. It treats one asset as the response and estimates the coefficient for the other, producing a residual spread and its estimated standard deviation. The filter is described as a state-space generalization of rolling linear regression, with observation and transition covariance as key parameters.
The recorded residuals can support mean-reversion trading: the included signal method opens long or short exposure when residuals cross configurable standard-deviation thresholds and exits as they return toward the center. The document provides implementation logic and describes possible uses, but reports no backtest, performance evidence, or method for selecting covariance values. Its example begins with zero state and uses fixed covariance settings by default, so practical results depend on calibration and validation.
Key ideas
- A Kalman filter can adapt a two-asset hedge ratio and intercept as observations arrive.
- Observation and transition covariance control the filter and may be fitted through cross-validation or Autocovariance Least Squares.
- Forecast residuals and their estimated standard deviations can define threshold-based long and short signals.
- The document gives implementation details but no performance results or evidence that a particular parameter setting is effective.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.