Pairs Trading Strategy for A and H Shares Based on Kalman-HMM Approach


Pairs trading
Kalman filtering
State transition
Hidden Markov model (HMM)
Cointegration relationship




Pairs trading is a statistical arbitrage strategy that takes advantage of unbalanced financial markets. A common difficulty for quantitative trading participants is the detection of market institutional changes in financial markets. In order to solve this issue, the hidden Markov model (HMM) is applied for status detection. The research objective is to use Kalman filter to predict and the hidden Markov model (HMM) to identify state transitions on the basis of screening transaction pairs with obvious co-integration relationship. This research would prove the profitability of the strategy and the ability to resist risk through the combination of these two methods with real data. The empirical results showed that compared with the traditional cointegration strategy, the holding yield increased from 1.6% to 16.2% and the maximum pullback reduced to 0.02%. Further research is required to improve trading rules.


Huang XW, Yu M, Pi DY, 2015, Pairs Trading Strategies and Financial Market Efficiency based on O-U process. Management Review, 27(1): 3-11.

Gatev E, Goetzmann WN, Rouwenhorst KG, 1999, Pairs Trading: Performance of a Relative-Value Arbitrage Rule. Working paper, Yale School of Management’s International Center for Finance.

Gatev E, Goetzmann WN, Rouwenhorst KG, 2006, Pairs Trading: Performance of a Relative-Value Arbitrage Rule. The Review of Financial Studies, 19(3): 797-827.

Huck N, Afawubo K, 2015, Pairs Trading and Selection Methods: Is Cointegration Superior?. Applied Economics, 47(6): 599-613.

Vidyamurthy G, 2004, Pairs Trading: Quantitative Methods and Analysis, John Wiley & Sons, Hoboken.

Jurek JW, Yang H, 2007, Dynamic Portfolio Selection in Arbitrage. Working paper, Harvard University.

Huck N, 2010, Pairs Trading and Outranking: The Multi-Step-Ahead Forecasting Case. European Journal of Operational Research, 207(3): 1702-1716.

Jwo DJ, Cho TS, 2007, A Practical Note on Evaluating Kalman Filter Performance Optimality and Degradation. Applied Mathematics and Computation, 193(2): 482-505.

Forney GD, 1973, The Viterbi Algorithm, in Proceedings of the IEEE 61(3), 268-278.

Li H, 2012, Statistical Learning Method, Tsinghua University Press, Beijing.

Shumway RH, Stoffer DS, 2000, Time Series Analysis and Its Applications. Studies in Informatics and Control, 9(4): 375-376.