IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2603.19136.html

Adaptive Regime-Aware Stock Price Prediction Using Autoencoder-Gated Dual Node Transformers with Reinforcement Learning Control

Author

Listed:
  • Mohammad Al Ridhawi
  • Mahtab Haj Ali
  • Hussein Al Osman

Abstract

Stock markets exhibit regime-dependent behavior where prediction models optimized for stable conditions often fail during volatile periods. Existing approaches typically treat all market states uniformly or require manual regime labeling, which is expensive and quickly becomes stale as market dynamics evolve. This paper introduces an adaptive prediction framework that adaptively identifies deviations from normal market conditions and routes data through specialized prediction pathways. The architecture consists of three components: (1) an autoencoder trained on normal market conditions that identifies anomalous regimes through reconstruction error, (2) dual node transformer networks specialized for stable and event-driven market conditions respectively, and (3) a Soft Actor-Critic reinforcement learning controller that adaptively tunes the regime detection threshold and pathway blending weights based on prediction performance feedback. The reinforcement learning component enables the system to learn adaptive regime boundaries, defining anomalies as market states where standard prediction approaches fail. Experiments on 20 S&P 500 stocks spanning 1982 to 2025 demonstrate that the proposed framework achieves 0.68% mean absolute percentage error (MAPE) for one-day predictions without the reinforcement controller and 0.59% MAPE with the full adaptive system, compared to 0.80% for the baseline integrated node transformer. Directional accuracy reaches 72% with the complete framework. The system maintains robust performance during high-volatility periods, with MAPE below 0.85% when baseline models exceed 1.5%. Ablation studies confirm that each component contributes meaningfully: autoencoder routing accounts for 36% relative MAPE degradation upon removal, followed by the SAC controller at 15% and the dual-path architecture at 7%.

Suggested Citation

  • Mohammad Al Ridhawi & Mahtab Haj Ali & Hussein Al Osman, 2026. "Adaptive Regime-Aware Stock Price Prediction Using Autoencoder-Gated Dual Node Transformers with Reinforcement Learning Control," Papers 2603.19136, arXiv.org, revised Apr 2026.
  • Handle: RePEc:arx:papers:2603.19136
    as

    Download full text from publisher

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

    References listed on IDEAS

    as
    1. 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.
    2. Vladimir N. Vapnik, 1995. "The Nature of Statistical Learning Theory," Springer Books, Springer, number 978-1-4757-2440-0, January.
    3. Wei Bao & Jun Yue & Yulei Rao, 2017. "A deep learning framework for financial time series using stacked autoencoders and long-short term memory," PLOS ONE, Public Library of Science, vol. 12(7), pages 1-24, July.
    4. Guidolin, Massimo & Timmermann, Allan, 2007. "Asset allocation under multivariate regime switching," Journal of Economic Dynamics and Control, Elsevier, vol. 31(11), pages 3503-3544, 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. Aloui, Chaker & Hammoudeh, Shawkat & Hamida, Hela Ben, 2015. "Price discovery and regime shift behavior in the relationship between sharia stocks and sukuk: A two-state Markov switching analysis," Pacific-Basin Finance Journal, Elsevier, vol. 34(C), pages 121-135.
    2. Umut Ugurlu & Ilkay Oksuz & Oktay Tas, 2018. "Electricity Price Forecasting Using Recurrent Neural Networks," Energies, MDPI, vol. 11(5), pages 1-23, May.
    3. Yizhan Shu & Chenyu Yu & John M. Mulvey, 2024. "Downside Risk Reduction Using Regime-Switching Signals: A Statistical Jump Model Approach," Papers 2402.05272, arXiv.org, revised Sep 2024.
    4. Bernardi, Mauro & Catania, Leopoldo, 2018. "Portfolio optimisation under flexible dynamic dependence modelling," Journal of Empirical Finance, Elsevier, vol. 48(C), pages 1-18.
    5. Massimo Guidolin, Mingwei (Max) Liang, Milena Petrova, 2026. "The Importance of Considering Regimes in Long-term Asset Allocation to Real Estate," BAFFI CAREFIN Working Papers 26263, BAFFI CAREFIN, Centre for Applied Research on International Markets Banking Finance and Regulation, Universita' Bocconi, Milano, Italy.
    6. Hematizadeh, Roksana & Tajaddini, Reza, 2024. "A state-dependent international CAPM for partially integrated markets: Using local and US risk factors," Global Finance Journal, Elsevier, vol. 62(C).
    7. Yiyao Zhang & Diksha Goel & Hussain Ahmad & Claudia Szabo, 2025. "RegimeFolio: A Regime Aware ML System for Sectoral Portfolio Optimization in Dynamic Markets," Papers 2510.14986, arXiv.org.
    8. Klaus Grobys, 2011. "Are Different National Stock Markets Driven by the Same Stochastic Hidden Variable?," The Review of Finance and Banking, Academia de Studii Economice din Bucuresti, Romania / Facultatea de Finante, Asigurari, Banci si Burse de Valori / Catedra de Finante, vol. 3(1), pages 021-030, June.
    9. Yousefi, Hamed & Najand, Mohammad, 2022. "Geographical diversification using ETFs: Multinational evidence from COVID-19 pandemic," International Review of Financial Analysis, Elsevier, vol. 83(C).
    10. 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.
    11. Chen, Ping & Yam, S.C.P., 2013. "Optimal proportional reinsurance and investment with regime-switching for mean–variance insurers," Insurance: Mathematics and Economics, Elsevier, vol. 53(3), pages 871-883.
    12. Jieting Chen & Yuichiro Kawaguchi, 2018. "Multi-Factor Asset-Pricing Models under Markov Regime Switches: Evidence from the Chinese Stock Market," IJFS, MDPI, vol. 6(2), pages 1-19, May.
    13. Donatien Hainaut & Franck Moraux, 2019. "A switching self-exciting jump diffusion process for stock prices," Annals of Finance, Springer, vol. 15(2), pages 267-306, June.
    14. Kim Hiang Liow & Qing Ye, 2018. "Regime dependent volatilities and correlation in international securitized real estate markets," Empirica, Springer;Austrian Institute for Economic Research;Austrian Economic Association, vol. 45(3), pages 457-487, August.
    15. Bahaa Aly, Tarek, 2026. "Global Economic Cycles Unveiled: A Hybrid TCN-HMM Approach for Regime Dynamics Across Eight Nations," MPRA Paper 127574, University Library of Munich, Germany.
    16. Poshakwale, Sunil S. & Mandal, Anandadeep, 2016. "Determinants of asymmetric return comovements of gold and other financial assets," International Review of Financial Analysis, Elsevier, vol. 47(C), pages 229-242.
    17. Dias, José G. & Ramos, Sofia B., 2013. "A core–periphery framework in stock markets of the euro zone," Economic Modelling, Elsevier, vol. 35(C), pages 320-329.
    18. Dichtl, Hubert & Drobetz, Wolfgang & Neuhierl, Andreas & Wendt, Viktoria-Sophie, 2021. "Data snooping in equity premium prediction," International Journal of Forecasting, Elsevier, vol. 37(1), pages 72-94.
    19. Salam Rabindrajit Luwang & Buddha Nath Sharma & Kundan Mukhia & Md. Nurujjaman & Anish Rai & Filippo Petroni & Luis E. C. Rocha, 2026. "Regime Discovery and Intra-Regime Return Dynamics in Global Equity Markets," Papers 2601.08571, arXiv.org.
    20. Mendes, Fernando Henrique de Paula e Silva & Caldeira, João Frois & Moura, Guilherme Valle, 2018. "Evidence of Bull and Bear Markets in the Bovespa index: An application of Markovian regime-switching Models with Duration Dependence," Brazilian Review of Econometrics, Sociedade Brasileira de Econometria - SBE, vol. 38(1), May.

    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:2603.19136. 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.