Model Hibrida PSO-LSTM dan Interpretasi SHAP untuk Peramalan Harga Emas Domestik Multivariat


  • Fajar Arafat * Mail Universitas PGRI Semarang, Semarang, Indonesia
  • Nugroho Dwi Saputro Universitas PGRI Semarang, Semarang, Indonesia
  • Aris Tri Joko Harjanto Universitas PGRI Semarang, Semarang, Indonesia
  • (*) Corresponding Author
Keywords: Domestic Gold Price; Long Short-Term Memory; Particle Swarm Optimization; SHapley Additive exPlanations; Time-Series Forecasting

Abstract

Forecasting volatile domestic gold prices requires a predictive model that is not only accurate but also transparent. Although the Long Short-Term Memory (LSTM) architecture excels at capturing temporal dependencies in time-series data, its performance is highly sensitive to hyperparameter tuning and suffers from a black-box nature. To overcome the limitations of manual optimization and lack of transparency, this study proposes a hybrid multivariate PSO-LSTM forecasting model integrated with the SHapley Additive exPlanations (SHAP) method. Built upon the CRISP-DM framework using daily historical data from 2020 to 2026, the Particle Swarm Optimization (PSO) algorithm is employed to automatically optimize the number of neurons, learning rate, and batch size. Furthermore, the SHAP method with K-Means background reduction is applied to map the contribution of input features. Experimental results demonstrate that the PSO-LSTM model outperforms the baseline LSTM by reducing Root Mean Squared Error (RMSE) by 11.70% and Mean Absolute Error (MAE) by 14.08%, while achieving a highly accurate Mean Absolute Percentage Error (MAPE) of 2.62%. Statistical testing using the Diebold-Mariano test confirms that the predictive superiority of the PSO-LSTM model is statistically significant. SHAP analysis indicates that historical memory of domestic gold prices provides the highest marginal contribution to model predictions, followed by USD/IDR exchange rate adjustments and global gold price sentiment. Overall, this study contributes an integrated financial modeling framework that not only enhances accuracy on highly volatile data but also provides rational feature interpretability as a foundation for hedging decisions by investors and policymakers.

Downloads

Download data is not yet available.

References

Fathoni, M. Aziiz Irwansyah, A. Triana, E. Darmayanti Simanullang, Y. Nur Alinda, and A. Ibrahim, “Prediksi Harga dan Volatilitas Emas Dunia Harian: Perbandingan Model GARCH dan Long Short-Term Memory,” Zo. J. Sist. Inf., vol. 7, no. 2, May 2025, doi: https://doi.org/10.31849/zn.v7i2.26764.

Y. Eka Herliana and R. Sofia, “Pengaruh Inflasi, Suku Bunga, dan Nilai Tukar Terhadap Harga Emas di Indonesia Tahun 2025,” JMA), vol. 4, no. 5, pp. 3031–5220, 2026, doi: https://doi.org/10.62281/2a8b1d94.

C. Gharib, S. Mefteh-Wali, and S. Ben Jabeur, “The Bubble Contagion Effect of COVID-19 Outbreak: Evidence from Crude Oil and Gold Markets,” Financ. Res. Lett., vol. 38, p. 101703, Jan. 2021, doi: 10.1016/j.frl.2020.101703.

P. Wang, X. Zheng, G. Ai, D. Liu, and B. Zhu, “Time Series Prediction for the Epidemic Trends of COVID-19 Using the Improved LSTM Deep Learning Method: Case Studies in Russia, Peru and Iran,” Chaos, Solitons and Fractals, vol. 140, p. 110214, Nov. 2020, doi: 10.1016/j.chaos.2020.110214.

M. Mroua and A. Lamine, “Financial Time Series Prediction Under Covid-19 Pandemic Crisis With Long Short-Term Memory (LSTM) Network,” Humanit. Soc. Sci. Commun., vol. 10, no. 1, Dec. 2023, doi: 10.1057/s41599-023-02042-w.

C. Alkahfi, A. Kurnia, and A. Saefuddin, “Perbandingan Kinerja Model Berbasis RNN pada Peramalan Data Ekonomi dan Keuangan Indonesia,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 4, pp. 1235–1243, Jul. 2024, doi: 10.57152/malcom.v4i4.1415.

D. A. Adha, A. Ramadhan, H. Maulana, P. P. H. Harahap, and E. Ismanto, “Peramalan Harga Emas Berbasis Time Series Menggunakan Arsitektur LSTM Deep Learning,” J. CoSciTech (Computer Sci. Inf. Technol., vol. 6, no. 2, pp. 329–336, Sep. 2025, doi: 10.37859/coscitech.v6i2.9980.

N. Syahputri and O. Alfina, “Optimasi Kinerja Model LeNet Berbasis Deep Learning untuk Klasifikasi Citra Menggunakan Pendekatan Hyperparameter Tuning,” J. Comput. Sci. Inf. Technol., vol. 6, no. 2, 2026, doi: 10.47065/explorer.v6i2.2670.

T. M. Shami, A. A. El-Saleh, M. Alswaitti, Q. Al-Tashi, M. A. Summakieh, and S. Mirjalili, “Particle Swarm Optimization: A Comprehensive Survey,” IEEE Access, vol. 10, pp. 10031–10061, 2022, doi: 10.1109/ACCESS.2022.3142859.

A. Pranolo et al., “Exploring LSTM-Based Attention Mechanisms with PSO and Grid Search under Different Normalization Techniques for Energy Demands Time Series Forecasting,” Knowl. Eng. Data Sci., vol. 7, no. 1, pp. 1–12, Apr. 2024, doi: 10.17977/um018v7i12024p1-12.

K. Aprianto, U. Mahdiyah, and R. Wulanningrum, “Analisis Perbandingan Model PSO-LSTM dan LSTM Konvensional untuk Prediksi Harga Bitcoin di Market Cryptocurrency,” SEMNAS INOTEK (Seminar Nas. Inov. Teknol., vol. 9, pp. 1733–1742, 2025, doi: https://doi.org/10.29407/71q6xr58.

T. B. Çeli̇k, Ö. İcan, and E. Bulut, “Extending Machine Learning Prediction Capabilities by Explainable AI in Financial Time Series Prediction,” Appl. Soft Comput., vol. 132, p. 109876, Jan. 2023, doi: 10.1016/j.asoc.2022.109876.

A. Barredo Arrieta et al., “Explainable Artificial Intelligence (XAI): Concepts, Taxonomies, Opportunities and Challenges Toward Responsible AI,” Inf. Fusion, vol. 58, pp. 82–115, Jun. 2020, doi: 10.1016/j.inffus.2019.12.012.

M. Teddy Syamkalla, S. Khomsah, and Y. Setiya Rafika Nur, “Implementasi Algoritma Catboost dan Shapley Additive Explanations (SHAP) dalam Memprediksi Popularitas Game Indie pada Platform Steam,” J. Teknol. Inf. dan Ilmu Komput., vol. 11, no. 4, pp. 777–786, Aug. 2024, doi: 10.25126/jtiik.1148503.

N. S. Aji, F. Natsir, and S. Istianah, “Penentuan Penjualan Barang Berdasarkan Pengelompokan Produk dengan K-Means Clustering Metode CRISP-DM pada CV.Sembako Dina,” J. Zetroem, vol. 5, no. 2, 2023, doi: https://doi.org/10.36526/ztr.v5i2.3041.

M. Hadrianto, A. N. I. Rahman, A. S. Haris, A. Juzril, and N. Rahmadani, “Prediksi Harga Emas Menggunakan Algoritma Long-Short Term Memory dengan Optimasi Adaptive Momen Estimation,” Fakt. Exacta, vol. 18, no. 2, p. 183, Oct. 2025, doi: 10.30998/faktorexacta.v18i2.26841.

A. H. Nababan, R. Nauli, L. Gaol, and F. Rahmadhani, “Pemodelan Biaya Sewa pada Data Pendidikan Internasional Menggunakan Pendekatan Machine Learning dan CRISP-DM,” Bull. Inf. Technol., vol. 7, no. 1, pp. 22–30, 2026, doi: 10.47065/bit.v5i2.2557.

Yahoo Finance, “Gold (GC=F) and USD/IDR (IDR=X) Historical Data,” Yahoo Finance. Accessed: Sep. 05, 2026. [Online]. Available: https://finance.yahoo.com/

D. K. Sari, I. Kresna, and D. D. Septiani, “Penerapan Fuzzy Time Series Markov Chain dalam Peramalan Harga Cabai Merah Berbasis Data Harian di Kabupaten Banyumas,” Euler J. Ilm. Mat. Sains dan Teknol, vol. 14, no. 2, pp. 321–332, 2026, doi: 10.37905/euler.v14i2.37987.

D. Fatikasari, M. Walid, Muhsi, and M. A. Hamzah, “Comparative Evaluation of Random Forest, GRU, and Transformer Models for Soil Moisture Prediction Using Reanalysis and Meteorological Time Series Data,” J. Soft Comput. Explor., vol. 7, no. 2, pp. 300–311, May 2026, doi: 10.52465/joscex.v7i2.54.

A. Pradasyah and A. Baita, “Comparative Study of Support Vector Regression and Long Short-Term Memory for Stock Price Prediction,” J. Appl. Informatics Comput., vol. 9, no. 4, p. 1301, 2025, doi: https://doi.org/10.30871/jaic.v9i4.9425.

M. K. Najib and S. Nurdiati, “Pemodelan Deret Waktu Menggunakan Non-linear Autoregressive Neural Network: Studi Kasus Prediksi Harga Saham Mandiri,” Jambura J. Math., vol. 7, no. 2, pp. 213–220, Aug. 2025, doi: 10.37905/jjom.v7i2.33397.

A. Ichwani, R. Indra Kesuma, A. Setiawan, E. Wicaksono, and R. Hanifah, “Preventing Data Leakage in Classification via Integrated Machine Learning Pipelines: Preprocessing, Feature Transformation, and Hyperparameter Tuning,” J. Tek. Inform., vol. 7, no. 1, pp. 391–410, 2026, doi: https://doi.org/10.52436/1.jutif.2026.7.2.5490.

A. Rahmawati, W. Sulandari, S. Subanti, and Y. Yudhanto, “Penerapan Metode Reccurent Neural Network dengan Pendekatan Long Short-Term Memory (LSTM) untuk Meramalkan Harga Saham Hybe Corporation,” J. Bumigora Inf. Technol., vol. 5, no. 1, pp. 65–76, 2023, doi: 10.30812/bite/v5i1.2973.

Oktavian M.D.S, R. Parlika, and F.P. Aditiawan, “Analisis Studi Literatur: Perbandingan Model Prediksi Harga Bitcoin Berbasis Long Short-Term Memory (LSTM),” Semin. Nas. Inform. Bela Negara, vol. 5, no. 2, 2025, Accessed: Sep. 17, 2026. [Online]. Available: https://santika.upnjatim.ac.id/submissions/index.php/santika/article/view/879

Wilson Wiranata and Yohanes Calvinus, “Optimasi Prediksi Sisa Umur Penggunaan Baterai dengan Model PSO-LSTM,” Electron J. Ilm. Tek., vol. 6, no. 1, Mar. 2025, doi: https://doi.org/10.33019/electron.v6i1.242.

J. F. Ruma, M. S. G. Adnan, A. Dewan, and R. M. Rahman, “Particle Swarm Optimization Based LSTM Networks for Water Level Forecasting: A Case Study on Bangladesh River Network,” Results Eng., vol. 17, p. 100951, Mar. 2023, doi: https://doi.org/10.1016/j.rineng.2023.100951.

TensorFlow Developers, “Determinism in TensorFlow,” TensorFlow Documentation. Accessed: Sep. 15, 2026. [Online]. Available: https://www.tensorflow.org/api_docs/python/tf/config/experimental/enable_op_determinism

T. A. D. Kurniawan, A. Setiawan, and F. Tita, “Perbandingan Kinerja Metode Support Vector Regression dan Metode Regresi Linier Berganda dalam Memprediksi BMI pada Dataset ASTHMA,” J. Sains dan Edukasi Sains, vol. 8, no. 2, pp. 133–142, Aug. 2025, doi: 10.24246/juses.v8i2p133-142.

R. Roshanpour, M. Parsanejad, and M. S. Pishvaee, “Differential LSTM (D-LSTM): Integrating Differential Operators Into LSTM Cells for Financial Time-Series Forecasting,” IEEE Access, vol. 14, pp. 21674–21705, Feb. 2026, doi: 10.1109/ACCESS.2026.3662286.

Aditia Ananda Sutrisno, Ahmad Abdul Chamid, and R. Meimaharani, “Klasifikasi Risiko Gagal Bayar Kredit Menggunakan XGBoost dengan Model Explainable Berbasis SHAP,” JATI (Jurnal Mhs. Tek. Inform., vol. 10, no. 1, Feb. 2026, doi: https://doi.org/10.36040/jati.v10i1.16673.

G. Ranjbaran, D. R. Recupero, C. K. Roy, and K. A. Schneider, “C-SHAP: A Hybrid Method for Fast and Efficient Interpretability,” Appl. Sci., vol. 15, no. 2, Jan. 2025, doi: 10.3390/app15020672.


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Model Hibrida PSO-LSTM dan Interpretasi SHAP untuk Peramalan Harga Emas Domestik Multivariat

Dimensions Badge
Article History
Submitted: 2026-09-06
Published: 2026-09-27
Abstract View: 93 times
PDF Download: 75 times
How to Cite
Arafat, F., Saputro, N., & Harjanto, A. (2026). Model Hibrida PSO-LSTM dan Interpretasi SHAP untuk Peramalan Harga Emas Domestik Multivariat. Building of Informatics, Technology and Science (BITS), 8(2), 1073-1084. https://doi.org/10.47065/bits.v8i2.11144
Section
Articles