Implementation of the Gated Recurrent Unit (GRU) Model for Bank Mandiri Stock Price Prediction

Renda Sandi Saputra, Dede Irman Pirdaus, Moch Panji Agung Saputra

Abstract


Stock price prediction is a crucial aspect in the financial world, especially in making investment decisions. This study aims to analyze the performance of the Gated Recurrent Unit (GRU) model in predicting Bank Mandiri (BMRI.JK) stock prices using historical data for five years. Stock data was collected from Yahoo Finance and normalized using Min-Max Scaling to improve model stability. Furthermore, the windowing technique was applied to form a dataset that fits the architecture of the time series forecasting-based model. The developed GRU model consists of two GRU layers with 128 neuron units, two dropout layers to prevent overfitting, and one output layer with one neuron to predict stock prices. Model evaluation was carried out using the Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), and R-squared (R² Score) metrics. The experimental results show that the GRU model is able to produce predictions with a high level of accuracy, indicated by the R² Score value of 0.9636, which indicates that the model can explain 96.36% of stock price variability based on historical data.

Keywords


Stock price prediction, gated recurrent unit (GRU), deep learning, time series, mandiri bank stock

Full Text:

PDF

References


Fleischer, J. P., von Laszewski, G., Theran, C., & Parra Bautista, Y. J. (2022). Time series analysis of cryptocurrency prices using long short-term memory. Algorithms, 15(7), 230.

Ghadimpour, M., & Ebrahimi, S. B. (2022). Forecasting Financial Time Series Using Deep Learning Networks: Evidence from Long-Short Term Memory and Gated Recurrent Unit. Iranian Journal of Finance, 6(4), 81-94.

Lee, T., & Singh, V. P. (2023). Deep learning: Long short-term memory in hydrological time series. In Handbook of Hydroinformatics (pp. 49-67). Elsevier.

Lewinson, E. (2022). Python for Finance Cookbook: Over 80 powerful recipes for effective financial data analysis. Packt Publishing Ltd.

Li, X. (2023). CNN-GRU model based on attention mechanism for large-scale energy storage optimization in smart grid. Frontiers in Energy Research, 11, 1228256.

Martina, A., & Girana, I. (2024). Application of Singular Spectrum Analysis (SSA) Decomposition in Artificial Neural Network (ANN) Forecasting. International Journal on Information and Communication Technology (IJoICT), 10(1), 13-27.

Oğuz, A., & Ertuğrul, Ö. F. (2023). Introduction to deep learning and diagnosis in medicine. In Diagnostic Biomedical Signal and Image Processing Applications with Deep Learning Methods (pp. 1-40). Academic Press.

Sharma, A., Guha, D., Agarwal, H., & Harshadbhai, K. M. Stock Market Prediction and Investment using Deep Reinforcement Learning-a Continuous Training Pipeline.

Soni, P., Tewari, Y., & Krishnan, D. (2022). Machine learning approaches in stock price prediction: a systematic review. In Journal of Physics: Conference Series (Vol. 2161, No. 1, p. 012065). IOP Publishing.

Wang, C., Du, W., Zhu, Z., & Yue, Z. (2020). The real-time big data processing method based on LSTM or GRU for the smart job shop production process. Journal of Algorithms & Computational Technology, 14, 1748302620962390.




DOI: https://doi.org/10.46336/ijqrm.v6i1.894

Refbacks

  • There are currently no refbacks.


Copyright (c) 2025 Moch Panji Agung Saputra, Dede Irman Pirdaus, Renda Sandi Saputra

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

Published By: 

IJQRM: Jalan Riung Ampuh No. 3, Riung Bandung, Kota Bandung 40295, Jawa Barat, Indonesia

 

IJQRM Indexed By: 

width=width= width= width= width= width= width= 

 


Lisensi Creative Commons Creation is distributed below Lisensi Creative Commons Atribusi 4.0 Internasional.


View My Stats