Comparative Analysis of LSTM and GRU Models for Predicting BBCA and BBNI Stock Prices
|
Keywords:
Stock Price Prediction, Long Short-Term Memory, Gated Recurrent Unit, Deep Learning, Time Series
AbstractStock price predictions always a challenging issue as the price data consists of variable, noisy, non-linear time dependence. This research aims as a testing ground to compare the performance of two deep learning algorithms, long short-term memory and gated recurrent units, in predicting the end price of PT Bank Central Asia Tbk, that is relatively stable compares to PT Bank Negara Indonesia Tbk which more volatile. Daily prices were obtained from Yahoo Finance over the previous period from January1, 2019 until Dec 1, 2025. Data cleaning, Min-Max normalization, 80:20 data split, and sequence-formation with a timestep of 60 were performed. To facilitate fair comparison and ensure that the performance differences are only due to architecture, both models were constructed with the same architecture (two layers of 50 units, 0.2 dropout, Adam optimizer, MSE loss function, and 50 epochs). It evaluated MSE, RMSE performance, MAE performance, R-squared with accuracy adjusted for a 5% tolerance range. The results suggest that GRU outperforms LSTM on both stocks. For the BBCA, GRU reached an RMSE of 101.12, MAE of 113.82, R-squared of 0.96, and tolerance accuracy of 98.52%, compared to BBNI which had an RMSE of 62.95, MAE of 71.24, R-squared of 0.92, and tolerance accuracy of 94.11%. This performance led us to realize that GRU is the numerical equivalent to this technique, and on both datasets, it was computationally faster. These results reveal that simpler GRU structure is more adaptive, especially with stocks of high volatility like BBNI.Downloads
Download data is not yet available.
ReferencesSofi, K., Sunge, A. S., Riady, S. R., & Kamalia, A. Z. (2021). Perbandingan Algoritma Linear Regression, LSTM, dan GRU dalam Memprediksi Harga Saham dengan Model Time Series. SEMINASTIKA, 3(1), 39–46. DOI: https://doi.org/10.47002/seminastika.v3i1.275 . Fahrezi, R. A., Wijaya, M. Y., & Fitriyati, N. (2024). Prediksi Harga Penutupan Saham Bank Central Asia: Implementasi Algoritma Long Short-Term Memory dan Perbandingannya dengan Support Vector Regression. Lebesgue: Jurnal Ilmiah Pendidikan Matematika, Matematika dan Statistika, 5(1), 452–464. DOI: https://doi.org/10.46306/lb.v5i1 . Nurrimah, N., & Rustam, Z. (2020). Stock Price Trend Prediction Method Based on support vector machines with Fisher score. In AIP Conference Proceedings (Vol. 2242). American Institute of Physics Inc. DOI: https://doi.org/10.1063/5.0007893 Bhandari, H. N., Rimal, B., Pokhrel, N. R., Rimal, R., Dahal, K. R., & Khatri, R. K. C. (2022). Predicting Stock Market Index Using LSTM. Machine Learning with Applications, 9, Article 100320. DOI: https://doi.org/10.1016/j.mlwa.2022.100320 . Pipin, S. J., Purba, R., & Kurniawan, H. (2023). Prediksi Saham Menggunakan Recurrent Neural Network (RNN-LSTM) dengan Optimasi Adaptive Moment Estimation. Journal of Computer System and Informatics (JoSYC), 4(4), 806–815. DOI: https://doi.org/10.47065/josyc.v4i4.4014 . Amiri, S. B., Amidian, A., & Fasihfar, Z. (2025). Intelligent Stock Price Prediction using LSTM, GRU, ARIMA, and ARIMAX models: Analysis and performance comparison. Accounting and Auditing with Applications, 2(2), 109–121. DOI: https://doi.org/10.22105/aaa.v2i2.67 . Rahayu, C., Abdullah, D., & Yunizar, Z. (2023). Implementation of Long Short-Term Memory (LSTM) Algorithm for Predicting Stock Price Movements of LQ45 index (Case study: BBCA stock price). Bulletin of Engineering Science, 1(2), 50–59. DOI: https://doi.org/10.59733/besti.v1i2.6 . Danestiara, V. R., Setiana, E., Akbar, I., & Hidayah, T. (2024). Algoritma Gated Recurrent Unit untuk Prediksi Harga Indeks Penutupan Saham LQ45. Jurnal Accounting Information System (AIMS), 7(1), 1–8. DOI: https://doi.org/10.32627/aims.v7i1.814 . Samsudin, Harahap, A. M., & Fitrie, S. (2021). Implementasi Gated Recurrent Unit (GRU) untuk Prediksi Harga Saham Bank Konvensional di Indonesia. JISTech (Journal of Islamic Science and Technology), 6(2), 42–49. DOI: https://doi.org/10.30829/jistech.v6i2.11058 . Hansun, S., & Young, J. C. (2021). Predicting LQ45 Financial Sector Indices using RNN-LSTM. Journal of Big Data, 8(1), Article 104. DOI: https://doi.org/10.1186/s40537-021-00495-x . Tunggal, A., & Prathivi, R. (2025). Analisis Perbandingan Metode ARIMA dan LSTM untuk Prediksi Penjualan Harga Saham BNI. KESATRIA: Jurnal Penerapan Sistem Informasi (Komputer & Manajemen), 6(1), 158–164. DOI: https://doi.org/10.30645/kesatria.v6i1.557 . Silalahi, R. N., & Muljono, M. (2024). Perbandingan Kinerja Metode Linear Regression, LSTM dan GRU untuk Prediksi Harga Penutupan Saham Coca-Cola. Komputika: Jurnal Sistem Komputer, 13(2), 201–211. DOI: https://doi.org/10.34010/komputika.v13i2.12265 . Zhong, Z., Wu, D., & Mai, W. (2023). Stock Prediction Based on ARIMA model and GRU model. Academic Journal of Computing & Information Science, 6(7), 114–123. DOI: https://doi.org/10.25236/ajcis.2023.060715 . Prayogi, K., Gata, W., & Kussanti, D. P. (2024). Prediksi harga saham Bank Central Asia menggunakan algoritma deep learning GRU. JUTISI: Jurnal Ilmiah Teknik Informatika dan Sistem Informasi, 13(1), 647–658. DOI: https://doi.org/10.35889/jutisi.v13i1.1910 . Alsheebah, F. M. M., & Al-Fuhaidi, B. (2024). Emerging Stock Market Prediction using GRU algorithm: Incorporating Endogenous and Exogenous Variables. IEEE Access, 12, 132964–132971. DOI: https://doi.org/10.1109/ACCESS.2024.3444699 . Hanafiah, A., Arta, Y., Nasution, H. O., & Lestari, Y. D. (2023). Penerapan Metode Recurrent Neural Network dengan Pendekatan Long Short-Term Memory (LSTM) untuk Prediksi Harga Saham. Bulletin of Computer Science Research, 4(1), 27–33. DOI: https://doi.org/10.47065/bulletincsr.v4i1.321 . Idham, Akbar, G. T., Panggabean, S., & Noor, M. (2022). Perbandingan Prediksi Harga Saham dengan Menggunakan LSTM, GRU, dan Transformer. Smart Comp, 11(1), 44–47. DOI: https://doi.org/10.30591/smartcomp.v11i1.3185 . Chen, C., Xue, L., & Xing, W. (2023). Research on Improved GRU-based Stock Price Prediction Method. Applied Sciences, 13(15). DOI: https://doi.org/10.3390/app13158813 . Saeed, B., & Yin, W. (2025). Optimizing Stock Price Prediction for South Asian Markets Using LSTM, GRU, CNN with greedy algorithm. Research Square. DOI: https://doi.org/10.21203/rs.3.rs-5847917/v1 . Rosyd, A., Purnamasari, A. I., & Ali, I. (2024). Penerapan Metode Long Short-Term Memory (LSTM) dalam Memprediksi Harga Saham PT Bank Central Asia. Jurnal Mahasiswa Teknik Informatika, 8(1). DOI: https://doi.org/10.36040/jati.v8i1.8440 . Tholib, A., Agusmawati, N. K., & Khoiriyah, F. (2023). Prediksi Harga Emas Menggunakan Metode LSTM dan GRU. Jurnal Informatika dan Teknik Elektro Terapan, 11(3). DOI: https://doi.org/10.23960/jitet.v11i3.3250 . |
Published
2026-06-30
Section
Articles
How to Cite
Irfansyah, M., Pramudito, D. K., & Sanudin. (2026). Comparative Analysis of LSTM and GRU Models for Predicting BBCA and BBNI Stock Prices. Jurnal Informatika Ekonomi Bisnis, 8(2), 531-536. https://doi.org/10.37034/infeb.v8i2.1467
![]() This work is licensed under a Creative Commons Attribution 4.0 International License. |


















