Implementation of LSTM for Gold Price Prediction in Indonesia
DOI:
https://doi.org/10.30871/jaic.v10i1.11860Keywords:
Time Series, LSTM, MAPE, MSE, Prediction, Gold PriceAbstract
Gold is a significant investment instrument that serves as a safe-haven asset; nevertheless, its price dynamics are inherently nonlinear and highly volatile due to the influence of various economic factors. This study aims to develop a predictive model for daily gold prices denominated in Indonesian Rupiah. The proposed methodology employs a Long Short-Term Memory (LSTM) neural network architecture. Historical gold price data covering the period from January 1, 2015, to October 1, 2025, were obtained from investing.com. The dataset underwent a preprocessing phase, which included normalization using the MinMaxScaler and the construction of input sequences with a sliding window of 60 time steps. The implemented LSTM model consists of two stacked layers, each comprising 16 units, and is equipped with a dropout rate of 0.2 as well as an early stopping mechanism to improve generalization and prevent overfitting. The evaluation results demonstrate that the proposed model achieved a Mean Absolute Percentage Error (MAPE) of 5.08% and an accuracy of 94.92%, with a Mean Squared Error (MSE) of 0.00203. Furthermore, the visualization of prediction outcomes confirms the model’s capability to effectively capture actual price fluctuations, including during periods of heightened market volatility. Overall, these findings indicate that a relatively simple LSTM architecture is effective for forecasting gold price movements in the Indonesian market. The results of this study provide a robust foundation for the future development of more sophisticated predictive systems and potential real-time applications.
Downloads
References
[1] A. Tholib, N. K. Agusmawati, and F. Khoiriyah, “Prediksi Harga Emas Menggunakan Metode LSTM dan GRU,” Jurnal Informatika dan Teknik Elektro Terapan, vol. 11, no. 3, Aug. 2023, doi: 10.23960/jitet.v11i3.3250.
[2] D. Rahmadani, “The Role of Gold as a Safe Haven Asset in Risk Management Strategies in the Era of Geopolitical and Monetary Uncertainty.” doi: https://dx.doi.org/10.2139/ssrn.5338848.
[3] Y. Lin, R. Wu, Y. Yue, and Q. Liao, “Forecasting gold price using a novel hybrid model with MEEMD-convLSTM CRediT authorship contribution statement.” doi: https://dx.doi.org/10.2139/ssrn.4591257.
[4] A. Mulya Hadi, W. Witanti, J. Informatika, and U. Jenderal Achmad Yani, “Agustus 2024 486 Prediksi Pergerakan Harga Emas Menggunakan Metode Genetic Support Vector Regression,” Jurnal Informatika Teknologi dan Sains, doi: https://doi.org/10.51401/jinteks.v6i3.4247.
[5] A. K. Azis and K. Kustanto, “Penerapan Moving Average Pada Prediksi Penjualan Accu,” Jurnal Teknologi Informasi dan Komunikasi (TIKomSiN), vol. 11, no. 1, p. 25, Apr. 2023, doi: 10.30646/tikomsin.v11i1.722.
[6] J. Cahyani, S. Mujahidin, and T. P. Fiqar, “Implementasi Metode Long Short Term Memory (LSTM) untuk Memprediksi Harga Bahan Pokok Nasional,” Jurnal Sistem dan Teknologi Informasi (JustIN), vol. 11, no. 2, p. 346, Jul. 2023, doi: 10.26418/justin.v11i2.57395.
[7] S. Joddy, “Comparative Analysis of CNN, LSTM, and CNN-LSTM for Indonesian Stock Prediction,” vol. 7, no. 3, pp. 283–289, 2025, doi: 10.21512/emacsjournal.v6.
[8] M. Diqi, I. Wayan Ordiyasa, and R. Yogyakarta, “Enhancing Stock Price Prediction Using Stacked Long Short-Term Memory,” Journal Research and Development (ITJRD), vol. 8, no. 1, 2024, doi: 10.25299/itjrd.2024.13486.
[9] M. Syukron Zakka, “Stock Price Prediction Using Deep Learning (LSTM) with a Recursive Approach,” 2025. doi: https://doi.org/10.30871/jaic.v9i5.10514.
[10] M. Sholeh, D. Andayati, R. Yuliana Rachmawati, P. Studi Informatika, and F. Teknologi Informasi dan Bisnis, “Data Mining Model Klasifikasi Menggunakan Algoritma K-Nearest Neighbor Dengan Normalisasi Untuk Prediksi Penyakit Diabetes Data Mining Model Classification Using Algorithm K-Nearest Neighbor With Normalization For Diabetes Prediction.” doi: 10.36342/teika.v12i02.2911.
[11] M. Khairunisa, D. Made Sidantya Amanda Putri, and I. Gusti Ngurah Lanang Wijayakusuma, “Comparison of Machine Learning Methods for Menstrual Cycle Analysis and Prediction,” 2025. doi: https://doi.org/10.30871/jaic.v9i2.9076.
[12] M. Kamal Wisyaldin, G. Maya Luciana, H. Pariaman, and P. Pembangkitan Jawa Bali, “Pendekatan Long Short-Term Memory untuk Memprediksi Kondisi Motor 10 kV pada PLTU Batubara,” vol. 9, no. 2, doi: 10.33322/kilat.v9i2.997.
[13] R. Al Kiramy, I. Permana, A. Marsal, M. R. Munzir, and M. Megawati, “Perbandingan Performa Algoritma RNN dan LSTM dalam Prediksi Jumlah Jamaah Umrah pada PT. Hajar Aswad,” MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 4, no. 4, pp. 1224–1234, Jul. 2024, doi: 10.57152/malcom.v4i4.1373.
[14] H. H. Nuha, “Mean Squared Error (MSE) dan Penggunaannya.” doi: 10.2139/ssrn.4420880.
[15] M. Mushliha, “Implementasi CNN-BiLSTM untuk Prediksi Harga Saham Bank Syariah di Indonesia,” Jambura Journal of Mathematics, vol. 6, no. 2, pp. 195–203, Aug. 2024, doi: 10.37905/jjom.v6i2.26509.
[16] P. Anjarwati and P. Widyaningsih, “Raw Material Stock Prediction Using the Long Short-Term Memory Algorithm (Case Study: Mizan and Sunan Grilled Bread Producers),” Journal of Artificial Intelligence and Software Engineering, vol. 5, no. 3, pp. 1296–1308, 2025, doi: 10.30811/jaise.v5i3.7199.
[17] R. Ihza Yuzar Vianda, P. Anjarwati, H. Akbar Pratama, R. Maulana Akbar, and R. Dwi Irawan, “Klasifikasi Citra Bunga Multikelas Menggunakan Convolutional Neural Network (CNN),” Seminar Nasional Teknologi Informasi dan Bisnis (SENATIB), p. 2025, doi: https://doi.org/10.47701/0d10j421.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Maria Oktaviani Giska Sibannang, I Gusti Ngurah Lanang Wijayakusuma

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).








