Skip to main content

Detecting Mean-Reverted Patterns in Algorithmic Pairs Trading

  • Conference paper
  • First Online:
Mathematical Methodologies in Pattern Recognition and Machine Learning

Part of the book series: Springer Proceedings in Mathematics & Statistics ((PROMS,volume 30))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 109.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Cowles, A., Jones, H.E.: Some a posteriori probabilities in stock market action. Econometrica 5, 280–294 (1937)

    Article  Google Scholar 

  2. Elliott, R., Van Der Hoek, J., Malcolm, W.: Pairs trading. Quant. Finance 5, 271–276 (2005)

    Article  MATH  Google Scholar 

  3. Gatev, E., Goetzmann, W.N., Rouwenhorst, K.G.: Pairs trading: Performance of a relative-value arbitrage rule. Rev. Financ. Stud. 19, 797–827 (2006)

    Article  Google Scholar 

  4. Haykin, S.: Adaptive Filter Theory, 4th edn. Prentice Hall, Englewood Cliffs (2001)

    Google Scholar 

  5. Lowenstein, R.: When Genius Failed: The Rise and Fall of Long-Term Capital Management. Random House, New York (2000)

    Google Scholar 

  6. Malik, M.B.: State-space recursive least-squares with adaptive memory. Signal Process. 86, 1365–1374 (2006)

    Article  MATH  Google Scholar 

  7. 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)

    Google Scholar 

  8. Montana, G., Triantafyllopoulos, K., Tsagaris, T.: Flexible least squares for temporal data mining and statistical arbitrage. Expert Syst. Appl. 36, 2819–2830 (2009)

    Article  Google Scholar 

  9. Pole, A.: Statistical Arbitrage. Algorithmic Trading Insights and Techniques. Wiley, New Jersey (2007)

    Google Scholar 

  10. Pryor, M.: The Financial Spread Betting Handbook. Harriman, Petersfield, Great Britain (2007)

    Google Scholar 

  11. 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)

    Article  Google Scholar 

  12. Triantafyllopoulos, K., Montana, G.: Dynamic modeling of mean-reverting spreads for statistical arbitrage. Comput. Manag. Sci. 8, 23–49 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  13. Vidyamurthy, G.: Pairs Trading. Wiley, New Jersey (2004)

    Google Scholar 

  14. Zhang, H., Zhang, Q.: Trading a mean reverting asset: buy low and sell high. Automatica, 44, 1511–1518 (2008)

    Article  Google Scholar 

Download references

Acknowledgements

The paper has benefitted from discussions with Jeremy Oakley.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to K. Triantafyllopoulos .

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics