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.
Copyrights © 2026