ANALISIS PERBANDINGAN MODEL GRU DAN LSTM UNTUK PREDIKSI HARGA SAHAM BANK RAKYAT INDONESIA Deep Learning, GRU (Gated Recurrent Unit), LSTM (Long Short-Term Memory), Stock Price Prediction

Main Article Content

Yogi Perdana
Nindy Raisa Hanum
Andre Rabiula
Yandi Anzari

Abstract

This research implements and compares two deep learning architectures, Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU), for predicting the stock price of Bank Rakyat Indonesia (BRI) using historical data from February 2023 to October 2024. Through systematic hyperparameter tuning and comprehensive evaluation, the study finds that GRU consistently outperforms LSTM across all regression metrics, with a 10.7% improvement in R² and an 18.5% reduction in MAPE. The optimal GRU configuration (100 units, 100 epochs, batch size 32, learning rate 0.001) achieves an MSE of 6517.5 and MAPE of 1.3764%. Visual analysis confirms GRU's superior ability to capture stock price fluctuations and adapt more quickly to trend changes. The simpler architecture of GRU with fewer parameters proves more effective for handling the high-noise characteristics and varying volatility of stock price data. While both models face challenges in predicting extreme market events, GRU demonstrates better resilience and faster recovery after such occurrences. This research contributes to the understanding of recurrent neural network applications in financial time series forecasting and provides practical insights for developing more accurate stock price prediction systems.

Downloads

Download data is not yet available.

Article Details

Section

Articles

References

Chen, J., et al. 2021. Advanced stock price prediction using deep learning algorithms: A comprehensive study of market dynamics. Journal of Financial Technology, 15(3), 234 251.

Goudar, A., D., et al. 2022. Predicting Stock market Trends Using Machine Learning and Deep Learning Algorithm. International Research Journal of Computer Science.

Hanum, N., R., et al. 2024. Implementation of Machine Learning for Stock Price Prediction Using the LSTM Algorithm. Media Journal of Information System and Informatics, 1(1), 31-37.

Janiesch, C., et al. 2021. Machine learning and deep learning. Electronic Markets, 31, 685–695.

Jiang, X., & Liu, M. 2020. Evolution of machine learning applications in stock market prediction. Journal of Financial Computing, 25(4), 312-328.

Li, X., & Wu, Y. 2024. Integration of market sentiments and technical indicators in RNN based stock prediction models. Journal of Computational Finance, 12(1), 78-95.

Noh, S.-H. 2021. Analysis of Gradient Vanishing of RNNs and Performance Comparison. Information, 12(11), 442. Rath, S., et al., B. K. 2023. An Analytic Review on Stock Market Price Prediction using Machine Learning and Deep Learning Techniques. Recent Patents on Engineering, 18(2).

Siami-Namini, S., et al. 2019. A Comparison of ARIMA and LSTM in Forecasting Time Series. 17th IEEE International Conference on Machine Learning and Applications (ICMLA), 1394-1401.

Waladi, A., et al. 2024. Stock Price Prediction Using Machine Learning Based on RNN Algorithms. Media Journal of Information System and Informatics, 1(1), 1-8.

Wang, X., & Li, P. 2022. Enhancing Stock Price Predictions with LSTM and Deep Learning Techniques. Journal of Financial Data Science, 5(2), 117-130.

Zhang, Y., et al. 2022. Comparative Analysis of LSTM and ARIMA Models for Stock Price Prediction in High Volatility Markets. Journal of Financial Markets and Data Science, 5(3), 112-125.