Machine Learning-Based Crisis Detection Framework for Banking Systems: A Case Study of Nigeria
Ntanganedzeni Mandiwana, Thakhani Ravele, Caston Sigauke, Rendani NetshikwetaBanking crises are a persistent threat to macroeconomic stability in emerging markets, where conventional econometric monitoring frameworks often fail to capture non-linear macro-financial relationships. This paper examines whether machine learning algorithms can improve the detection of banking crisis risk in Nigeria compared to standard logistic regression. We compare the performance of Random Forest, Support Vector Machine (SVM), and Extreme Gradient Boosting (XGBoost) against logistic regression using annual data from the African Financial Crises dataset (1954–2014). Resampling is only implemented on the training set to overcome the infrequency of crisis events. Performance on models is assessed based on accuracy, precision, recall, F1-score, and the area under the receiver operating characteristic curve (AUC) in a rigorous out-of-time validation setting. Our findings indicate that tree-based ensemble models outperform logistic regression on the test set: XGBoost achieves the best generalization performance (AUC = 1.0; F1 = 0.95 in non-crisis, 0.80 in crisis), whereas Random Forest has the highest cross-validated F1-score on the training set. The most important variables are exchange rate volatility, inflation, and indicators of systemic crisis. The most significant crisis indicators are, however, seen in crisis years, which means that the annual data do not provide much lead-time to detect the crisis. These results should be taken with caution because of the small sample size and the limited number of crisis observations during the test period. Altogether, machine learning models have potential as additional tools to monitor banking crises in Nigeria, though at the moment they are not fully operational as policy instruments.