Komparasi LSTM dan GRU untuk Prediksi Harga Emas Berdasarkan Inflasi, Nilai Tukar, Suku Bunga

Authors

  • Moh. Wahyu Abrory UPN “Veteran” Jawa Timur, Surabaya, Indonesia
  • Rizka Hadiwiyanti Universitas Pembangunan Nasional "Veteran" Jawa Timur
  • Nambi Sembilu Universitas Pembangunan Nasional "Veteran" Jawa Timur

DOI:

https://doi.org/10.70340/jirsi.v5i3.382

Keywords:

Gold Price Prediction, GRU, Deep Learning, Macroeconomics, LSTM

Abstract

Gold is a strategic asset widely used as a hedging instrument in Indonesia, with its price influenced by domestic macroeconomic factors including inflation, Bank Indonesia's benchmark interest rate, and the USD/IDR exchange rate. Classical statistical models such as ARIMA have limitations in capturing non-linear patterns and long-term dependencies in financial time series data. This study compares the performance of two deep learning algorithms, Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU), in predicting the daily price of ANTAM LM gold based on the aforementioned macroeconomic variables. Data covering the period from January 2015 to September 2025 were obtained from PT Antam, Bank Indonesia, and Investing.com. The research process included data collection, preprocessing, exploratory data analysis, dataset splitting under three schemes (70:30, 80:20, and 90:10), model training with hyperparameter tuning, and evaluation using RMSE and MAPE metrics. Results demonstrated that GRU achieved the best performance under the 90:10 split scheme with an RMSE of IDR 35,417.91 and a MAPE of 1.47%, outperforming the best LSTM model which recorded an RMSE of IDR 96,808.45 and a MAPE of 4.58%. The best-performing GRU model was deployed into a Flask and React-based web application serving as a tool for investment decision-making.

Downloads

Download data is not yet available.

References

G. Duffee, D. Krueger, L. Kogan, D. Andrei, and B. Mcdonald, “Gold’s Value as an Investment,” 2023. [Online]. Available: http://finance.wharton.upenn.edu/~jermann/.

Logam Mulia, “Logam Mulia | Gold, Silver and Precious Metal Trading Company.” Accessed: Oct. 19, 2025. [Online]. Available: https://www.logammulia.com/id

S. Aprizal and M. N. Harahap, “Determinants of Gold Prices in Indonesia Period of 2018-2022,” Jurnal Ilmu Manajemen dan Ekonomika, vol. 17, no. 2, pp. 185–202, Jun. 2025, doi: 10.35384/JIME.V17I2.770.

I. C. Rahmansyah, R. Chaidir, and L. Nugraha, “Gold Price, Inflation, and Dollar Exchange Rate: The Case of Gold Investment in Indonesia,” The Indonesian Capital Market Review, vol. 13, no. 1, doi: 10.21002/icmr.v13i1.13238.

D. Makala and Z. Li, “Prediction of gold price with ARIMA and SVM,” in Journal of Physics: Conference Series, IOP Publishing Ltd, Feb. 2021. doi: 10.1088/1742-6596/1767/1/012022.

A. Varshini, P. Kayal, and M. Maiti, “How good are different machine and deep learning models in forecasting the future price of metals? Full sample versus sub-sample,” Resources Policy, vol. 92, p. 105040, May 2024, doi: 10.1016/J.RESOURPOL.2024.105040.

Y. R. M. Ferdinandus, K. Kusrini, and T. Hidayat, “Gold Price Prediction Using the ARIMA and LSTM Models,” Sinkron, vol. 8, no. 3, pp. 1255–1264, 2023, doi: 10.33395/sinkron.v8i3.12461.

R. B. Barsky, C. Epstein, A. Lafont-Mueller, and Y. Yoo, “What drives gold prices?,” Chicago Fed Letter, 2021, doi: 10.21033/CFL-2021-464.

S. R. Baker, N. Bloom, and S. J. Davis, “Measuring Economic Policy Uncertainty,” Q. J. Econ., vol. 131, no. 4, pp. 1593–1636, Nov. 2016, doi: 10.1093/QJE/QJW024.

S. Hochreiter and J. Schmidhuber, “Long Short-Term Memory,” Neural Comput., vol. 9, no. 8, pp. 1735–1780, Nov. 1997, doi: 10.1162/NECO.1997.9.8.1735.

J. Chung, C. Gulcehre, and K. Cho, “Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling,” arXiv preprint arXiv, 2014.

A. Sherstinsky, “Fundamentals of Recurrent Neural Network (RNN) and Long Short-Term Memory (LSTM) network,” Physica D, vol. 404, Mar. 2020, doi: 10.1016/J.PHYSD.2019.132306.

S. B. Primananda and S. M. Isa, “Forecasting Gold Price in Rupiah using Multivariate Analysis with LSTM and GRU Neural Networks,” Advances in Science, Technology and Engineering Systems Journal, vol. 6, no. 2, pp. 245–253, 2021, doi: 10.25046/aj060227.

Downloads

Published

2026-09-30