Kalman Filtering for Pairs Trading

Bachelor Thesis (2025)
Author(s)

K.J. Kho (TU Delft - Electrical Engineering, Mathematics and Computer Science)

Contributor(s)

R.C. Kraaij – Mentor (TU Delft - Applied Probability)

M. Vittorietti – Graduation committee member (TU Delft - Statistics)

Faculty
Electrical Engineering, Mathematics and Computer Science
More Info
expand_more
Publication Year
2025
Language
English
Graduation Date
11-09-2025
Awarding Institution
Delft University of Technology
Programme
['Applied Mathematics']
Faculty
Electrical Engineering, Mathematics and Computer Science
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

Abstract

This thesis explores the application of Kalman filtering techniques to enhance pairs trading strategies in financial markets. Pairs trading is a statistical arbitrage strategy that exploits temporary price divergences between historically correlated assets by taking opposite positions with the expectation of mean reversion. The study addresses a fundamental challenge in pairs trading: accurately modeling the underlying spread dynamics in the presence of market noise. The research implements a state-space model framework where the observed spread between asset prices is treated as a noisy measurement of a mean-reverting process. A default Kalman filter is applied to estimate the true underlying spread by filtering out market noise, with the goal of generating more reliable trading signals. To optimize the Kalman filter’s performance, the ExpectationMaximization (EM) algorithm is employed to estimate the model’s latent parameters, including process noise and observation noise covariances. The methodology is tested on a cryptocurrency pair (Ethereum-NEO) identified from existing literature using the distance method for pair selection, covering the period from January 2018 to December 2019. To test the performance of Kalman filtering three approaches are compared: trading on unfiltered spreads, trading on Kalman-filtered spreads with default parameters, and trading on spreads filtered using EM-optimized parameters. The empirical results reveal several key findings. Surprisingly, the unfiltered spread strategy initially outperformed the default Kalman filter approach, generating $725.73 in profits across 4 trades compared to $523.95 across 3 trades for the filtered approach. However, when EM optimization was applied, the Kalman filter strategy achieved the highest performance with $750.83 in profits across 4 trades. A notable discovery is that the estimated state transition coefficient consistently converged to 1, indicating random walk behavior rather than the expected mean-reverting dynamics. This suggests that the theoretical assumption of mean reversion may not always align with empirical data, highlighting the importance of model validation in quantitative finance applications. The study demonstrates that while Kalman filtering can enhance pairs trading strategies, parameter optimization through EM is crucial for achieving superior performance. The research contributes to the understanding of noise reduction techniques in financial time series and provides insights into the practical challenges of implementing statistical arbitrage strategies. Future work could explore larger asset universes, explicit mean-reversion constraints, and the incorporation of transaction costs and risk management considerations.

Files

License info not available