Ali Ben Mrad, Hamad Mohammad Alsowayyan
Economic forecasting of indicators, such as the Price Index, remains a challenging task due to the strong non-stationarity and nonlinearities inherent in financial and macroeconomic time series. This study uses Portugal as a case study and compares several Machine Learning (ML) models, including Linear Regression, Ridge, Lasso, Support Vector Regression (SVR), Random Forests, Multi-Layer Perceptrons (MLPs), and XGBoost, under two evaluation protocols: a traditional static split and a rolling-window approach. The results show that static evaluation leads to poor predictive performance, with R² values close to zero or negative, highlighting the limitations of conventional validations when dealing with non-stationary data. In contrast, the rolling-window approach over a five-year horizon significantly improves predictive accuracy, with XGBoost achieving R² values above 0.94, thus confirming the adaptability of this method. To ensure interpretability, the study applied SHapley Additive Explanations (SHAP) to analyze both local and global feature contributions. The findings underline the predominant role of exchange rate, inflation, and oil prices in explaining the Portuguese Price Index. Combining rolling-window learning with explainable AI (XAI), thus, provides a robust and interpretable framework for policymakers and investors to better understand economic dynamics.