Comparison of LSTM, GRU, Bi-LSTM, and XGBoost for BRIS Stock Price Prediction with Lookback Period Variations

Authors

  • Subekti Wahyu Aji Universitas Dian Nuswantoro
  • Wise Herowati Universitas Dian Nuswantoro

DOI:

https://doi.org/10.30871/jaic.v10i4.13412

Keywords:

GRU, LSTM, Bi-LSTM, XGBoost, Stock Price Prediction, Lookback Period, BRIS

Abstract

Stock price forecasting remains a challenging task due to the nonlinear and non-stationary characteristics of financial time series, particularly for Islamic banking stocks such as Bank Syariah Indonesia (BRIS), which exhibit highly dynamic price movements. This study compares the performance of four prediction models Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU), Bidirectional Long Short-Term Memory (Bi-LSTM), and XGBoost in forecasting BRIS closing stock prices using OHLCV data collected from August 2020 to December 2025. To investigate the influence of historical observation windows, three lookback periods (10, 20, and 30 trading days) were evaluated. Model performance was assessed using Root Mean Square Error (RMSE), Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), and the coefficient of determination (R²). The experimental results demonstrate that the GRU model with a 10-day lookback period achieved the best overall performance, yielding an RMSE of 78.0643 IDR, a MAPE of 2.13%, and an R² value of 0.8438. It outperformed Bi-LSTM, XGBoost, and LSTM, all of which also achieved their highest accuracy using the 10-day lookback period. Furthermore, the analysis reveals that the shorter lookback window consistently provides superior predictive performance across all evaluated models, whereas extending the lookback period to 20 or 30 days does not lead to consistent performance improvements. Residual analysis further indicates a relatively unbiased distribution of prediction errors. These findings suggest that the simplified gating mechanism of GRU enables better stability and generalization than more complex architectures for forecasting Islamic bank stock prices. This study contributes to the understanding of the relationship between model complexity and historical time window selection in deep learning-based financial forecasting and provides practical guidance for selecting appropriate prediction models for Indonesian Islamic banking stocks.

Downloads

Download data is not yet available.

References

[1] B. S. Indonesia, “Perjalanan 3 Tahun BSI, dari Merger Tiga Bank Syariah Menuju Pasar Global,” 2024, Bank Syariah Indonesia. [Online]. Available: https://www.bankbsi.co.id

[2] Y. Finance, “Bank Syariah Indonesia (BRIS.JK) Historical Data,” 2025. [Online]. Available: https://finance.yahoo.com

[3] “Bank Syariah Indonesia (BRIS) Resmi Merger,” Bisnis.com, 2021. [Online]. Available: https://finansial.bisnis.com

[4] R. Hidayat, Nurmalitasari, and R. D. Irawan, “Prediksi Harga Saham Syariah Menggunakan Metode Deep Learning GRU dan LSTM,” Jurnal Tekno Kompak, vol. 20, no. 1, pp. 37–50, 2025, doi: 10.33365/jtk.v20i1.474.

[5] R. W. Akbari, A. Prayogo, and A. Jahir, “Comparative Study of LSTM and GRU Accuracy in Predicting BBRI Stock Closing Price,” Journal of Applied Informatics and Computing, vol. 10, no. 1, pp. 837–846, 2026.

[6] Y. Perdana, N. R. Hanum, A. Rabiula, and Y. Anzari, “Analisis Perbandingan Model GRU dan LSTM untuk Prediksi Harga Saham Bank Rakyat Indonesia,” Jurnal Akademika, vol. 17, no. 2, pp. 54–60, 2025, doi: 10.53564/akademika.v17i2.1692.

[7] S. Selvin, R. Vinayakumar, E. A. Gopalakrishnan, V. K. Menon, and K. P. Soman, “Stock Price Prediction Using LSTM, RNN and CNN-Sliding Window Model,” 2017. doi: 10.1109/ICACCI.2017.8126078.

[8] 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, 2023, doi: 10.25077/teknosi.v8i3.2022.164-172.

[9] B. S. Indonesia, “BSI Telah Masuk 5 Besar BUMN Kapitalisasi Pasar Terbesar,” 2024, Bank Syariah Indonesia. [Online]. Available: https://www.bankbsi.co.id

[10] F. I. Komputer and U. A. Purwokerto, “Comparative Study of LSTM and GRU Accuracy in Predicting BBRI Stock Closing Price,” vol. 10, no. 1, pp. 837–846, 2026.

[11] M. A. Majid, P. D. Saputri, and S. Soehardjoepri, “Stock Market Index Prediction using Bi-directional Long Short-Term Memory,” Journal of Applied Informatics and Computing, vol. 8, no. 1, pp. 55–61, 2024, doi: 10.30871/jaic.v8i1.7195.

[12] H. Wu, S. Chen, and Y. Ding, “Comparison of ARIMA and LSTM for Stock Price Prediction,” Financial Engineering and Risk Management, vol. 6, no. 1, 2023, doi: 10.23977/ferm.2023.060101.

[13] M. Oktaviani, G. Sibannang, I. G. L. Wijayakusuma, and U. Udayana, “Implementation of LSTM for Gold Price Prediction in Indonesia,” vol. 10, no. 1, pp. 964–968, 2026.

[14] D. P. Kingma and J. Ba, “Adam: A Method for Stochastic Optimization,” 2015.

[15] S. Hochreiter and J. Schmidhuber, “Long Short-Term Memory,” Neural Comput., vol. 9, no. 8, pp. 1735–1780, 1997, doi: 10.1162/neco.1997.9.8.1735.

[16] T. Chen and C. Guestrin, “XGBoost: A Scalable Tree Boosting System,” 2016. doi: 10.1145/2939672.2939785.

[17] A. Graves and J. Schmidhuber, “Framewise Phoneme Classification with Bidirectional LSTM and Other Neural Network Architectures,” Neural Networks, vol. 18, no. 5–6, pp. 602–610, 2005, doi: 10.1016/j.neunet.2005.06.042.

[18] M. Y. Andrika and M. Rahardi, “Comparative Study of Linear Regression, SVR, and XGBoost for Stock Price Prediction After a Stock Split,” Journal of Applied Informatics and Computing, vol. 9, no. 4, pp. 1817–1824, 2025, doi: 10.30871/jaic.v9i4.10220.

[19] R. J. Hyndman and G. Athanasopoulos, Forecasting: Principles and Practice, 3rd ed. OTexts, 2021. [Online]. Available: https://otexts.com/fpp3

[20] T. Chai and R. R. Draxler, “Root Mean Square Error (RMSE) or Mean Absolute Error (MAE)?,” Geosci. Model Dev., vol. 7, no. 3, pp. 1247–1250, 2014, doi: 10.5194/gmd-7-1247-2014.

Downloads

Published

2026-08-12

How to Cite

[1]
S. W. Aji and W. Herowati, “Comparison of LSTM, GRU, Bi-LSTM, and XGBoost for BRIS Stock Price Prediction with Lookback Period Variations”, JAIC, vol. 10, no. 4, pp. 3826–3836, Aug. 2026.

Similar Articles

<< < 24 25 26 

You may also start an advanced similarity search for this article.