This study aims to identify the context-dependent optimal machine learning (ML) model for forecasting Tunisia’s bank stock price index during the Revolution and COVID-19 crises, and uses SHapley Additive exPlanations (SHAP) analysis to uncover distinct, crisis-specific price drivers.
The author evaluates eight ML models, including regularization techniques (Lasso, Ridge, Elastic Net), tree-based methods (Random Forest, eXtreme Gradient Boosting), Support Vector Regression and deep learning architectures (Long Short-Term Memory, Gated Recurrent Unit [GRU]), using five standard metrics. Model robustness is validated through statistical, economic and temporal stability tests. Finally, the author apply mean SHAP analysis to top performers to identify key predictors and supplemented by a feature stability analysis.
The analysis reveals a clear performance hierarchy contingent on crisis typology. Specifically, the GRU model achieved superior predictive accuracy during the high-volatility COVID-19 period, whereas Ridge regression demonstrated greater robustness during the prolonged political instability of the Revolution. SHAP interpretability confirmed that short-term moving averages dominated predictions during the pandemic, reflecting a market driven by momentum, while the Revolution period involved a more balanced reassessment of persistent risks, which Ridge’s regularization effectively revealed.
The findings provide market participants with a decisive, crisis-contingent forecasting rule. Specifically, a GRU model driven by technical indicators is recommended for fast-moving global crises like a pandemic, while a shift to a Ridge regression model is warranted during periods of protracted political instability to leverage its stability.
To the best of the authors’ knowledge, this study presents the first comparative ML analysis of the Tunisian banking sector across two fundamentally different crises, the Revolution that sparked the Arab Spring and the COVID-19 pandemic, using SHAP analysis to uncover crisis-specific financial drivers complemented by several robustness checks.
