LSTM-based detection of adaptive market dynamics in Morocco

Read full text
Authors: Lamiae Saghiri, Achraf Louati
Cited by: 1
References: 49

Abstract

This study examines market adaptability in the Moroccan stock market from 2013 to 2025 within the adaptive market hypothesis (AMH) framework using long short-term memory (LSTM) networks. Daily Moroccan All Shares Index (MASI) returns are modeled jointly with macrofinancial variables, and changes in market conditions are identified through the time variation of out-of-sample forecasting errors as indicators of regime dynamics. The LSTM outperforms a historical-mean benchmark during relatively stable periods RMSE (0.0064 vs. 0.0085) and MAE (0.0044 vs. 0.0055), consistent with its ability to learn gradual shifts in the return–environment relationship. However, predictive performance deteriorates during abrupt shocks (e.g., COVID-19 and the Russia–Ukraine war), highlighting limits to real-time learning under extreme uncertainty. An adaptive retraining mechanism partially reduces postshock error volatility, although its effectiveness is context dependent. Complementary nonparametric tests provide additional evidence of time-varying regimes. Methodologically, the paper proposes a data-driven, nonparametric framework to detect regime dynamics without imposing ex ante break assumptions. Overall, the findings provide evidence consistent with the AMH and offer implications for investors and policymakers in volatile emerging markets.

Fields of Study & Subjects

Stock Market Forecasting Methods Complex Systems and Time Series Analysis Market Dynamics and Volatility

Publication details

Journal / source
Financial Innovation
Publisher
Springer Science and Business Media LLC
Volume
12
Issue
1
Publication date
13 July 2026
Language
EN