IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2110.11848.html
   My bibliography  Save this paper

Clustering Market Regimes using the Wasserstein Distance

Author

Listed:
  • Blanka Horvath
  • Zacharia Issa
  • Aitor Muguruza

Abstract

The problem of rapid and automated detection of distinct market regimes is a topic of great interest to financial mathematicians and practitioners alike. In this paper, we outline an unsupervised learning algorithm for clustering financial time-series into a suitable number of temporal segments (market regimes). As a special case of the above, we develop a robust algorithm that automates the process of classifying market regimes. The method is robust in the sense that it does not depend on modelling assumptions of the underlying time series as our experiments with real datasets show. This method -- dubbed the Wasserstein $k$-means algorithm -- frames such a problem as one on the space of probability measures with finite $p^\text{th}$ moment, in terms of the $p$-Wasserstein distance between (empirical) distributions. We compare our WK-means approach with a more traditional clustering algorithms by studying the so-called maximum mean discrepancy scores between, and within clusters. In both cases it is shown that the WK-means algorithm vastly outperforms all considered competitor approaches. We demonstrate the performance of all approaches both in a controlled environment on synthetic data, and on real data.

Suggested Citation

  • Blanka Horvath & Zacharia Issa & Aitor Muguruza, 2021. "Clustering Market Regimes using the Wasserstein Distance," Papers 2110.11848, arXiv.org.
  • Handle: RePEc:arx:papers:2110.11848
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2110.11848
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. John M. Maheu & Thomas H. McCurdy & Yong Song, 2012. "Components of Bull and Bear Markets: Bull Corrections and Bear Rallies," Journal of Business & Economic Statistics, Taylor & Francis Journals, vol. 30(3), pages 391-403, February.
    2. Massimo Guidolin, 2011. "Markov Switching Models in Empirical Finance," Advances in Econometrics, in: Missing Data Methods: Time-Series Methods and Applications, pages 1-86, Emerald Group Publishing Limited.
    3. Lahmiri, Salim, 2016. "Clustering of Casablanca stock market based on hurst exponent estimates," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 456(C), pages 310-318.
    4. Thomas Lux & Michele Marchesi, 2000. "Volatility Clustering In Financial Markets: A Microsimulation Of Interacting Agents," International Journal of Theoretical and Applied Finance (IJTAF), World Scientific Publishing Co. Pte. Ltd., vol. 3(04), pages 675-702.
    5. R. Cont, 2001. "Empirical properties of asset returns: stylized facts and statistical issues," Quantitative Finance, Taylor & Francis Journals, vol. 1(2), pages 223-236.
    6. Pelletier, Denis, 2006. "Regime switching for dynamic correlations," Journal of Econometrics, Elsevier, vol. 131(1-2), pages 445-473.
    7. Dias, José G. & Vermunt, Jeroen K. & Ramos, Sofia, 2015. "Clustering financial time series: New insights from an extended hidden Markov model," European Journal of Operational Research, Elsevier, vol. 243(3), pages 852-864.
    8. Hamilton, James D, 1989. "A New Approach to the Economic Analysis of Nonstationary Time Series and the Business Cycle," Econometrica, Econometric Society, vol. 57(2), pages 357-384, March.
    9. Hans Buhler & Blanka Horvath & Terry Lyons & Imanol Perez Arribas & Ben Wood, 2020. "A Data-driven Market Simulator for Small Data Environments," Papers 2006.14498, arXiv.org.
    10. Blanka Horvath & Aitor Muguruza & Mehdi Tomas, 2019. "Deep Learning Volatility," Papers 1901.09647, arXiv.org, revised Aug 2019.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Yannick Limmer & Blanka Horvath, 2023. "Robust Hedging GANs," Papers 2307.02310, arXiv.org.
    2. Zacharia Issa & Blanka Horvath, 2023. "Non-parametric online market regime detection and regime clustering for multidimensional and path-dependent data structures," Papers 2306.15835, arXiv.org.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Erik Kole & Dick Dijk, 2017. "How to Identify and Forecast Bull and Bear Markets?," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 32(1), pages 120-139, January.
    2. Aliyu, Shehu Usman Rano, 2020. "What have we learnt from modelling stock returns in Nigeria: Higgledy-piggledy?," MPRA Paper 110382, University Library of Munich, Germany, revised 06 Jun 2021.
    3. Yannick Limmer & Blanka Horvath, 2023. "Robust Hedging GANs," Papers 2307.02310, arXiv.org.
    4. Constandina Koki & Stefanos Leonardos & Georgios Piliouras, 2020. "Exploring the Predictability of Cryptocurrencies via Bayesian Hidden Markov Models," Papers 2011.03741, arXiv.org, revised Dec 2020.
    5. Koki, Constandina & Leonardos, Stefanos & Piliouras, Georgios, 2022. "Exploring the predictability of cryptocurrencies via Bayesian hidden Markov models," Research in International Business and Finance, Elsevier, vol. 59(C).
    6. Hanna, Alan J., 2018. "A top-down approach to identifying bull and bear market states," International Review of Financial Analysis, Elsevier, vol. 55(C), pages 93-110.
    7. Jean-Philippe Bouchaud & Julien Kockelkoren & Marc Potters, 2006. "Random walks, liquidity molasses and critical response in financial markets," Quantitative Finance, Taylor & Francis Journals, vol. 6(2), pages 115-123.
    8. Westerhoff, Frank H. & Dieci, Roberto, 2006. "The effectiveness of Keynes-Tobin transaction taxes when heterogeneous agents can trade in different markets: A behavioral finance approach," Journal of Economic Dynamics and Control, Elsevier, vol. 30(2), pages 293-322, February.
    9. Wong, Jian Cheng & Lian, Heng & Cheong, Siew Ann, 2009. "Detecting macroeconomic phases in the Dow Jones Industrial Average time series," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 388(21), pages 4635-4645.
    10. Scheffknecht, Lukas & Geiger, Felix, 2011. "A behavioral macroeconomic model with endogenous boom-bust cycles and leverage dynamcis," FZID Discussion Papers 37-2011, University of Hohenheim, Center for Research on Innovation and Services (FZID).
    11. Jia Liu & John M. Maheu & Yong Song, 2024. "Identification and forecasting of bull and bear markets using multivariate returns," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 39(5), pages 723-745, August.
    12. Klein, A. & Urbig, D. & Kirn, S., 2008. "Who Drives the Market? Estimating a Heterogeneous Agent-based Financial Market Model Using a Neural Network Approach," MPRA Paper 14433, University Library of Munich, Germany.
    13. Donatien Hainaut & Renaud MacGilchrist, 2012. "Strategic asset allocation with switching dependence," Annals of Finance, Springer, vol. 8(1), pages 75-96, February.
    14. Collet, Jerome & Ielpo, Florian, 2018. "Sector spillovers in credit markets," Journal of Banking & Finance, Elsevier, vol. 94(C), pages 267-278.
    15. David Vidal-Tomás & Simone Alfarano, 2020. "An agent-based early warning indicator for financial market instability," Journal of Economic Interaction and Coordination, Springer;Society for Economic Science with Heterogeneous Interacting Agents, vol. 15(1), pages 49-87, January.
    16. Billio, Monica & Casarin, Roberto & Ravazzolo, Francesco & van Dijk, Herman K., 2012. "Combination schemes for turning point predictions," The Quarterly Review of Economics and Finance, Elsevier, vol. 52(4), pages 402-412.
    17. Krishnamurthy, Vikram & Leoff, Elisabeth & Sass, Jörn, 2018. "Filterbased stochastic volatility in continuous-time hidden Markov models," Econometrics and Statistics, Elsevier, vol. 6(C), pages 1-21.
    18. Fischer, Thomas & Riedler, Jesper, 2014. "Prices, debt and market structure in an agent-based model of the financial market," Journal of Economic Dynamics and Control, Elsevier, vol. 48(C), pages 95-120.
    19. Sandrine Jacob Leal & Mauro Napoletano & Andrea Roventini & Giorgio Fagiolo, 2016. "Rock around the clock: An agent-based model of low- and high-frequency trading," Journal of Evolutionary Economics, Springer, vol. 26(1), pages 49-76, March.
    20. Tedeschi, Gabriele & Recchioni, Maria Cristina & Berardi, Simone, 2019. "An approach to identifying micro behavior: How banks’ strategies influence financial cycles," Journal of Economic Behavior & Organization, Elsevier, vol. 162(C), pages 329-346.

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2110.11848. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.