Probabilistic forecasting of the Zambian Kwacha (2010–2024): trend–volatility decomposition, quantile regression, and a feature-importance test of what really drives the currency.
# Zambia Exchange Rate Forecasting
Probabilistic forecasting of the Zambian Kwacha (ZMW/USD), 2010–2024, using a trend–volatility decomposition and quantile regression — and a direct test of whether copper prices or foreign exchange reserves actually drive the currency.
## What this project does
Most commentary on the Kwacha treats copper prices as the main driver. This project tests that claim against 15 years of monthly data using a feature-importance analysis across six macroeconomic variables, then builds a probabilistic forecasting model — one that reports a range of plausible outcomes rather than a single guessed number — and is explicit about where that model succeeds and where it doesn't.
**Key finding:** foreign exchange reserves, not copper prices, are the strongest single driver of Kwacha movements in this data — accounting for roughly half the explained variation in a multivariate analysis.
**Key limitation:** the model's forecast intervals remain miscalibrated specifically on the upside, particularly during the 2022–2024 period of historically unprecedented depreciation. Two targeted fixes were tested; neither fully closed the gap. This is treated as a finding in itself, not swept under the rug.
## Methodology
1. **Data collection** — exchange rate (Bank of Zambia), inflation (Central Statistical Office Zambia), FX reserves (IMF), copper production and electricity generation (Zambia Data Portal), and copper price / US Fed Funds rate / oil price (FRED).
2. **Exploratory analysis** — distributional properties of the exchange rate, a live side-by-side test of a misleading candidate variable (electricity generation) before excluding it, and a Random Forest feature-importance ranking.
3. **Trend–volatility decomposition** — the exchange rate is split into a trend component and a time-varying volatility component, rather than treated as having one constant level of risk throughout.
4. **Probabilistic forecasting** — Gradient Boosting quantile regressio …