Forecasting Municipal Financial Distress in South Africa: A Machine Learning Approach
Persistent fiscal stress in South African municipalities undermines service delivery, yet practical tools for early detection remain limited. This study predicts one-year-ahead municipal financial distress to support risk-based prioritisation. We develop machine learning models using a 2018/19–2022/23 municipality panel, combining 13 financial health indicators from State of Local Government (SoLG) reports with selected socio-economic variables. Penalised logistic regression is benchmarked against random forest and XGBoost under a leakage-aware, time-ordered split into training, validation, and an out-of-time test year; class imbalance is handled through class weighting. Performance is evaluated using PR-AUC, ROC-AUC, calibration, and a capacity-constrained Top-30 rule. All models outperform a naïve last-year baseline on the out-of-time test (PR-AUC 0.934–0.954; ROC-AUC 0.886–0.923), with bootstrap intervals supporting robustness. Random forest performs best overall, while penalised logistic regression remains competitive. Under the Top-30 rule (12.3% workload), precision is high (precision@30 0.967–1.000) while recall is modest (recall@30 0.186–0.192). SHAP values and logistic odds ratios identify liquidity, solvency, cash coverage, and employment deprivation as key drivers. The Top-30 rule corresponds to an annual intensive monitoring portfolio that is reasonable under constrained staffing and budget capacity in national and provincial oversight units, while probability thresholds are reported as conventional benchmarks rather than as policy triggers.
Publication Details
- Journal
- Forecasting
- Published
- 2026-02-14
- DOI
- https://doi.org/10.3390/forecast8010018
- Primary Topic
- Fiscal Policies and Political Economy
- Type
- article
- Field-Weighted Citation Impact
- 0.00