Analisis Kinerja Model Long Short-Term Memory (LSTM) dan Gated Recurrent Unit (GRU) dalam Aplikasi Prediksi Harga Emas Berbasis Website
Irfan Fauzi, Dr. Umar Taufiq, S.Kom., M.Cs.
2026 | Tugas Akhir | D4 Teknologi Perangkat Lunak
Pergerakan harga emas terus mengalami fluktuasi sehingga diperlukan pendekatan analisis yang tepat untuk memahami pola pergerakannya. Dalam penelitian ini dikembangkan aplikasi prediksi harga emas berbasis web menggunakan model Long Short-Term Memory (LSTM). Model ini hanya memanfaatkan data harga penutupan emas (gold close price) sebagai atribut utama dalam proses pelatihan, karena nilai harga penutupan dianggap paling stabil dan umum dijadikan acuan dalam analisis harian. Dalam penelitian ini, Simple Moving Average (SMA), Exponential Moving Average (EMA), dan Relative Strength Index (RSI) digunakan sebagai indikator untuk visualisasi pendukung dalam aplikasi web dan tidak dijadikan fitur input untuk model prediksi. Model LSTM dilatih menggunakan data historis close price yang telah dinormalisasi sehingga model dapat mempelajari pola pergerakan harga dari waktu ke waktu. Namun, perbandingan performa menunjukkan bahwa algoritma Gated Recurrent Unit (GRU) memberikan hasil yang lebih akurat dan lebih stabil dibandingkan LSTM. Berdasarkan hasil pengujian, model GRU menghasilkan nilai Root Mean Squared Error (RMSE) sebesar 36.68, Mean Absolute Error (MAE) sebesar 25.39, Mean Absolute Percentage Error (MAPE) sebesar 0.96%, dan koefisien determinasi (R²) sebesar 0,9971. Hasil ini menunjukkan bahwa model GRU memiliki tingkat kesalahan yang rendah dan kemampuan prediksi yang sangat baik. Struktur GRU yang lebih sederhana memungkinkan proses pelatihan yang lebih efisien, sekaligus tetap efektif dalam menangkap pola sekuensial pada data harga emas, sehingga menghasilkan performa prediksi yang lebih optimal. Aplikasi web yang dikembangkan memungkinkan pengguna menampilkan grafik harga emas, indikator teknikal, dan hasil prediksi secara interaktif. Sistem ini diharapkan dapat menjadi alat bantu yang efektif bagi investor maupun analis dalam memahami pergerakan harga emas dan dalam mendukung pengambilan keputusan berbasis data.
The movement of gold prices continues to fluctuate, requiring an appropriate analytical approach to understand its underlying patterns. In this study, a web-based gold price prediction application was developed using the Long Short-Term Memory (LSTM) model. This model utilizes only gold closing price data as the primary attribute during the training process, as the closing price is considered the most stable value and is commonly used as a reference in daily price analysis. Technical indicators such as the Simple Moving Average (SMA), Exponential Moving Average (EMA), and Relative Strength Index (RSI) are presented in the web application as supporting visualizations. However, these indicators are not included as input features for the prediction model. The LSTM model was trained using normalized historical closing price data, enabling the network to learn price movement patterns over time. Nevertheless, performance comparisons indicate that the Gated Recurrent Unit (GRU) algorithm produces more accurate and more stable predictions than LSTM. Based on the evaluation results, the GRU model achieved a Root Mean Squared Error (RMSE) of 36.68, a Mean Absolute Error (MAE) of 25.39, a Mean Absolute Percentage Error (MAPE) of 0.96%, and a coefficient of determination (R²) of 0.9971. These results demonstrate that the GRU model exhibits low error levels and excellent predictive capability. The simpler architecture of the GRU allows for a more efficient training process while remaining effective in capturing sequential patterns in gold price data, leading to more optimal predictive performance. The developed web application enables users to interactively visualize gold price charts, technical indicators, and prediction results. This system is expected to serve as an effective tool for investors and analysts in understanding gold price movements and supporting data-driven decision-making.
Kata Kunci : Prediksi harga emas, Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU), peramalan deret waktu, machine learning.