ARDL + ML forecasting of agricultural value added in Benin (1970-2024)
# πΎ Agricultural Value Added Forecasting β Benin (1970β2024)
> Code and data accompanying the working paper **"Forecasting Beyond the Test Set: The Missing-Future-Regressor Problem in a Small-Sample Hybrid ARDLβMachine Learning Study of Agricultural Value Added in Benin."**
---
## π Table of contents
- Overview
- Repository structure
- Data sources
- Methodology
- Reproduce the results
- Results summary
- Citation
- License
- Contact
---
## π Overview
This repository contains the full data-processing and modeling pipeline used to study the climatic and economic determinants of agricultural value added (AVA) in Benin over 1970β2024, and to compare the forecasting performance of an ARDL error-correction model against classical time-series benchmarks (ARIMA, ETS) and machine learning models (gradient boosting, random forest, SVM-RBF, KNN, decision tree) validated by leave-one-out cross-validation.
The central question addressed is what happens to each of these models' forecasts once they are extended **beyond** the historical test window, into a period for which the values of every explanatory variable are unknown β the *missing-future-regressor problem*.
---
## ποΈ Repository structure
```
.
βββ pipeline_complet_analyse.py # Full analysis pipeline (data β results)
βββ base_VA_agri_Benin_1970_2024.csv # Compiled dataset, 1970β2024
βββ figures/ # Figures generated by the pipeline
βββ tableaux/ # Tables generated by the pipeline
βββ requirements.txt # Python dependencies
βββ LICENSE # MIT license
βββ README.md
```
---
## π Data sources
| Source | Variables | Frequency |
|---|---|---|
| World Bank β World Development Indicators (WDI) | GDP per capita, trade openness, private credit, connectivity, AVA/GDP, net FDI | Annual |
| NASA POWER | Precipitation (total + anomaly vs. 1981β2010 baseline) | Monthly β aggregated annual |
| NOAA β Climate Prediction Cente β¦