Skip to content
Open access

Explainable Ensemble Machine Learning for Forecasting Gold Price Dynamics Using Financial Time-Series Data

Sep 2026 · Paradigma - Jurnal Komputer dan Informatika · 0 citations

Abstract

Gold is widely regarded as a protective investment during periods of economic instability, yet its price movements are shaped by complex market forces, volatility regimes, and macroeconomic conditions. Forecasting gold prices therefore remains a challenging task in financial analytics. This study investigates gold price dynamics by applying ensemble machine learning models in combination with explainable artificial intelligence (XAI) techniques. The dataset comprises 2,511 daily observations from 2016–2026, enriched with engineered features including daily returns, short‑ to long‑term moving averages (MA20, MA50, MA200), rolling volatility, and trend distance indicators. A range of regression‑based models were evaluated, including Linear Regression, Decision Tree, Random Forest, HistGradientBoosting, XGBoost, LightGBM, Multilayer Perceptron (MLP), and Long Short‑Term Memory (LSTM). Performance was assessed using Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and R². Results indicate that Linear Regression achieved the lowest MAE (≈0.57), reflecting strong precision under linear assumptions, while ensemble models consistently demonstrated greater robustness and generalization in capturing non‑linear relationships. Deep learning models (MLP and LSTM) performed poorly under the chosen configuration. To enhance transparency, SHAP analysis identified closing price, short‑term volatility, and moving averages as dominant predictors, while LIME provided case‑specific explanations of individual forecasts. Overall, the integration of ensemble machine learning with XAI improved both predictive accuracy and interpretability, offering practical insights for financial forecasting, portfolio management, and risk assessment in commodity markets.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.