<p>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.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

LSTM-based detection of adaptive market dynamics in Morocco

  • Lamiae Saghiri,
  • Achraf Louati

摘要

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.