Komparasi Metode LSTM dan GRU dalam Memprediksi Harga Saham
DOI:
https://doi.org/10.30865/mib.v8i2.7342Keywords:
GRU, LSTM, MAPE, RMSE, Stock PricesAbstract
The rapid development of technology has an impact on the economy of society, one of which is investing in stocks. Stocks are evidence of ownership of an individual's assets in a company. However, stock prices have very high levels of fluctuation, requiring accurate methods to assist in predicting stock prices. LSTM and GRU were chosen for their intrinsic ability to handle long-term and short-term problems in time series data. LSTM has a complex memory structure that allows decision-making based on long and short-term information. Meanwhile, GRU has a simpler structure with a focus on gate mechanisms to control information flow, resulting in lighter and faster models. Therefore, this study will compare two RNN methods, Long Short Term Memory (LSTM) and Gated Recurrent Unit (GRU), in predicting stock prices using MAPE and RMSE evaluation metrics. The combination of parameters used to evaluate the MAPE and RMSE values in this study includes learning rate, timestamps, batch size, and epoch. The results of this study show that the GRU method is more accurate compared to the LSTM method. This is evidenced by the evaluation results of the LSTM method with the lowest MAPE value of 2.42% and the lowest RMSE value of 0.01807, while the evaluation results of the GRU method with the lowest MAPE value of 2.14% and the lowest RMSE value of 0.01775. The combination of parameters used in this study also has an influence on the final MAPE and RMSE results, especially in the use of learning rates of 0.001 and 0.0001. Therefore, it can be concluded in this study that the GRU method is more accurate and effective compared to the LSTM method in predicting stock prices.References
A. N. Fadila and C. Nuswandari, “Apa Saja Faktor-Faktor Yang Mempengaruhi Harga Saham?,†2022. [Online]. Available: http://journal.stekom.ac.id/index.php/E-Bisnis■page283
D. Septiani, A. Martono, and L. Karlina, “Pengenalan Manajemen Investasi dan Pasar Modal Bagi Siswa/I dan Guru Akuntansi SMK Bintang Nusantara,†2020.
A. B. Untoro, “Prediksi Harga Saham Dengan Menggunakan Jaringan Syaraf Tiruan,†Jurnal Teknologi Informatika dan Komputer, vol. 6, no. 2, pp. 103–111, Sep. 2020, doi: 10.37012/jtik.v6i2.212.
Y. D. Lestari, E. Santoso, and A. Ridok, “Prediksi Harga Saham Menggunakan Metode Extreme Learning Machine (ELM) (Studi Kasus: Saham PT Bank Rakyat Indonesia),†2021. [Online]. Available: http://j-ptiik.ub.ac.id
S. N. Afifah and N. Fauziyyah, “Dampak Resesi 2023 terhadap Harga Saham di Indonesia,†2023.
D. Kusumawati and M. Safiq, “Analisis Faktor-Faktor yang Mempengaruhi Investment Opportunity Set dan Implikasinya Terhadap Return Saham,†2019.
Imam Halimi and Wahyu Andhyka Kusuma, “Prediksi Indeks Harga Saham Gabungan (IHSG) Menggunakan Algoritma Neural Network,†2018, [Online]. Available: https://id.investing.com/indices/idx-composite-historical-
M. Abdul Dwiyanto Suyudi, E. C. Djamal, A. Maspupah Jurusan Informatika, and F. Sains dan Informatika Universitas Jenderal Achmad Yani Cimahi, “Prediksi Harga Saham menggunakan Metode Recurrent Neural Network,†2019.
M. Ningsih, “Prediksi Harga Saham Harian PT BTPN Syariah Tbk Menggunakan Model Arima dan Model Garch,†Jurnal Ilmiah Ekonomi Islam, vol. 7, no. 03, pp. 1573–1580, 2021, doi: 10.29040/jiei.v7i3.2795.
A. Muliani Harahap and S. Fitrie, “IMPLEMENTASI GATED RECURRENT UNIT (GRU) UNTUK PREDIKSI HARGA SAHAM BANK KONVENSIONAL DI INDONESIA,†JISTech (Journal of Islamic Science and Technology) JISTech, vol. 6, no. 2, pp. 42–49, 2021, [Online]. Available: http://jurnal.uinsu.ac.id/index.php/jistech
W. Hastomo, A. Satyo, B. Karno, N. Kalbuana, E. Nisfiani -4, and L. Etp -, “Optimasi Deep Learning untuk Prediksi Saham di Masa Pandemi Covid-19,†2021.
G. Budiprasetyo, M. Hani’ah, and D. Z. Aflah, “Prediksi Harga Saham Syariah Menggunakan Algoritma Long Short-Term Memory (LSTM),†Jurnal Nasional Teknologi dan Sistem Informasi, vol. 8, no. 3, pp. 164–172, Jan. 2023, doi: 10.25077/teknosi.v8i3.2022.164-172.
R. A. Saputra, Y. Azhar, and V. Rahmayanti, “Prediksi Permintaan Kargo pada Cargo Service Center Tangerang City Menggunakan Metode Gated Recurrent Unit,†REPOSITOR, vol. 2, no. 8, pp. 1113–1122, 2020.
Khalis Sofi, Aswan Supriyadi Sunge, Sasmitoh Rahmad Riady, and Antika Zahrotul Kamalia, “PERBANDINGAN ALGORITMA LINEAR REGRESSION, LSTM, DAN GRU DALAM MEMPREDIKSI HARGA SAHAM DENGAN MODEL TIME SERIES,†SEMINASTIKA, vol. 3, no. 1, pp. 39–46, Nov. 2021, doi: 10.47002/seminastika.v3i1.275.
A. Yunizar, T. Rismawan, D. Marisa Midyanti, R, and F. H. MIPA Universitas Tanjungpura Jalan Hadari Nawawi Pontianak, “Penerapan Metode Recurrent Neural Network Model Gated Recurrent Unit Untuk Prediksi Harga Cryptocurrency,†2023.
L. Wiranda and M. Sadikin, “Penerapan Long Short Term Memory pada Data Time Series untuk Memprediksi Penjualan Produk PT. Metiska Farma,†2019.
M. Agus Sholeh and R. Hidayat, “Perbandingan Model LSTM Dan GRU Untuk Memprediksi Harga Minyak Goreng di Indonesia,†Sains dan Teknologi, vol. 9, no. 3, pp. 2022–800, 2022, doi: 10.47668/edusaintek.v9i3.593.
I. Nabillah and I. Ranggadara, “Mean Absolute Percentage Error untuk Evaluasi Hasil Prediksi Komoditas Laut,†JOINS (Journal of Information System), vol. 5, no. 2, pp. 250–255, Nov. 2020, doi: 10.33633/joins.v5i2.3900.
F. Andreas, U. Enri, and U. Singaperbangsa Karawang Abstract, “Perbandingan Algoritma Backpropagation Neural Network dan Long Short-Term Memory dalam Memprediksi Harga Bitcoin,†Jurnal Ilmiah Wahana Pendidikan, vol. 2022, no. 12, pp. 547–558, 2022, doi: 10.5281/zenodo.700976.
A. Kurniawati, M. Sabri Ahmad, M. Fhadli, and S. Lutfi, “Analisis Perbandingan Metode Time Series Forecasting Untuk Prediksi Penjualan Obat di Apotek (Studi Kasus: Kimia Farma Apotek Takoma),†2023.
Moch Farryz Rizkilloh and Sri Widiyanesti, “Prediksi Harga Cryptocurrency Menggunakan Algoritma Long Short Term Memory (LSTM),†Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 6, no. 1, pp. 25–31, Feb. 2022, doi: 10.29207/resti.v6i1.3630.
I. Damanik, I. B. P. Gunadnya, and I. G. N. A. Aviantara, “Penggunaan Beberapa Model Peramalan (Forecasting) untuk Produksi Gula Kristal Putih di PT. Perkebunan Nusantara X,†2022. [Online]. Available: http://ojs.unud.ac.id/index.php/beta
Downloads
Published
Issue
Section
License

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).