Back to Journals

An Explainable Machine Learning Framework for Inflation Forecasting in Nigeria: A Comparative Study of XGBoost, SARIMAX, and Hybrid SARIMAX-XGBoost

Metadata

Code:JOSSDA:202612.00003

Authors:M. U. Alhaji,M. M. Mustapha,A. Usman

Category:Time Series

Publication date:2026-09-28

Keywords:inflationxgboostsarimaxexplainability

Abstract

Inflation forecasting is essential for monetary policy formulation, business planning, and economic resilience. Accurate and interpretable forecasting models can support evidence-based economic decision-making in developing economies such as Nigeria. This study develops and evaluates an explainable inflation-forecasting framework for Nigeria using monthly inflation, broad Money Supply (M2), and exchange rate data spanning January 2004 to April 2021. Three forecasting approaches were compared: SARIMAX, XGBoost, and a Hybrid SARIMAX-XGBoost model. The model performance was assessed using Mean Absolute Error (MAE), Root Mean Square Error (RMSE), Mean Absolute Percentage Error (MAPE), Directional Accuracy, and the Diebold-Mariano test. SHAP explainability analysis and an ablation study were also conducted to identify the most influential predictors. XGBoost achieved the best forecasting performance, with an RMSE of 0.7253 and MAPE of 5.16%, outperforming both SARIMAX and the Hybrid model. The Hybrid model performed similarly to SARIMAX, which indicates limited benefit from residual correction. SHAP analysis showed that the lagged inflation variables were the strongest predictors, while money supply (M2) was the most influential macroeconomic factor. Removing lagged inflation variables increased the RMSE from 0.7253 to 4.6507 and the MAPE from 5.16% to 36.15%. The findings show that explainable machine learning provides accurate short-term inflation forecasts and meaningful insights into inflation dynamics. Inflation persistence is the dominant driver of forecasting performance, while money supply contributes to predictive accuracy, supporting economic planning and policy decision-making in Nigeria.

How to cite

M. U. Alhaji, M. M. Mustapha, A. Usman (2026). An Explainable Machine Learning Framework for Inflation Forecasting in Nigeria: A Comparative Study of XGBoost, SARIMAX, and Hybrid SARIMAX-XGBoost. Journal of Statistical Sciences and Data Analytics. https://jossda.com.ng/journals/jossda.202612.00003

Full Paper
Loading PDF viewer...