Data-driven fiscal sustainability assessment framework for African economies using machine learning and predictive analytics
# 🌍 Africa Fiscal Sustainability Analysis
**Data-driven framework for assessing fiscal health in African economies using machine learning and predictive analytics**
---
## 📋 Overview
This project develops an integrated analytical framework to assess fiscal sustainability across African economies, addressing critical challenges of persistent deficits, accelerating debt, and revenue volatility.
**Key Features:**
- Multi-country fiscal data analysis (40+ African nations)
- Anomaly detection using Z-score and Isolation Forest
- Composite risk scoring framework
- Time series forecasting with scenario analysis
- Policy recommendations aligned with SDGs
---
## 🎯 Problem Statement
African economies face structural fiscal challenges:
- **Persistent deficits** exceeding -3% of GDP
- **Accelerating debt** surpassing sustainability thresholds
- **Revenue volatility** 3-5x higher in commodity-dependent economies
Traditional analysis lacks predictive capability for proactive intervention.
---
## 🔬 Methodology
### Data Sources
- World Bank Open Data
- IMF World Economic Outlook
- African Development Bank
### Key Indicators
- Fiscal Balance Ratio = (Revenue - Expenditure) / GDP
- Debt-to-GDP Ratio
- Revenue Volatility (5-year rolling std)
- Expenditure Growth Rate
### Analysis Modules
**1. Exploratory Data Analysis**
- Time series trends
- Cross-country heatmaps
- Correlation analysis
**2. Anomaly Detection**
- Statistical: Z-score method
- Machine Learning: Isolation Forest
**3. Risk Assessment**
- Composite Risk Score = 0.35×Deficit + 0.30×Debt + 0.25×Volatility + 0.10×Growth
- Risk categories: Low / Moderate / High / Critical
**4. Forecasting**
- 5-year projections
- Scenario analysis (optimistic, baseline, pessimistic)
---
## 📊 Key Findings
1. **Structural Deficit Crisis**: Majority of countries exceed -3% threshold
2. **Debt Acceleration**: Sharp increase post-2015
3. **Revenue Volatility**: Root cause identified - commodity dependence
4. **Risk Assess …