Abstract
This paper proposes a methodology for detecting mean-reverted segments of data streams in algorithmic pairs trading. Considering a state-space model that describes the spread (data stream) as the difference of the prices of two assets, we propose two new recursive least squares (RLS) algorithms for predicting mean-reversion of the spread in real time. The first is a combination of steepest descent RLS and Gauss–Newton RLS, for which we extend previous work by providing exact recursive equations to update the variable forgetting factor (VFF). We propose a new RLS algorithm for variable forgetting, by transforming the prediction errors into a binary process and adopting Bayesian methods for inference. The new approach is versatile as compared to more traditional RLS schemes, having the advantage of uncertainty analysis around the VFF. The methods are illustrated with real data, consisting of daily prices of Target Corporation and Walmart Stores Inc shares, over a period of 6 years. Alongside the detection of mean-reversion of the spread, we implement a simple trading strategy. The empirical results suggest that the new Bayesian approach returns are in excess of 130% cumulative profit over a period of 2 years.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Cowles, A., Jones, H.E.: Some a posteriori probabilities in stock market action. Econometrica 5, 280–294 (1937)
Elliott, R., Van Der Hoek, J., Malcolm, W.: Pairs trading. Quant. Finance 5, 271–276 (2005)
Gatev, E., Goetzmann, W.N., Rouwenhorst, K.G.: Pairs trading: Performance of a relative-value arbitrage rule. Rev. Financ. Stud. 19, 797–827 (2006)
Haykin, S.: Adaptive Filter Theory, 4th edn. Prentice Hall, Englewood Cliffs (2001)
Lowenstein, R.: When Genius Failed: The Rise and Fall of Long-Term Capital Management. Random House, New York (2000)
Malik, M.B.: State-space recursive least-squares with adaptive memory. Signal Process. 86, 1365–1374 (2006)
Montana, G., Parrella, F.: In: Learning to Trade with Incremental Support Vector Regression Experts. Lecture Notes in Artificial Intelligence, vol. 5721, pp. 591–598. Springer, Berlin (2008)
Montana, G., Triantafyllopoulos, K., Tsagaris, T.: Flexible least squares for temporal data mining and statistical arbitrage. Expert Syst. Appl. 36, 2819–2830 (2009)
Pole, A.: Statistical Arbitrage. Algorithmic Trading Insights and Techniques. Wiley, New Jersey (2007)
Pryor, M.: The Financial Spread Betting Handbook. Harriman, Petersfield, Great Britain (2007)
Song, S., Lim, J.-S., Baek, S., Sung, K.-M.: Gauss-Newton variable forgetting factor recursive least squares for time varying parameter tracking. Electron. Lett. 36, 988–990 (2000)
Triantafyllopoulos, K., Montana, G.: Dynamic modeling of mean-reverting spreads for statistical arbitrage. Comput. Manag. Sci. 8, 23–49 (2011)
Vidyamurthy, G.: Pairs Trading. Wiley, New Jersey (2004)
Zhang, H., Zhang, Q.: Trading a mean reverting asset: buy low and sell high. Automatica, 44, 1511–1518 (2008)
Acknowledgements
The paper has benefitted from discussions with Jeremy Oakley.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer Science+Business Media New York
About this paper
Cite this paper
Triantafyllopoulos, K., Han, S. (2013). Detecting Mean-Reverted Patterns in Algorithmic Pairs Trading. In: Latorre Carmona, P., Sánchez, J., Fred, A. (eds) Mathematical Methodologies in Pattern Recognition and Machine Learning. Springer Proceedings in Mathematics & Statistics, vol 30. Springer, New York, NY. https://doi.org/10.1007/978-1-4614-5076-4_9
Download citation
DOI: https://doi.org/10.1007/978-1-4614-5076-4_9
Published:
Publisher Name: Springer, New York, NY
Print ISBN: 978-1-4614-5075-7
Online ISBN: 978-1-4614-5076-4
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)