PREDIKSI HARGA EMAS MENGGUNAKAN ALGORITMA LONG SHORT TERM MEMORY (LSTM) & GATED RECURRENT UNIT (GRU) - Hendra, Zana Vania; Ramadhani, Monica Alya; Chintya, Indri; Rahmatullah, Yuvi; Ismanto, Edi (Jurnal Rekayasa Perangkat Lunak dan Sistem Informasi, 2026)
Gold is an asset that has a hedge against inflation and global economic volatility, making it interesting to analyze as an investment instrument. This study aims to compare the performance of Long Short Term Memory (LSTM) and Gated Recurrent Unit (GRU) models in predicting gold prices using historical data from 2013 to 2022. The data used includes daily gold prices and goes through a preprocessing stage before being divided into training (80%) and testing (20%) data. LSTM and GRU models were trained with epoch and batch size variations, then evaluated using MAE, RMSE, MSE, and MAPE metrics. The results showed that the GRU model with 50 epochs performed best, with MAE 0.0145, RMSE 0.0186, MSE 0.0003, and MAPE 1.9209%, better than LSTM which produced higher errors. The residual graph also shows that GRU produces stable predictions with a random error distribution that is close to zero. These findings confirm that GRU is more accurate and efficient in modeling gold price time series, and has the potential to be implemented in artificial intelligence-based commodity price prediction systems.