Interactive Streamlit dashboard for forecasting Zambia's inflation using ARIMAX, XGBoost, Prophet, and LSTM models. Features real-time economic data integration, model benchmarking, interactive visualizations, and multi-year inflation forecasts.
# 📊 Zambia Inflation Forecasting App
An interactive **Streamlit dashboard** for forecasting Zambia's annual inflation rate using a hybrid ensemble of four machine learning and statistical models — **ARIMAX**, **XGBoost**, **Facebook Prophet**, and **LSTM**. The app integrates real-time macroeconomic data from the World Bank API and Yahoo Finance, enabling data-driven inflation analysis and multi-year forward forecasting.
---
## 🗂️ Table of Contents
- Overview
- Features
- Models
- Data Sources
- Project Structure
- Installation
- Usage
- Model Results
- Key Insights
- Author
---
## 🔍 Overview
Zambia's inflation rate is influenced by a complex interplay of macroeconomic variables — particularly the **USD/ZMW exchange rate** and **copper commodity prices**, given the country's reliance on copper exports. This project builds a rigorous forecasting pipeline that:
1. Pulls live economic data from the **World Bank API** and **Yahoo Finance**
2. Performs **Exploratory Data Analysis (EDA)**, stationarity testing, and feature engineering
3. Trains and evaluates four distinct forecasting models
4. Benchmarks all models on RMSE, MAE, and MAPE
5. Generates a **3-year forward inflation forecast (2025–2027)** using the best-performing model
6. Presents all results through an **interactive Streamlit dashboard**
---
## ✨ Features
- 📡 **Real-time data integration** — live pulls from World Bank API and Yahoo Finance
- 🤖 **Four forecasting models** — statistical, machine learning, and deep learning approaches
- 📈 **Interactive visualizations** — time series plots, confidence intervals, model overlays
- 🏆 **Automated model benchmarking** — ranked comparison across RMSE, MAE, and MAPE
- 🔭 **Multi-year forward forecasting** — 3-year inflation outlook with 95% confidence bands
- 🧪 **Stationarity testing** — Augmented Dickey-Fuller (ADF) tests with automatic differencing
- 📊 **Feature importance analysis** — XGBoost feature contribution breakdown
---
## 🤖 Models
| Model …