The Implementation of Gated Recurrent Unit (GRU) for Gold Price Prediction Using Yahoo Finance Data: A Case Study and Analysis
DOI:
https://doi.org/10.47709/brilliance.v4i1.3865Keywords:
Gated Recurrent Unit, Yahoo Finance, MSE, MAEAbstract
Gold is a precious metal resistant to corrosion and oxidation, highly valued in investment and trade. Currently, the demand for gold is increasing as it is considered a safe haven. This is evidenced by 48% of respondents out of 2,333 respondents choosing gold as the most preferred investment, based on a survey conducted by Jakpat. However, gold actually has a fluctuating price. The fluctuating price of gold worldwide is influenced by many factors such as economic conditions, inflation rate, supply and demand of gold, and the US dollar exchange rate. Therefore, there is a need for a prediction that can estimate the price of gold based on the movement of gold prices in previous periods. In this study, an evaluation of the performance of GRU for predicting the price of gold will be conducted.. The research methodology includes data collection and processing of gold prices, application of the GRU model, and evaluation of model performance with evaluation metrics such as Mean Squared Error (MSE) and Mean Absolute Error (MAE). Gold price data is taken from Yahoo Finance from December 14, 2017, to March 14, 2024, and processed through normalization and data splitting into training and testing sets. The results of the study show that the GRU model is able to predict gold prices with an adequate level of accuracy. Based on the MSE and MAE values, the combination that provides the best performance is a batch size of 64 with 100 epochs, as it yields the lowest MSE and MAE.
References
Agusta, A., Ernawati, I. and Muliawati, A. (2021) ‘Prediksi Pergerakan Harga Saham Pada Sektor Farmasi Menggunakan Algoritma Long Short-Term Memory’, Informatik?: Jurnal Ilmu Komputer, 17(2), p. 164. Available at: https://doi.org/10.52958/iftk.v17i2.3651.
Andriani, W., Gunawan and Prayoga, A.E. (2023) ‘Prediksi Nilai Emas Menggunakan Algoritma Regresi Linear’, Jurnal Ilmiah Informatika Komputer, 28, pp. 27–35.
Arumsari, M. and Dani, A. (2021) ‘Peramalan Data Runtun Waktu menggunakan Model Hybrid Time Series Regression – Autoregressive Integrated Moving Average’, Jurnal Siger Matematika, 2(1), pp. 1–12. Available at: https://doi.org/10.23960/jsm.v2i1.2736.
Carnegie, M.D.A. and Chairani (2023) ‘Perbandingan Long Short Term Memory ( LSTM ) dan Gated Recurrent Unit ( GRU ) Untuk Memprediksi Curah Hujan’, 7, pp. 1022–1032. Available at: https://doi.org/10.30865/mib.v7i3.6213.
Chen, B. et al. (2020) ‘Time Series Data for Equipment Reliability Analysis with Deep Learning’, IEEE Access, 8, pp. 105484–105493. Available at: https://doi.org/10.1109/ACCESS.2020.3000006.
Fikri, H.A. (2023) ‘Prediksi Harga Emas Dengan Algoritma Backpropagation’, Jurnal Sains Komputer & Informatika (J-SAKTI), 7(1), pp. 182–189.
Guntara, R.G. (2023) ‘Visualisasi Data Laporan Penjualan Toko Online Melalui Pendekatan Data Science Menggunakan Google Colab’, 2(6), pp. 2091–2100.
Hariwijaya, M.R.I., Furqon, M.T. and Dewi, C. (2020) ‘Prediksi Harga Emas Dengan Menggunakan Metode Average-Based Fuzzy Time Series’, Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, 4(4), pp. 1258–1264.
Huang, J., Chai, J. and Cho, S. (2020) ‘Deep learning in finance and banking: A literature review and classification’, Frontiers of Business Research in China, 14(1). Available at: https://doi.org/10.1186/s11782-020-00082-6.
Khalis Sofi et al. (2021) ‘Perbandingan Algoritma Linear Regression, Lstm, Dan Gru Dalam Memprediksi Harga Saham Dengan Model Time Series’, Seminastika, 3(1), pp. 39–46. Available at: https://doi.org/10.47002/seminastika.v3i1.275.
Lin, Z., Tian, F. and Zhang, W. (2022) Evaluation and Analysis of an LSTM and GRU Based Stock Investment Strategy. Atlantis Press International BV. Available at: https://doi.org/10.2991/978-94-6463-052-7_179.
Mahan Zaky, A. (2022) ‘Forecasting Jumlah Penggunaan Obat Digestive Enzymes dengan Algoritma GRU’, Journal of Informatics and Vocational Education, 5(2), pp. 48–55.
Majdid, M.N., Fielnanda, R. and Sesarwari, B. (2023) ‘Pengaruh Fluktuasi Harga Emas dan Promosi Terhadap Minat Nasabah pada Produk Tabungan Emas di Pegadaian Syariah Jelutung’, Jupumi, 2(1), pp. 55–64.
Nagakusuma, J., Palit, H. and Juwiantho, H. (2022) ‘Prediksi Penjualan Pada Data Penjualan Perusahaan X Dengan Membandingkan Metode GRU, SVR, dan SARIMAX’, Infra, 10(2), pp. 319–325.
Nathaniel, F. et al. (2023) ‘Analisa Prediksi Harga Emas Dengan Kemungkinan Terjadinya Resesi Menggunakan Metode Svr’, 6(1), pp. 37–46.
Nilsen, A. (2022) ‘Perbandingan Model RNN, Model LSTM, dan Model GRU dalam Memprediksi Harga Saham-Saham LQ45’, Jurnal Statistika dan Aplikasinya, 6(1), pp. 137–147. Available at: https://doi.org/10.21009/jsa.06113.
Primananda, S.B. and Isa, S.M. (2021) ‘Forecasting Gold Price in Rupiah using Multivariate Analysis with LSTM and GRU Neural Networks’, Advances in Science, Technology and Engineering Systems Journal, 6(2), pp. 245–253. Available at: https://doi.org/10.25046/aj060227.
Ristianto, F., Nurmalasari and Yoraeni, A. (2021) ‘Impementasi Metode Naive Bayes Untuk Prediksi Harga Emas’, Computer Science (CO-SCIENCE), 1(1), pp. 62–71. Available at: https://doi.org/10.31294/coscience.v1i1.201.
Rizki, M., Basuki, S. and Azhar, Y. (2020) ‘Implementasi Deep Learning Menggunakan Arsitektur Long Short Term Memory(LSTM) Untuk Prediksi Curah Hujan Kota Malang’, Jurnal Repositor, 2(3), pp. 331–338. Available at: https://doi.org/10.22219/repositor.v2i3.470.
Samsudin, Harahap, A.M. and Fitrie, S. (2021) ‘Implementasi Gated Recurrent Unit (Gru) Untuk Prediksi Harga Saham Bank Konvensional Di Indonesia’, JISTech (Journal of Islamic Science and Technology), 6(2), pp. 42–49. Available at: https://doi.org/10.30829/jistech.v6i2.11058.
Soen, G.I.E., Marlina and Renny (2022) ‘Implementasi Cloud Computing dengan Google Colaboratory Pada Aplikasi Pengolah Data Zoom Participants’, Journal Informatic Technology And Communication, 6(1), pp. 24–30.
Syahputra, A. and Juseva, R. (2020) ‘IMPLEMENTASI METODE DOUBLE EXPONENTIAL SMOOTHING PADA APLIKASI PREDIKSI HARGA EMAS DUNIA’, Jurnal Teknologi Terapan & Sains, 1, no.1, p. 12.
Touzani, Y. and Douzi, K. (2021) ‘An LSTM and GRU based trading strategy adapted to the Moroccan market’, Journal of Big Data, 8(1). Available at: https://doi.org/10.1186/s40537-021-00512-z.
Wang, F. et al. (2020) ‘Time Series Data Mining: A Case Study with Big Data Analytics Approach’, IEEE Access, 8, pp. 14322–14328. Available at: https://doi.org/10.1109/ACCESS.2020.2966553.
Yurtsever, M. (2021) ‘Gold Price Forecasting Using LSTM, Bi-LSTM and GRU’, European Journal of Science and Technology [Preprint], (December 2021). Available at: https://doi.org/10.31590/ejosat.959405.
Yurtsever, M. (2023) ‘Unemployment rate forecasting: LSTM-GRU hybrid approach’, Journal for Labour Market Research, 57(1). Available at: https://doi.org/10.1186/s12651-023-00345-8.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2024 I Putu Gede Abdi Sudiatmika, I Made Agus Widiana Putra , Wayan Widya Artana

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.