IDEAS home Printed from https://ideas.repec.org/a/eee/intfor/v42y2026i2p474-491.html

The Bayesian context trees state space model for time series modelling and forecasting

Author

Listed:
  • Papageorgiou, Ioannis
  • Kontoyiannis, Ioannis

Abstract

A hierarchical Bayesian framework is introduced for developing tree-based mixture models for time series, motivated in part by applications in finance and forecasting. At the top level, meaningful discrete states are identified as appropriately quantised values of some of the most recent samples. At the bottom level, a different, arbitrary ‘base’ model is associated with each state. This defines a very general framework that can be used in conjunction with any existing model class to build flexible and interpretable mixture models. We refer to this as the Bayesian Context Trees State Space Model, also known as the BCT-X framework. Appropriate algorithmic tools are described, which allow for effective and efficient Bayesian inference and learning; these algorithms can be updated sequentially, facilitating online forecasting. The utility of the general framework is illustrated in specific instances where AR or ARCH models serve as the base models. The latter results in a mixture model that offers a powerful way of modelling the well-known volatility asymmetries in financial data, revealing a novel, important feature of stock market index data, in the form of an enhanced leverage effect. In forecasting, the BCT-X methods are found to outperform several state-of-the-art techniques, both in terms of accuracy and computational requirements.

Suggested Citation

  • Papageorgiou, Ioannis & Kontoyiannis, Ioannis, 2026. "The Bayesian context trees state space model for time series modelling and forecasting," International Journal of Forecasting, Elsevier, vol. 42(2), pages 474-491.
  • Handle: RePEc:eee:intfor:v:42:y:2026:i:2:p:474-491
    DOI: 10.1016/j.ijforecast.2025.07.009
    as

    Download full text from publisher

    File URL: http://www.sciencedirect.com/science/article/pii/S0169207025000688
    Download Restriction: Full text for ScienceDirect subscribers only

    File URL: https://libkey.io/10.1016/j.ijforecast.2025.07.009?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to

    for a different version of it.

    References listed on IDEAS

    as
    1. Ioannis Kontoyiannis & Lambros Mertzanis & Athina Panotopoulou & Ioannis Papageorgiou & Maria Skoularidou, 2022. "Bayesian context trees: Modelling and exact inference for discrete time series," Journal of the Royal Statistical Society Series B, Royal Statistical Society, vol. 84(4), pages 1287-1323, September.
    2. Geweke, John & Amisano, Gianni, 2010. "Comparing and evaluating Bayesian predictive distributions of asset returns," International Journal of Forecasting, Elsevier, vol. 26(2), pages 216-230, April.
    3. Francesco Audrino & Peter Bühlmann, 2001. "Tree‐structured generalized autoregressive conditional heteroscedastic models," Journal of the Royal Statistical Society Series B, Royal Statistical Society, vol. 63(4), pages 727-744.
    4. Nesreen Ahmed & Amir Atiya & Neamat El Gayar & Hisham El-Shishiny, 2010. "An Empirical Comparison of Machine Learning Models for Time Series Forecasting," Econometric Reviews, Taylor & Francis Journals, vol. 29(5-6), pages 594-621.
    5. Vrontos, I D & Dellaportas, P & Politis, D N, 2000. "Full Bayesian Inference for GARCH and EGARCH Models," Journal of Business & Economic Statistics, American Statistical Association, vol. 18(2), pages 187-198, April.
    6. Markus Haas, 2004. "A New Approach to Markov-Switching GARCH Models," Journal of Financial Econometrics, Oxford University Press, vol. 2(4), pages 493-530.
    7. 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.
    8. Glosten, Lawrence R & Jagannathan, Ravi & Runkle, David E, 1993. "On the Relation between the Expected Value and the Volatility of the Nominal Excess Return on Stocks," Journal of Finance, American Finance Association, vol. 48(5), pages 1779-1801, December.
    9. Audrone Virbickaite & M. Concepción Ausín & Pedro Galeano, 2015. "Bayesian Inference Methods For Univariate And Multivariate Garch Models: A Survey," Journal of Economic Surveys, Wiley Blackwell, vol. 29(1), pages 76-96, February.
    10. Bollerslev, Tim, 1986. "Generalized autoregressive conditional heteroskedasticity," Journal of Econometrics, Elsevier, vol. 31(3), pages 307-327, April.
    11. Potter, Simon M, 1995. "A Nonlinear Approach to US GNP," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 10(2), pages 109-125, April-Jun.
    12. Neil Shephard & Torben G. Andersen, 2009. "Stochastic Volatility: Origins and Overview," Springer Books, in: Thomas Mikosch & Jens-Peter Kreiß & Richard A. Davis & Torben Gustav Andersen (ed.), Handbook of Financial Time Series, chapter 10, pages 233-254, Springer.
    13. Salinas, David & Flunkert, Valentin & Gasthaus, Jan & Januschowski, Tim, 2020. "DeepAR: Probabilistic forecasting with autoregressive recurrent networks," International Journal of Forecasting, Elsevier, vol. 36(3), pages 1181-1191.
    14. Makridakis, Spyros & Spiliotis, Evangelos & Assimakopoulos, Vassilios, 2018. "The M4 Competition: Results, findings, conclusion and way forward," International Journal of Forecasting, Elsevier, vol. 34(4), pages 802-808.
    15. N. Friel & A. N. Pettitt, 2008. "Marginal likelihood estimation via power posteriors," Journal of the Royal Statistical Society Series B, Royal Statistical Society, vol. 70(3), pages 589-607, July.
    16. Mario Forni & Marc Hallin & Marco Lippi & Lucrezia Reichlin, 2000. "The Generalized Dynamic-Factor Model: Identification And Estimation," The Review of Economics and Statistics, MIT Press, vol. 82(4), pages 540-554, November.
    17. Wei-Yin Loh, 2014. "Fifty Years of Classification and Regression Trees," International Statistical Review, International Statistical Institute, vol. 82(3), pages 329-348, December.
    18. C. S. Wong & W. K. Li, 2000. "On a mixture autoregressive model," Journal of the Royal Statistical Society Series B, Royal Statistical Society, vol. 62(1), pages 95-115.
    19. Philip Rothman, 1998. "Forecasting Asymmetric Unemployment Rates," The Review of Economics and Statistics, MIT Press, vol. 80(1), pages 164-168, February.
    20. Durbin, James & Koopman, Siem Jan, 2012. "Time Series Analysis by State Space Methods," OUP Catalogue, Oxford University Press, edition 2, number 9780199641178.
    21. Engle, Robert F, 1982. "Autoregressive Conditional Heteroscedasticity with Estimates of the Variance of United Kingdom Inflation," Econometrica, Econometric Society, vol. 50(4), pages 987-1007, July.
    22. Koop, Gary & Potter, Simon M, 1999. "Dynamic Asymmetries in U.S. Unemployment," Journal of Business & Economic Statistics, American Statistical Association, vol. 17(3), pages 298-312, July.
    23. Nelson, Daniel B, 1991. "Conditional Heteroskedasticity in Asset Returns: A New Approach," Econometrica, Econometric Society, vol. 59(2), pages 347-370, March.
    24. Christophe Andrieu & Arnaud Doucet & Roman Holenstein, 2010. "Particle Markov chain Monte Carlo methods," Journal of the Royal Statistical Society Series B, Royal Statistical Society, vol. 72(3), pages 269-342, June.
    25. Taddy, Matthew A. & Gramacy, Robert B. & Polson, Nicholas G., 2011. "Dynamic Trees for Learning and Design," Journal of the American Statistical Association, American Statistical Association, vol. 106(493), pages 109-123.
    26. Zakoian, Jean-Michel, 1994. "Threshold heteroskedastic models," Journal of Economic Dynamics and Control, Elsevier, vol. 18(5), pages 931-955, September.
    27. Chib S. & Jeliazkov I., 2001. "Marginal Likelihood From the Metropolis-Hastings Output," Journal of the American Statistical Association, American Statistical Association, vol. 96, pages 270-281, March.
    28. I. D. Vrontos & P. Dellaportas & D. N. Politis, 2003. "A full-factor multivariate GARCH model," Econometrics Journal, Royal Economic Society, vol. 6(2), pages 312-334, December.
    29. Hyndman, Rob J. & Khandakar, Yeasmin, 2008. "Automatic Time Series Forecasting: The forecast Package for R," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 27(i03).
    30. Darjus Hosszejni & Gregor Kastner, 2019. "Modeling Univariate and Multivariate Stochastic Volatility in R with stochvol and factorstochvol," Papers 1906.12123, arXiv.org, revised Feb 2021.
    31. Spyros Makridakis & Evangelos Spiliotis & Vassilios Assimakopoulos, 2018. "Statistical and Machine Learning forecasting methods: Concerns and ways forward," PLOS ONE, Public Library of Science, vol. 13(3), pages 1-26, March.
    32. Zhang, Guoqiang & Eddy Patuwo, B. & Y. Hu, Michael, 1998. "Forecasting with artificial neural networks:: The state of the art," International Journal of Forecasting, Elsevier, vol. 14(1), pages 35-62, March.
    33. Stock, James H & Watson, Mark W, 2002. "Macroeconomic Forecasting Using Diffusion Indexes," Journal of Business & Economic Statistics, American Statistical Association, vol. 20(2), pages 147-162, April.
    34. Kourentzes, Nikolaos & Athanasopoulos, George, 2019. "Cross-temporal coherent forecasts for Australian tourism," Annals of Tourism Research, Elsevier, vol. 75(C), pages 393-409.
    35. Koning, Alex J. & Franses, Philip Hans & Hibon, Michele & Stekler, H.O., 2005. "The M3 competition: Statistical tests of the results," International Journal of Forecasting, Elsevier, vol. 21(3), pages 397-409.
    36. P. Dellaportas & I. D. Vrontos, 2007. "Modelling volatility asymmetries: a Bayesian analysis of a class of tree structured multivariate GARCH models," Econometrics Journal, Royal Economic Society, vol. 10(3), pages 503-520, November.
    Full references (including those not matched with items on IDEAS)

    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. Ioannis Papageorgiou & Ioannis Kontoyiannis, 2023. "The Bayesian Context Trees State Space Model for time series modelling and forecasting," Papers 2308.00913, arXiv.org, revised Aug 2025.
    2. Petropoulos, Fotios & Apiletti, Daniele & Assimakopoulos, Vassilios & Babai, Mohamed Zied & Barrow, Devon K. & Ben Taieb, Souhaib & Bergmeir, Christoph & Bessa, Ricardo J. & Bijak, Jakub & Boylan, Joh, 2022. "Forecasting: theory and practice," International Journal of Forecasting, Elsevier, vol. 38(3), pages 705-871.
      • Fotios Petropoulos & Daniele Apiletti & Vassilios Assimakopoulos & Mohamed Zied Babai & Devon K. Barrow & Souhaib Ben Taieb & Christoph Bergmeir & Ricardo J. Bessa & Jakub Bijak & John E. Boylan & Jet, 2020. "Forecasting: theory and practice," Papers 2012.03854, arXiv.org, revised Jan 2022.
    3. Audrone Virbickaite & M. Concepción Ausín & Pedro Galeano, 2015. "Bayesian Inference Methods For Univariate And Multivariate Garch Models: A Survey," Journal of Economic Surveys, Wiley Blackwell, vol. 29(1), pages 76-96, February.
    4. Bauwens, L. & Hafner C. & Laurent, S., 2011. "Volatility Models," LIDAM Discussion Papers ISBA 2011044, Université catholique de Louvain, Institute of Statistics, Biostatistics and Actuarial Sciences (ISBA).
      • BAUWENS, Luc & HAFNER, Christian & LAURENT, Sébastien, 2011. "Volatility models," LIDAM Discussion Papers CORE 2011058, Université catholique de Louvain, Center for Operations Research and Econometrics (CORE).
      • Bauwens, L. & Hafner, C. & Laurent, S., 2012. "Volatility Models," LIDAM Reprints ISBA 2012028, Université catholique de Louvain, Institute of Statistics, Biostatistics and Actuarial Sciences (ISBA).
    5. Ardia, David & Bluteau, Keven & Boudt, Kris & Catania, Leopoldo, 2018. "Forecasting risk with Markov-switching GARCH models:A large-scale performance study," International Journal of Forecasting, Elsevier, vol. 34(4), pages 733-747.
    6. Yuzhi Cai, 2021. "Estimating expected shortfall using a quantile function model," International Journal of Finance & Economics, John Wiley & Sons, Ltd., vol. 26(3), pages 4332-4360, July.
    7. Franses,Philip Hans & Dijk,Dick van & Opschoor,Anne, 2014. "Time Series Models for Business and Economic Forecasting," Cambridge Books, Cambridge University Press, number 9780521817707.
    8. Oscar V. De la Torre-Torres & Evaristo Galeana-Figueroa & José Álvarez-García, 2019. "A Test of Using Markov-Switching GARCH Models in Oil and Natural Gas Trading," Energies, MDPI, vol. 13(1), pages 1-24, December.
    9. Ataurima Arellano, Miguel & Rodríguez, Gabriel, 2020. "Empirical modeling of high-income and emerging stock and Forex market return volatility using Markov-switching GARCH models," The North American Journal of Economics and Finance, Elsevier, vol. 52(C).
    10. Luc Bauwens & Sébastien Laurent & Jeroen V. K. Rombouts, 2006. "Multivariate GARCH models: a survey," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 21(1), pages 79-109, January.
    11. Pedro Nielsen Rotta & Pedro L. Valls Pereira, 2016. "Analysis of contagion from the dynamic conditional correlation model with Markov Regime switching," Applied Economics, Taylor & Francis Journals, vol. 48(25), pages 2367-2382, May.
    12. Liu, Chen & Wang, Chao & Tran, Minh-Ngoc & Kohn, Robert, 2025. "A long short-term memory enhanced realized conditional heteroskedasticity model," Economic Modelling, Elsevier, vol. 142(C).
    13. Sebastián Cano-Berlanga & José-Manuel Giménez-Gómez, 2018. "On Chinese stock markets: How have they evolved over time?," Annals of Operations Research, Springer, vol. 266(1), pages 499-510, July.
    14. Abdinardo Moreira Barreto Oliveira & Anandadeep Mandal & Gabriel J. Power, 2024. "Impact of COVID-19 on Stock Indices Volatility: Long-Memory Persistence, Structural Breaks, or Both?," Annals of Data Science, Springer, vol. 11(2), pages 619-646, April.
    15. Floros, Ch., 2005. "Forecasting the UK Unemployment Rate: Model Comparisons," International Journal of Applied Econometrics and Quantitative Studies, Euro-American Association of Economic Development, vol. 2(4), pages 57-72.
    16. Deschamps, Philippe J., 2011. "Bayesian estimation of an extended local scale stochastic volatility model," Journal of Econometrics, Elsevier, vol. 162(2), pages 369-382, June.
    17. Caldeira, João F & Moura, Guilherme Valle & Santos, André Alves Portela, 2013. "Seleção de carteiras utilizando o modelo Fama-French-Carhart," Revista Brasileira de Economia - RBE, EPGE Brazilian School of Economics and Finance - FGV EPGE (Brazil), vol. 67(1), April.
    18. Carl H. Korkpoe & Peterson Owusu Junior, 2018. "Behaviour of Johannesburg Stock Exchange All Share Index Returns - An Asymmetric GARCH and News Impact Effects Approach," SPOUDAI Journal of Economics and Business, SPOUDAI Journal of Economics and Business, University of Piraeus, vol. 68(1), pages 26-42, January-M.
    19. Qiang Xia & Heung Wong & Jinshan Liu & Rubing Liang, 2017. "Bayesian Analysis of Power-Transformed and Threshold GARCH Models: A Griddy-Gibbs Sampler Approach," Computational Economics, Springer;Society for Computational Economics, vol. 50(3), pages 353-372, October.
    20. Weron, Rafał, 2014. "Electricity price forecasting: A review of the state-of-the-art with a look into the future," International Journal of Forecasting, Elsevier, vol. 30(4), pages 1030-1081.

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;

    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:eee:intfor:v:42:y:2026:i:2:p:474-491. 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: Catherine Liu (email available below). General contact details of provider: http://www.elsevier.com/locate/ijforecast .

    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.