Hybrid LSTM Optimized by Genetic Algorithm for Accurate Gold Price Forecasting to Support Investment Decisions

Authors

  • Chairunnisyah Widi Pratiwi Information Systems, STIKOM Tunas Bangsa, Indonesia
  • Anjar Wanto Department of Informatics Magister’s, STIKOM Tunas Bangsa, Indonesia
  • Hendry Qurniawan Information Systems, STIKOM Tunas Bangsa, Indonesia

DOI:

https://doi.org/10.52436/1.jutif.2026.7.4.5614

Keywords:

Gold Price Prediction, Long Short-Term Memory, Genetic Algorithm, Time Series Forecasting, Investment Decision-Making

Abstract

Gold price volatility poses a major challenge for investors in making accurate and timely investment decisions, as price movements are influenced by complex and nonlinear financial dynamics. Conventional forecasting models often fail to capture these patterns optimally due to suboptimal parameter selection. This study aims to develop a hybrid forecasting model by optimizing the Long Short-Term Memory (LSTM) network using a Genetic Algorithm (GA) to improve gold price prediction accuracy. Historical gold price data spanning from 2004 to 2025, including Open, High, Low, and Close attributes, were utilized in this research. The methodological framework consists of data preprocessing, normalization, time-series sequence construction, dataset partitioning using an 80:20 training–testing ratio, and hyperparameter optimization through GA. Model performance was evaluated using Root Mean Square Error (RMSE), Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), and prediction accuracy. Experimental results demonstrate that GA-based optimization significantly enhances LSTM performance, with RMSE reduced by more than 80%, accompanied by substantial decreases in MAE and MAPE, and an increase in prediction accuracy to 99.77%. These findings confirm that systematic hyperparameter optimization plays a crucial role in improving deep learning model generalization for financial time series forecasting. The proposed LSTM–GA model contributes to the development of more robust and reliable predictive frameworks for financial applications, particularly in supporting investment decision-making under volatile market conditions.

Downloads

Download data is not yet available.

References

A. Amini and R. Kalantari, “Gold price prediction by a CNN-Bi-LSTM model along with automatic parameter tuning,” PLoS One, vol. 19, no. 3, pp. 1–17, 2024, doi: 10.1371/journal.pone.0298426.

Y. Ye, “Improved Gold Price Prediction Based on the LSTM-ARIMA Hybrid Model,” Appl. Comput. Eng., vol. 165, no. 1, pp. 56–65, 2025, doi: 10.54254/2755-2721/2025.ld24518.

R. A. Dalimunthe, R. T. Adek, and C. Agusniar, “Gold Price Prediction Using Long-Short Term Memory Algorithm Based on Web Application,” Int. J. Eng. Sci. Inf. Technol., vol. 5, no. 1, pp. 329–339, 2025, doi: 10.52088/ijesty.v5i1.724.

H. Zheng, “Analysis of International Gold Prices Using ARIMA, SVR with Linear Regression,” J. Adv. Manag. Sci., vol. 13, no. 1, pp. 15–21, 2025, doi: 10.18178/joams.13.1.15-21.

W. Gong, “Research on gold price forecasting based on lstm and linear regression,” SHS Web Conf., vol. 181, no. 5, pp. 1–5, 2024, doi: 10.1051/shsconf/202418102005.

A. Saini, R. K. Singh, and P. Sinha, “Forecasting gold price using hybrid deep neural network LSTM-autoencoder,” Discov. Artif. Intell., vol. 5, no. 281, pp. 1–19, 2025, doi: 10.1007/s44163-025-00464-w.

Y. Wang and T. Lin, “A Novel Deterministic Probabilistic Forecasting Framework for Gold Price with a New Pandemic Index Based on Quantile Regression Deep Learning and Multi-Objective Optimization,” mathematics, vol. 12, no. 1, pp. 1–21, 2024, doi: 10.3390/math12010029 Academic.

P. S. Sivaranjani and K. Thulasimani, “Gold Price Forecasting Based on Regularized Linear Models and Extreme Gradient Boosting,” Int. J. Sci. Res. Eng. Dev., vol. 8, no. 5, pp. 471–480, 2025, doi: 10.5281/zenodo.17177854.

S. K. Poor, “Gold Price Forecasting : A Novel Approach Based On Text Mining And Big-Data-Driven,” Sciendo(Studies Bus. Econ., vol. 19, no. 3, pp. 156–171, 2024, doi: 10.2478/sbe-2024-0049.

J. Li, “Gold Price Prediction Based on CNN-LSTM,” Financ. Eng. Risk Manag., vol. 7, no. 2, pp. 116–123, 2024, doi: 10.23977/ferm.2024.070216.

Z. Wang, “The Effectiveness of Forecasting Gold Prices Using ARIMA Models,” Adv. Econ. Manag. Polit. Sci., vol. 185, no. 1, pp. 232–241, 2025, doi: 10.54254/2754-1169/2025.LH23823.

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

Y. Gu, “Underlying factors for gold price prediction based on ARIMA models,” Appl. Comput. Eng., vol. 101, no. 1, pp. 147–153, 2024, doi: 10.54254/2755-2721/101/20240993.

Y. Bai, “Research on gold price prediction based on ARIMA model,” Theor. Nat. Sci., vol. 52, no. 1, pp. 41–48, 2024, doi: 10.54254/2753-8818/52/2024ch0109.

N. Khairunisa and P. Hendikawati, “Long Short-Term Memory and Gated Recurrent Unit Modeling for Stock Price Forecasting,” J. Mat. Stat. dan Komputasi, vol. 21, no. 1, pp. 321–333, 2024, doi: 10.20956/j.v21i1.35930.

W. Zhu et al., “An optimized long short-term memory ( LSTM ) -based approach applied to early warning and forecasting of ponding in the urban drainage system,” Hydrol. Earth Syst. Sci., vol. 27, no. 10, pp. 2035–2050, 2023, doi: 10.5194/hess-27-2035-2023.

D. Robi and B. Surarso, “Modification of the LSTM Model in Time Series Data Prediction,” LONTAR Komput., vol. 16, no. 1, pp. 14–26, 2025, doi: 10.24843/LKJITI.2025.v16.i01.p02.

D. P. A. R, L. Cahyadi, F. V. Ferdinand, and K. V. I. Saputra, “Analysis Of Long Short – Term Memory ( LSTM ) Parameters In Predicting IHSG,” JOHMEJournal Holist. Math. Educ., vol. 9, no. 2, pp. 213–224, 2025, doi: 10.19166/johme.v9i2.10220.

S. Saifullah, “Comparative Analysis of Long Short-Term Memory and Gated Recurrent Unit Models for Chicken Egg Fertility Classification Using Deep Learning †,” Eng. Proc., vol. 87, no. 1, pp. 1–9, 2025, doi: 10.3390/ engproc2025087007 Copyright:

Q. Yu, B. A. Tolson, H. Shen, M. Han, J. Mai, and J. Lin, “Enhancing long short-term memory ( LSTM ) -based streamflow prediction with a spatially distributed approach,” Hydrol. Earth Syst. Sci., vol. 28, no. 9, pp. 2107–2122, 2024, doi: 10.5194/hess-28-2107-2024.

D. P. Utomo, “Peramalan Penyinaran Matahari Per Jam Satu Hari Ke Depan Menggunakan Model Long Short-Term Memory ( LSTM ),” JITET(Jurnal Inform. dan Tek. Elektro Ter., vol. 13, no. 3, pp. 876–886, 2025, doi: 10.23960/jitet.v13i3S1.7883.

W. Irmayani and W. E. Jayanti, “Visualisasi Prediksi Harga Saham Menggunakan Model Long Short-Term Memory ( LSTM ),” JUSTIAN (Jurnal Sist. Inf. Akuntansi), vol. 6, no. 1, pp. 1–8, 2025, doi: 10.31294/justian.v6i1.8107.

M. Krichen and A. Mihoub, “Long Short-Term Memory Networks : A Comprehensive Survey,” AI, vol. 6, no. 9, pp. 1–21, 2025, doi: 10.3390/ai6090215.

G. H. H. Nayak et al., “Meta-transformer: leveraging metaheuristic algorithms for agricultural commodity price forecasting,” J. Big Data, vol. 12, no. 1, 2025, doi: 10.1186/s40537-025-01196-5.

M. M. Al Haromainy, D. A. Prasetya, and A. P. Sari, “Improving Performance of RNN-Based Models With Genetic Algorithm Optimization For Time Series Data,” TIERS Inf. Technol. J., vol. 4, no. 1, pp. 16–24, 2023, doi: 10.38043/tiers.v4i1.4326.

L. Liang, H. Shi, Z. Wang, S. Wang, C. Li, and M. Diao, “Research on time series prediction model for multi-factor environmental parameters in facilities based on LSTM-AT-DP model,” Front. Plant Sci., vol. 16, no. August, pp. 1–20, 2025, doi: 10.3389/fpls.2025.1652478.

F. Santosa, E. Oktafanda, H. Setiawan, and A. Latif, “Advanced Long Short-Term Memory (LSTM) Models for Forecasting Indonesian Stock Prices,” J. Galaksi, vol. 1, no. 3, pp. 198–208, 2024, doi: 10.70103/galaksi.v1i3.42.

I. E. Agbehadji and I. C. Obagbuwa, “A hybrid long short-term memory with generalized additive model and post-hoc explainable artificial intelligence with causal inference for air pollutants prediction in Kimberley, South Africa,” Front. Artif. Intell., vol. 8, no. 2, pp. 1–17, 2025, doi: 10.3389/frai.2025.1620019.

S. Ardiansyah, P. N. Madiawati, and A. M. Hidayat, “Application of Recurrent Neural Network (RNN) and Long Short- Term Memory (LSTM) for Predicting Cryptocurrency Prices in Optimizing Investment Strategies on Bitcoin,” Int. J. Financ. Bank. Stud., vol. 14, no. 2, pp. 167–176, 2025, doi: 10.20525/ijfbs.v14i2.3622.

N. Wang, M. Wang, and J. Zhang, “A hybrid VMD-LSTM-SVR model for landslide prediction,” Front. Built Environ., vol. 11, no. August, pp. 1–12, 2025, doi: 10.3389/fbuil.2025.1630201.

Hermansyah, M. Muhajir, and P. Canas Rodrigues, “Indonesian Inflation Forecasting with Recurrent Neural Network Long Short-Term Memory (RNN-LSTM),” Int. J. Appl. Stat. DATA Sci., vol. 4, no. 2, pp. 132–142, 2024, doi: 10.20885/enthusiastic.vol4.iss2.art5.

A. Saepulrohman and A. Chairunnas, “Optimization of Stock Price Prediction Using Long Short-Term Memory ( LSTM ) Algorithm and Cross-Industry Standard Process Approach for Data Mining ( CRISP-DM ),” Int. J. Electron. Commun. Syst., vol. 5, no. 1, pp. 19–30, 2025, doi: 10.24042/ijecs.v5i1.26727.

X. Wang et al., “Genetic algorithm-based secure cooperative control for high-order nonlinear multi-agent systems with unknown dynamics,” J. Cloud Comput., vol. 13, no. 1, pp. 1–17, 2024, doi: 10.1186/s13677-023-00532-5.

W. H. Lam, W. S. Lam, and P. F. Lee, “A Bibliometric Analysis of a Genetic Algorithm for Supply Chain Agility,” Mathematics, vol. 12, no. 8, pp. 1–22, 2024, doi: 10.3390/math12081199.

A. Al-Zuheri, H. S. Ketan, and L. L. Alwan, “Analysis Effect of Parameters of Genetic Algorithm on a Model for Optimization Design of Sustainable Supply Chain Network under Disruption Risks,” Manag. Syst. Prod. Eng., vol. 32, no. 2, pp. 252–264, 2024, doi: 10.2478/mspe-2024-0025.

Additional Files

Published

2026-08-14

How to Cite

[1]
C. Widi Pratiwi, A. Wanto, and H. Qurniawan, “Hybrid LSTM Optimized by Genetic Algorithm for Accurate Gold Price Forecasting to Support Investment Decisions”, J. Tek. Inform. (JUTIF), vol. 7, no. 4, pp. 3165–3181, Aug. 2026.