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 β¦