IDEAS home Printed from https://ideas.repec.org/a/eee/phsmap/v678y2025ics0378437125005217.html

Recurrent neural networks for hierarchical time series forecasting: An application to the S&P 500 market value

Author

Listed:
  • Munyao, Jackson Ndoto
  • Oluoch, Lillian Achola
  • Iftikhar, Hasnain
  • Rodrigues, Paulo Canas

Abstract

This paper investigates the use of Recurrent Neural Networks (RNNs), specifically Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) architectures, for hierarchical time series forecasting in financial markets. Using market value data from the top 70 companies in the S&P 500 index, we evaluate forecasts across three hierarchical levels: company, sector, and market total, applying various reconciliation strategies to ensure coherence. The proposed framework is compared with traditional models (Autoregressive Integrated Moving Average and Exponential Smoothing) under multiple reconciliation methods, including Middle-Out with forecast proportions. Results show that RNN-based models outperform statistical benchmarks in terms of accuracy across levels, particularly when combined with Middle-Out reconciliation. We also discuss practical aspects such as computational cost and implementation trade-offs, highlighting the relevance of deep learning methods for structured financial forecasting tasks.

Suggested Citation

  • Munyao, Jackson Ndoto & Oluoch, Lillian Achola & Iftikhar, Hasnain & Rodrigues, Paulo Canas, 2025. "Recurrent neural networks for hierarchical time series forecasting: An application to the S&P 500 market value," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 678(C).
  • Handle: RePEc:eee:phsmap:v:678:y:2025:i:c:s0378437125005217
    DOI: 10.1016/j.physa.2025.130869
    as

    Download full text from publisher

    File URL: http://www.sciencedirect.com/science/article/pii/S0378437125005217
    Download Restriction: Full text for ScienceDirect subscribers only. Journal offers the option of making the article available online on Science direct for a fee of $3,000

    File URL: https://libkey.io/10.1016/j.physa.2025.130869?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. Peter R. Winters, 1960. "Forecasting Sales by Exponentially Weighted Moving Averages," Management Science, INFORMS, vol. 6(3), pages 324-342, April.
    2. Sulandari, Winita & Subanar, & Lee, Muhammad Hisyam & Rodrigues, Paulo Canas, 2020. "Indonesian electricity load forecasting using singular spectrum analysis, fuzzy systems and neural networks," Energy, Elsevier, vol. 190(C).
    3. Ana Caroline Pinheiro & Paulo Canas Rodrigues, 2024. "Hierarchical Time Series Forecasting of Fire Spots in Brazil: A Comprehensive Approach," Stats, MDPI, vol. 7(3), pages 1-24, June.
    4. Tiago Silveira Gontijo & Marcelo Azevedo Costa, 2020. "Forecasting Hierarchical Time Series in Power Generation," Energies, MDPI, vol. 13(14), pages 1-17, July.
    5. Gianluca Bontempi & Souhaib Ben Taieb & Yann-Aël Le Borgne, 2013. "Machine learning strategies for time series forecasting," ULB Institutional Repository 2013/167761, ULB -- Universite Libre de Bruxelles.
    6. Liu, Zhenkun & Jiang, Ping & Zhang, Lifang & Niu, Xinsong, 2020. "A combined forecasting model for time series: Application to short-term wind speed forecasting," Applied Energy, Elsevier, vol. 259(C).
    7. Evangelos Spiliotis & Fotios Petropoulos & Vassilios Assimakopoulos, 2019. "Improving the forecasting performance of temporal hierarchies," PLOS ONE, Public Library of Science, vol. 14(10), pages 1-21, October.
    8. Kinney, Wr, 1971. "Predicting Earnings - Entity Versus Subentity Data," Journal of Accounting Research, John Wiley & Sons, Ltd., vol. 9(1), pages 127-136.
    9. Natalia Roszyk & Robert 'Slepaczuk, 2024. "The Hybrid Forecast of S&P 500 Volatility ensembled from VIX, GARCH and LSTM models," Papers 2407.16780, arXiv.org.
    10. Pagnottoni, Paolo & Spelta, Alessandro, 2024. "Hedging global currency risk: A dynamic machine learning approach," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 649(C).
    11. Chowdhury, Reaz & Rahman, M. Arifur & Rahman, M. Sohel & Mahdy, M.R.C., 2020. "An approach to predict and forecast the price of constituents and index of cryptocurrency using machine learning," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 551(C).
    12. Kamil Kashif & Robert 'Slepaczuk, 2024. "LSTM-ARIMA as a Hybrid Approach in Algorithmic Investment Strategies," Papers 2406.18206, arXiv.org.
    13. Shu, Min & Zhu, Wei, 2020. "Real-time prediction of Bitcoin bubble crashes," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 548(C).
    14. Gangqiang Li & Huaizhi Wang & Shengli Zhang & Jiantao Xin & Huichuan Liu, 2019. "Recurrent Neural Networks Based Photovoltaic Power Forecasting Approach," Energies, MDPI, vol. 12(13), pages 1-17, July.
    15. Wang, Kejun & Qi, Xiaoxia & Liu, Hongda, 2019. "Photovoltaic power forecasting based LSTM-Convolutional Network," Energy, Elsevier, vol. 189(C).
    16. Athanasopoulos, George & Hyndman, Rob J. & Kourentzes, Nikolaos & Petropoulos, Fotios, 2017. "Forecasting with temporal hierarchies," European Journal of Operational Research, Elsevier, vol. 262(1), pages 60-74.
    17. Zhang, Xu & Yang, Xian & He, Qizhi, 2022. "Multi-scale systemic risk and spillover networks of commodity markets in the bullish and bearish regimes," The North American Journal of Economics and Finance, Elsevier, vol. 62(C).
    18. Shang, Han Lin & Haberman, Steven, 2017. "Grouped multivariate and functional time series forecasting:An application to annuity pricing," Insurance: Mathematics and Economics, Elsevier, vol. 75(C), pages 166-179.
    19. Qiang Chen & Yu Han & Ying Huang & George J Jiang, 2025. "Jump Risk Implicit in Options Market," Journal of Financial Econometrics, Oxford University Press, vol. 23(2), pages 9-47.
    20. Zellner, Arnold & Tobias, Justin, 1998. "A Note on Aggregation, Disaggregation and Forecasting Performance," CUDARE Working Papers 198677, University of California, Berkeley, Department of Agricultural and Resource Economics.
    21. Moiz Qureshi & Hasnain Iftikhar & Paulo Canas Rodrigues & Mohd Ziaur Rehman & S. A. Atif Salar, 2024. "Statistical Modeling to Improve Time Series Forecasting Using Machine Learning, Time Series, and Hybrid Models: A Case Study of Bitcoin Price Forecasting," Mathematics, MDPI, vol. 12(23), pages 1-15, November.
    22. Dong, Xiao & Yu, Mingzhe, 2024. "Time-varying effects of macro shocks on cross-border capital flows in China's bond market," International Review of Economics & Finance, Elsevier, vol. 96(PC).
    23. Athanasopoulos, George & Ahmed, Roman A. & Hyndman, Rob J., 2009. "Hierarchical forecasts for Australian domestic tourism," International Journal of Forecasting, Elsevier, vol. 25(1), pages 146-166.
    24. Chengzhao, Zhang & Heping, Pan & Yu, Ma & Xun, Huang, 2019. "Analysis of Asia Pacific stock markets with a novel multiscale model," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 534(C).
    25. Widiarta, Handik & Viswanathan, S. & Piplani, Rajesh, 2009. "Forecasting aggregate demand: An analytical evaluation of top-down versus bottom-up forecasting in a production planning framework," International Journal of Production Economics, Elsevier, vol. 118(1), pages 87-94, March.
    26. Zheng, Tian & Salganik, Matthew J. & Gelman, Andrew, 2006. "How Many People Do You Know in Prison?: Using Overdispersion in Count Data to Estimate Social Structure in Networks," Journal of the American Statistical Association, American Statistical Association, vol. 101, pages 409-423, June.
    27. Davydenko, Andrey & Fildes, Robert, 2013. "Measuring forecasting accuracy: The case of judgmental adjustments to SKU-level demand forecasts," International Journal of Forecasting, Elsevier, vol. 29(3), pages 510-522.
    28. Hewamalage, Hansika & Bergmeir, Christoph & Bandara, Kasun, 2021. "Recurrent Neural Networks for Time Series Forecasting: Current status and future directions," International Journal of Forecasting, Elsevier, vol. 37(1), pages 388-427.
    29. Hasnain Iftikhar & Faridoon Khan & Paulo Canas Rodrigues & Abdulmajeed Atiah Alharbi & Jeza Allohibi, 2025. "Forecasting of Inflation Based on Univariate and Multivariate Time Series Models: An Empirical Application," Mathematics, MDPI, vol. 13(7), pages 1-18, March.
    30. Hyndman, Rob J. & Ahmed, Roman A. & Athanasopoulos, George & Shang, Han Lin, 2011. "Optimal combination forecasts for hierarchical time series," Computational Statistics & Data Analysis, Elsevier, vol. 55(9), pages 2579-2589, September.
    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. Athanasopoulos, George & Hyndman, Rob J. & Kourentzes, Nikolaos & Panagiotelis, Anastasios, 2024. "Forecast reconciliation: A review," International Journal of Forecasting, Elsevier, vol. 40(2), pages 430-456.
    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. Lila, Maurício Franca & Meira, Erick & Cyrino Oliveira, Fernando Luiz, 2022. "Forecasting unemployment in Brazil: A robust reconciliation approach using hierarchical data," Socio-Economic Planning Sciences, Elsevier, vol. 82(PB).
    4. Spiliotis, Evangelos & Petropoulos, Fotios & Kourentzes, Nikolaos & Assimakopoulos, Vassilios, 2020. "Cross-temporal aggregation: Improving the forecast accuracy of hierarchical electricity consumption," Applied Energy, Elsevier, vol. 261(C).
    5. Hollyman, Ross & Petropoulos, Fotios & Tipping, Michael E., 2021. "Understanding forecast reconciliation," European Journal of Operational Research, Elsevier, vol. 294(1), pages 149-160.
    6. Di Fonzo, Tommaso & Girolimetto, Daniele, 2024. "Forecast combination-based forecast reconciliation: Insights and extensions," International Journal of Forecasting, Elsevier, vol. 40(2), pages 490-514.
    7. Li, Han & Hyndman, Rob J., 2021. "Assessing mortality inequality in the U.S.: What can be said about the future?," Insurance: Mathematics and Economics, Elsevier, vol. 99(C), pages 152-162.
    8. Kourentzes, Nikolaos & Athanasopoulos, George, 2021. "Elucidate structure in intermittent demand series," European Journal of Operational Research, Elsevier, vol. 288(1), pages 141-152.
    9. Sbrana, Giacomo & Silvestrini, Andrea, 2013. "Forecasting aggregate demand: Analytical comparison of top-down and bottom-up approaches in a multivariate exponential smoothing framework," International Journal of Production Economics, Elsevier, vol. 146(1), pages 185-198.
    10. Li, Han & Chen, Hua, 2024. "Hierarchical mortality forecasting with EVT tails: An application to solvency capital requirement," International Journal of Forecasting, Elsevier, vol. 40(2), pages 549-563.
    11. Pritularga, Kandrika F. & Svetunkov, Ivan & Kourentzes, Nikolaos, 2021. "Stochastic coherency in forecast reconciliation," International Journal of Production Economics, Elsevier, vol. 240(C).
    12. Panagiotelis, Anastasios & Gamakumara, Puwasala & Athanasopoulos, George & Hyndman, Rob J., 2023. "Probabilistic forecast reconciliation: Properties, evaluation and score optimisation," European Journal of Operational Research, Elsevier, vol. 306(2), pages 693-706.
    13. Han Lin Shang, 2017. "Reconciling Forecasts of Infant Mortality Rates at National and Sub-National Levels: Grouped Time-Series Methods," Population Research and Policy Review, Springer;Southern Demographic Association (SDA), vol. 36(1), pages 55-84, February.
    14. Sonaxy Mohanty & Airi Shimamura & Charles D. Nicholson & Andrés D. González & Talayeh Razzaghi, 2025. "Hierarchical Time Series Forecasting of COVID-19 Cases Using County-Level Clustering Data," SN Operations Research Forum, Springer, vol. 6(1), pages 1-28, March.
    15. Kourentzes, Nikolaos & Athanasopoulos, George, 2019. "Cross-temporal coherent forecasts for Australian tourism," Annals of Tourism Research, Elsevier, vol. 75(C), pages 393-409.
    16. Spiliotis, Evangelos & Petropoulos, Fotios & Kourentzes, Nikolaos & Assimakopoulos, Vassilios, 2018. "Cross-temporal aggregation: Improving the forecast accuracy of hierarchical electricity consumption," MPRA Paper 91762, University Library of Munich, Germany.
    17. Leprince, Julien & Madsen, Henrik & Møller, Jan Kloppenborg & Zeiler, Wim, 2023. "Hierarchical learning, forecasting coherent spatio-temporal individual and aggregated building loads," Applied Energy, Elsevier, vol. 348(C).
    18. Wang, Yun & Duan, Xiaocong & Zhang, Fan & Wu, Guang & Zou, Runmin & Wan, Jie & Hu, Qinghua, 2025. "MFFDM-WLS: A multi-granularity feature-based coherent forecasting method for temporal hierarchical wind speed time series," Applied Energy, Elsevier, vol. 400(C).
    19. Kafa, Nadine & Babai, M. Zied & Klibi, Walid, 2025. "Forecasting mail flow: A hierarchical approach for enhanced societal wellbeing," International Journal of Forecasting, Elsevier, vol. 41(1), pages 51-65.
    20. Silva, Felipe L.C. & Souza, Reinaldo C. & Cyrino Oliveira, Fernando L. & Lourenco, Plutarcho M. & Calili, Rodrigo F., 2018. "A bottom-up methodology for long term electricity consumption forecasting of an industrial sector - Application to pulp and paper sector in Brazil," Energy, Elsevier, vol. 144(C), pages 1107-1118.

    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:phsmap:v:678:y:2025:i:c:s0378437125005217. 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.journals.elsevier.com/physica-a-statistical-mechpplications/ .

    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.