Macroeconomic Vulnerability Forecasting for Sub-Saharan Africa
# Macroeconomic Vulnerability Forecasting — Sub-Saharan Africa
An end-to-end data science / ML project that forecasts macroeconomic
vulnerability (inflation shocks, debt distress, unemployment stress) across
20 Sub-Saharan African economies using open World Bank data, and maps how
countries' economic indicators co-move using network analysis.
This project extends prior published research on youth unemployment,
public debt sustainability, and inflation dynamics in the region, moving
from literature review to a live, reproducible ML pipeline.
**Full report:** `reports/final_report.pdf`
**Live demo:** _(add your Streamlit Cloud URL here after deploying — see below)_
## Project status
- [x] Phase 1 — Data collection pipeline
- [x] Phase 2 — EDA & feature engineering
- [x] Phase 3 — Modeling (classical ML, boosting, one-year-ahead early warning) + network analysis
- [x] Phase 4 — Dashboard + report
## Headline results
- **One-year-ahead early-warning classifier: ROC-AUC 0.85**, evaluated on
4 countries held out entirely from training (not just unseen years —
unseen *economies*).
- The composite vulnerability index independently recovers real, documented
crises without being told about any of them: Angola's post-civil-war
hyperinflation (2001-2003), Zambia's early-2000s debt distress, Malawi's
2022-2023 crisis, and **Mozambique 2016 — the exact year its hidden
sovereign-debt scandal broke.**
- SHAP interpretability confirms the model's predictions align with
standard macroeconomic theory (low reserves, current account deficits,
high inflation and lending rates all push toward "high vulnerability").
- Network analysis identifies Cameroon and Mozambique as the most
systemically connected economies in the sample by eigenvector centrality.
See `reports/final_report.pdf` for full methodology, figures, and a
discussion of limitations.
## Data currency
The pipeline always requests data through the current year — `END_YEAR` in
`src/config.py` is set dynamically (`dateti …