Comparative Performance Analysis of Long Short-Term Memory (LSTM) and Support Vector Regression (SVR) Algorithms in Gold Price Prediction
Abstract
Gold is one of the most important investment commodities in the global financial system, widely recognized for its role as a safe-haven asset and its ability to preserve value during periods of inflation, economic instability, and geopolitical uncertainty. Despite its relative stability compared to other financial instruments, gold prices exhibit significant volatility driven by various macroeconomic factors, including exchange rate movements, inflation dynamics, global monetary policy decisions, and market sentiment. As a result, accurate gold price prediction remains a critical challenge for investors, financial analysts, and policymakers. This study aims to conduct a comparative performance analysis of two machine learning algorithms, namely Long Short-Term Memory (LSTM) and Support Vector Regression (SVR), in predicting gold prices represented by the XAU/USD currency pair. The research utilizes daily historical gold price data from 2004 to 2025 obtained from the Kaggle platform. The dataset includes key financial attributes such as Open, High, Low, Close prices, and trading Volume. Data preprocessing steps involve data cleaning, chronological sorting, handling missing values through linear interpolation, feature selection, and normalization using the Min-Max scaling technique. The dataset is then divided sequentially into training and testing sets with an 80:20 ratio to preserve temporal dependencies. The LSTM model is designed to capture long-term temporal patterns using the closing price as a time series input, while the SVR model leverages multiple input features to model non-linear relationships through kernel-based regression. Model performance is evaluated using Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and the coefficient of determination (R²). The experimental results demonstrate that the LSTM model outperforms the SVR model across all evaluation metrics. The LSTM achieved an RMSE of 0.0082, an MAE of 0.0060, and an R² value of 0.9969, indicating a very high level of predictive accuracy and strong generalization capability. In contrast, the SVR model recorded an RMSE of 0.0289, an MAE of 0.0143, and an R² of 0.9611, reflecting lower precision, particularly during periods of high price volatility. These findings confirm that LSTM is more effective in capturing complex temporal dependencies and non-linear dynamics inherent in gold price time series data. Consequently, LSTM is recommended as a superior approach for long-term gold price forecasting, while SVR may serve as a complementary or baseline predictive model in financial time series analysis.
Downloads
References
A. Ainur, “Pengaruh Ketidakpastian Ekonomi Global Terhadap Inflasi, Kurs, Foreign Direct Investment(Fdi), Harga Emas, Dan Pertumbuhan Ekonomi Di Indonesia,” J. Ekon. Perjuangan, vol. 6, no. 1, pp. 43–54, 2024, doi: https://doi.org/10.36423/jumper.v6i1.1649.
A. E. Wicaksono and I. D. Rahmawati, “The Effect of Inflation and Interest Rates on Investment Decision Making Through Gold Prices of Indonesian Sharia Bank Customers,” Amkop Manag. Account. Rev., vol. 5, no. 2, pp. 605–634, 2025, doi: https://doi.org/10.37531/amar.v5i2.2992.
S. Singh, M. Singh, and S. Attri, “Dynamic volatility linkages among crude oil, exchange rate, interest rate, gold and equity markets: an empirical Asian perspective,” Manag. Financ., vol. 52, no. 1, pp. 160–182, 2025, doi: https://doi.org/10.1108/MF-01-2025-0016.
A. M. Potcovaru, E. Nica, and E. Labudova, “Price Development Of Gold And S & P 500 Index As A Determinant of Investment Behavior : A Comparative Analysis,” Ekon. spektrum, vol. 19, no. 1, pp. 39–54, 2025, doi: dx.doi.org/10.26552/ems.2025.1.39-54.
M. Mohtasham, K. Sahand, and V. Alireza, “A Deep Learning ‑ Based Method for Forecasting Gold Price with Respect to Pandemics,” SN Comput. Sci., vol. 2, no. 4, pp. 1–12, 2021, doi: https://doi.org/10.1007/s42979-021-00724-3.
N. Patria, “Optimasi Prediksi Saham dengan Neural Network pada PT Xyz,” Decod. J. Pendidik. Teknol. Inf., vol. 4, no. 3, pp. 928–936, 2024, doi: https://doi.org/10.51454/decode.v4i3.782.
V. Afnita, H. P. Dolonseda, Y. Otoluwa, and M. Dwi, “Model Struktural Sem-Pls : Intelligent Tutoring Systems Dan Adaptive Learning Systems Dalam Kaitannya Dengan Kreativitas Belajar,” J. Adm. Manaj. Sumber Daya Mns. Dan Ilmu Sos., vol. 4, no. 1, pp. 1–14, 2025, doi: https://doi.org/10.37606/jaeis.v4i1.298.
D. A. Adha, A. Ramadhan, H. Maulana, P. P. H. Harahap, and E. Ismanto, “Gold Price Forecasting Based on Time Series Using the LSTM Deep Learning Architecture,” J. Comput. Sci. Inf. Technol., vol. 6, no. 2, pp. 329–336, 2025, doi: https://doi.org/10.37859/coscitech.v6i2.9980.
A. Rahman, V. Paramarta, A. N. Ida, and M. H. Akbar, “Perbandingan Kinerja SVR dan XGBoost untuk Peramalan Emisi CO₂ Global berbasis Machine Learning,” J. Komtika (Komputasi dan Inform., vol. 9, no. 1, pp. 37–44, 2025, doi: https://doi.org/10.31603/komtika.v9i1.13449.
I. F. Riziq and A. R. Dzikrillah, “Impelementasi Algoritma LSTM Dan SVR Untuk Prediksi Harga Bitcoin Menggunakan Data Yahoo Finance,” METIK J., vol. 9, no. 2, pp. 284–291, 2025, doi: https://doi.org/10.47002/90ypad22.
A. B. Nagata, M. S. Hidajat, and D. A. Wibowo, “Predicting Gold Price Movement Using Long Short-Term Memory Model,” J. Appl. Intell. Syst., vol. 9, no. 1, pp. 19–28, 2024, doi: https://doi.org/10.62411/jais.v9i1.10305.
F. Nathaniel, S. Putra, M. Pradana, and F. S. Papilaya, “Analisa Prediksi Harga Emas Dengan Kemungkinan Terjadinya Resesi Menggunakan Metode SVR,” SINTECH (Science Inf. Technol. J., vol. 6, no. 1, pp. 37–46, 2023, doi: https://doi.org/10.31598/sintechjournal.v6i1.1329.
Y. R. Madhika, Kusrini, and T. Hidayat, “Gold Price Prediction Using the ARIMA and LSTM Models,” Sink. J. Dan Penelit. Tek. Inform., vol. 7, no. 3, pp. 1255–1264, 2023, doi: https://doi.org/10.33395/sinkron.v8i3.12461.
A. B. Sena, “Pemodelan Data Harga Emas Dengan Support Vector Regression,” Universitas Sebelas Maret, 2025. doi: https://doi.org/10.37010/nuc.v5i02.1767.
N. Hafizah, T. C. P. P, M. Sari, R. Winanda, R. Hidayatullah, and H. Harmonedi, “Identifikasi Variabel Penelitian , Jenis Sumber Data Dalam Penelitian Pendidikan,” QOSIM J. Pendidik. Sos. Hum., vol. 3, no. 2, pp. 586–596, 2025, doi: https://doi.org/10.61104/jq.v3i2.1025.
R. Hidayat, R. A. Fitri, and D. Hermina, “Langkah Penelitian Manajemen Pendidikan: Penemuan Masalah, Telaah Pustaka, Persiapan Penelitian, Pengumpulan Data, Analisis Data Dan Penyimpulan/Pemaknaan, Dan Pelaporan & Evaluasi Penelitian,” J. Ris. Multidisiplin Edukasi, vol. 2, no. 6, pp. 509–523, 2025, doi: https://doi.org/10.71282/jurmie.v2i6.509.
D. Leni, A. U. Berli, D. S. Kesuma, H. Haris, and R. Sumiati, “Evaluasi Pemodelan Augmentasi Data Sifat Mekanik Aluminium Menggunakan Generative Adversarial Networks,” J. Engine Energi, Manufaktur, Dan Mater., vol. 8, no. 1, pp. 9–21, 2024, doi: https://doi.org/10.30588/jeemm.v8i1.1645.
H. Utama, E. Daniati, and A. Masruro, “Weak Supervision Dengan Pendekatan Labeling Function Untuk Analisis Sentimen Pada Twitter,” Indones. J. Comput. Sci. Res., vol. 3, no. 1, pp. 49–57, 2024, doi: https://doi.org/10.59095/ijcsr.v3i1.93.
L. Judijanto, “Tinjauan Bibliometrik Komprehensif tentang Crowdsourcing dalam Penelitian Ilmiah dan Dunia Akademik,” Sanskara Manaj. Dan Bisnis, vol. 3, no. 02, pp. 89–99, 2025, doi: https://doi.org/10.58812/smb.v3i02.538.
M. S. A. Habibi, A. H. Abdillah, M. Idhom, and T. Trimono, “Perbandingan Kinerja Gru dan SVR untuk Prediksi Emas di Indonesia,” Inform. J. Tek. Inform. dan Multimed., vol. 5, no. 1, pp. 141–150, 2025, doi: https://doi.org/10.51903/informatika.v5i1.1105.
A. Hanafiah, Y. Arta, H. O. Nasution, and Y. D. Lestari, “Penerapan Metode Recurrent Neural Network dengan Pendekatan Long Short-Term Memory ( LSTM ) Untuk Prediksi Harga Saham,” Bull. Comput. Sci. Res., vol. 4, no. 1, pp. 27–33, 2023, doi: https://doi.org/10.47065/bulletincsr.v4i1.321.
T. B. Sianturi, I. Cholissodin, and N. Yudistira, “Penerapan Algoritma Long Short-Term Memory (LSTM) berbasis Multi Fungsi Aktivasi Terbobot dalam Prediksi Harga Ethereum,” J. Pengemb. Teknol. Inf. dan Ilmu Komput., vol. 7, no. 3, pp. 1101–1107, 2023, [Online]. Available: https://j-ptiik.ub.ac.id/index.php/j-ptiik/article/view/12384
R. F. Almahdy and W. M. P. D, “Prediksi Harga Rumah Di Kabupaten Bantul Menggunakan Algoritma Support Vector Regression,” J. Tek. Inform. dan Sist. Inf., vol. 11, no. 2, pp. 152–165, 2024, doi: https://doi.org/10.35957/jatisi.v11i2.6001.
N. K. Tran, L. C. Kühle, and G. W. Klau, “A critical review of multi-output support vector regression,” Pattern Recognit. Lett., vol. 178, pp. 69–75, 2024, doi: https://doi.org/10.1016/j.patrec.2023.12.007.
S. A. Rohma, “Prediksi Urban Heat Island (UHI) berdasarkan penginderaan jauh satelit menggunakan Support Vector Regresion,” UIN Malang, 2024. [Online]. Available: http://etheses.uin-malang.ac.id/id/eprint/65942
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Comparative Performance Analysis of Long Short-Term Memory (LSTM) and Support Vector Regression (SVR) Algorithms in Gold Price Prediction
Pages: 2078-2086
Copyright (c) 2025 Siti Lailiyah, Yunita Yunita, Hanifah Ekawati

This work is licensed under a Creative Commons Attribution 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 Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment 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 acknowledgment 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 (Refer to The Effect of Open Access).





















