Optimizing Gated Recurrent Unit (GRU) for Gold Price Prediction: Hyperparameter Tuning and Model Evaluation on Historical XAU/USD Data
DOI:
https://doi.org/10.32736/sisfokom.v14i2.2352Keywords:
Gated Recurrent Unit (GRU), Gold Price Prediction, Hyperparameter Optimization, Time SeriesAbstract
This study investigates the use of a Gated Recurrent Unit (GRU) model with a four-layer architecture for daily gold price closing prediction, motivated by the model's ability to effectively capture temporal dependencies in time series data. Gold price forecasting is highly challenging due to its volatility and external factors, making it an important area of research for investors and financial analysts. By systematically optimizing hyperparameters through 72 combinations of epochs, batch size, GRU layer units, and dropout rates, the study identifies the optimal configuration (100 epochs, batch size of 16, 256 units, dropout rate 0.1) based on MSE performance on validation data. The best model achieved MAE of 25.76, MSE of 954.97, and RMSE of 30.90, after inverse transformation on test data. These results highlight the potential of the GRU model in accurately forecasting gold prices, with implications for financial decision-making . However, the prediction error suggests that further improvements could be made by incorporating external factors or exploring advanced model architectures.References
M. Fauzi, M. Jauhar Vikri, and S. Wahyudhi, ‘Sistem PendukungcKeputusan Pemilihan Jenis Investasi MenggunakanxMetode Analytical Hierarchy Process (AHP)’.
A. F. Yuliana and R. Robiyanto, ‘PERAN EMAS SEBAGAI SAFE HAVEN BAGI SAHAM PERTAMBANGAN DI INDONESIA PADA PERIODE PANDEMI COVID-19’, Jurnal Ilmiah Bisnis dan Ekonomi Asia, vol. 15, no. 1, pp. 1–11, Feb. 2021, doi: 10.32815/jibeka.v15i1.217.
S. Novianto and H. Akbar Wibowo, ‘The Implementation of Data Mining for Predicting XAU/USD Price Trends in the Forex Market on MetaTrader 5 using Naïve Bayes Method’, Intelmatics, vol. 3, no. 2, pp. 85–90, Sep. 2023, doi: 10.25105/itm.v3i2.17199.
R. Mattera, G. Athanasopoulos, and R. Hyndman, ‘Improving out-of-sample forecasts of stock price indexes with forecast reconciliation and clustering’, Quant Finance, vol. 24, no. 11, pp. 1641–1667, Nov. 2024, doi: 10.1080/14697688.2024.2412687.
C. Alkahfi, A. Kurnia, and A. Saefuddin, ‘Perbandingan Kinerja Model Berbasis RNN pada Peramalan Data Ekonomi dan Keuangan Indonesia’, MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 4, no. 4, pp. 1235–1243, Jul. 2024, doi: 10.57152/malcom.v4i4.1415.
A. I. Putri, Y. Syarif, N. R. Aisyi, and N. Waeyusoh, ‘Implementation of Gated Recurrent Unit, Long Short-Term Memory and Derivatives for Gold Price Prediction’, vol. 2, no. 2, pp. 68–80, 2025, doi: 10.57152/predatecs.v2i2.1609.
M. F. Julianto, M. Iqbal, W. F. Hidayat, and Y. Malau, ‘PERBANDINGAN PENERAPAN ALGORITMA DEEP LEARNING DALAM PREDIKSI HARGA EMAS’, INTI Nusa Mandiri, vol. 19, no. 1, pp. 71–76, Aug. 2024, doi: 10.33480/inti.v19i1.5559.
A. Jamarani, S. Haddadi, R. Sarvizadeh, M. Haghi Kashani, M. Akbari, and S. Moradi, ‘Big data and predictive analytics: A sytematic review of applications’, Artif Intell Rev, vol. 57, no. 7, Jul. 2024, doi: 10.1007/s10462-024-10811-5.
R. Chaudhuri, S. Deb, and H. Das, ‘Noble Approach on Sensor Fused Bio Intelligent Path Optimisation and Single Stage Obstacle Recognition in Customized Mobile Agent’, Procedia Comput Sci, vol. 218, pp. 778–787, Jan. 2023, doi: 10.1016/J.PROCS.2023.01.058.
David Andrés, ‘Error Metrics for Time Series Forecasting - ML Pills’. Accessed: May 01, 2025. [Online]. Available: https://mlpills.dev/time-series/error-metrics-for-time-series-forecasting/
R. J. Hyndman and A. B. Koehler, ‘Another look at measures of forecast accuracy’, Int J Forecast, vol. 22, no. 4, pp. 679–688, Oct. 2006, doi: 10.1016/J.IJFORECAST.2006.03.001.
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution 4.0 International License.
The copyright of the article that accepted for publication shall be assigned to Jurnal Sisfokom (Sistem Informasi dan Komputer) and LPPM ISB Atma Luhur as the publisher of the journal. Copyright includes the right to reproduce and deliver the article in all form and media, including reprints, photographs, microfilms, and any other similar reproductions, as well as translations.
Jurnal Sisfokom (Sistem Informasi dan Komputer), LPPM ISB Atma Luhur, and the Editors make every effort to ensure that no wrong or misleading data, opinions or statements be published in the journal. In any way, the contents of the articles and advertisements published in Jurnal Sisfokom (Sistem Informasi dan Komputer) are the sole and exclusive responsibility of their respective authors.
Jurnal Sisfokom (Sistem Informasi dan Komputer) has full publishing rights to the published articles. Authors are allowed to distribute articles that have been published by sharing the link or DOI of the article. Authors are allowed to use their articles for legal purposes deemed necessary without the written permission of the journal with the initial publication notification from the Jurnal Sisfokom (Sistem Informasi dan Komputer).
The Copyright Transfer Form can be downloaded [Copyright Transfer Form Jurnal Sisfokom (Sistem Informasi dan Komputer).
This agreement is to be signed by at least one of the authors who have obtained the assent of the co-author(s). After submission of this agreement signed by the corresponding author, changes of authorship or in the order of the authors listed will not be accepted. The copyright form should be signed originally, and send it to the Editorial in the form of scanned document to sisfokom@atmaluhur.ac.id.