Municipal Market Financial Model Analyzer — CLI + Streamlit dashboard for investment analysis on East Africa market revitalization projects (ICLEI Africa MAP Capstone)
# MMFM Analyzer
**Municipal Market Financial Model Analyzer** — MBA MAP Capstone
> A CLI + web dashboard for scenario analysis, sensitivity testing, Monte Carlo simulation, and AI-powered narrative generation on municipal market revitalization investments across East Africa.
Built as the analytical engine for a MAP capstone project evaluating investment readiness across market sites in Sub-Saharan Africa. Field data covers Kenya, Tanzania, Malawi, Zambia, and Mozambique.
---
## Live Dashboard
**Open the dashboard →**
Or run locally:
```bash
streamlit run src/mmfm/app.py
```
### Using the Dashboard
The sidebar is the primary input surface — configure your market, then explore results across five tabs.
**Sidebar — five sections:**
| Section | What to set |
|---|---|
| **Revenue Model** | Pick a model: *Simple* (occupancy × stall rent), *Facility Types* (lock-ups / stalls / pitches with per-type utilisation and collection rates), *Produce Market* (wholesale commission), or *Combined*. Set unit counts, rents, and occupancy targets. |
| **Capital Costs** | Total CapEx, construction schedule, grant amount, contingency %. Toggle ❄️ Cold Storage and ☀️ Solar PV modules with unit/kW counts. Net CapEx shown live. |
| **Operating Costs** | Fixed annual OpEx (with escalation %) or % of Revenue (set personnel / operations / R&M / finance-admin splits). |
| **Financing** | Simple (enter annual debt service directly) or Structured Debt (senior tranche + concessional tranche; annual payment auto-calculated via annuity formula). |
| **Market Parameters** | Discount rate, projection horizon, inflation rate. |
**Five tabs:**
1. **Portfolio** — Side-by-side comparison of the five MAP demo markets; MIRI / governance / DSCR rankings.
2. **Scenarios** — Base / Optimistic / Pessimistic results for your configured market. NPV, IRR, payback, DSCR, operating margin table. Scenario cash flow chart.
3. **Sensitivity** — Tornado chart ranking the seven highest-impact variables by …