InfraRisk Lab โ Infrastructure Project Finance Risk Platform for Africa & Middle East. Features SC-PD credit model, stress testing, Monte Carlo simulation, debt structuring, and interactive dashboard. Built with Python, Streamlit, and ML models.
# ๐๏ธ InfraRisk Lab
**Infrastructure Project Finance Risk Platform โ Africa & Middle East**
> A dual-domain AI system combining supply chain analytics with infrastructure project finance, modelling credit risk, debt structuring, and stress testing for DFI-backed projects.
---
## ๐ Overview
InfraRisk Lab is a comprehensive platform for **infrastructure project finance risk analysis**, covering 8 flagship projects across Nigeria, Kenya, Morocco, Ethiopia, Saudi Arabia, Ghana, Egypt, and the UAE.
### Key Capabilities
| Module | Description |
|--------|-------------|
| ๐ **Portfolio Dashboard** | Live deal registry with sector & geographic concentration |
| ๐งฎ **SC-PD Credit Model** | Supply-Chain Adjusted Probability of Default |
| ๐ฐ **Debt Structuring** | Senior / Mezzanine / Equity tranche optimizer |
| โก **Stress Testing** | 7 deterministic scenarios ร all projects |
| ๐ฒ **Monte Carlo** | P10/P50/P90 DSCR distribution with breach probability |
| ๐ค **ML Models** | Logistic Regression + XGBoost credit classifiers |
---
## ๐ Quick Start
### Prerequisites
```bash
pip install -r requirements.txt
```
### Run the Interactive Dashboard
```bash
streamlit run streamlit_app/app.py
```
### Generate Data
```bash
cd data
python generate_data.py
```
### Run Credit Model
```bash
cd models
python credit_model.py
```
### Open Notebooks
```bash
jupyter notebook notebooks/
```
---
## ๐ Project Structure
```
infrarisk-lab/
โโโ README.md
โโโ requirements.txt
โ
โโโ data/
โ โโโ generate_data.py # Synthetic data generator
โ โโโ output/
โ โโโ portfolio.csv # 8-project portfolio
โ โโโ cashflows.csv # Annual cash flow projections
โ โโโ risk_register.csv # Project risk registers
โ โโโ monte_carlo.csv # Monte Carlo simulation results
โ
โโโ models/
โ โโโ credit_model.py # SC-PD model + ML classifiers
โ
โโโ notebooks/
โ โโโ 01_portfolio_analysis.ipynb # Portfolio EDA & visualization
โ โโโ 02_credi โฆ