Forecasting IHSG Stock Prices Using an Attention-Based CNN-BiGRU Hybrid Deep Learning
DOI:
https://doi.org/10.29207/resti.v10i1.7064Keywords:
CNN-BiGRU, financial modeling, IHSG, stock price prediction, time series forecastingAbstract
This study develops an IHSG stock price forecasting model using a hybrid CNN–BiGRU architecture enhanced by an attention mechanism. The key novelty lies in combining CNN-based local pattern extraction with BiGRU-based bidirectional temporal modeling, while attention selectively emphasizes the most informative time steps, improving representation quality for complex and noisy financial series. Historical IHSG data from public sources were preprocessed through feature engineering and normalization, followed by XGBoost-based feature selection to retain the most predictive variables. Model robustness was assessed in two settings: (i) the full dataset and (ii) a “cleaned” dataset excluding the extreme COVID-19 volatility period. The proposed model achieved strong accuracy, with MAE/RMSE of 0.0125/0.02 on the full dataset and 0.0167/0.03 on the cleaned dataset, while Pearson correlation remained close to 1 in both scenarios, indicating high alignment with actual IHSG movements. A 30-day ahead forecast produced a stable and realistic trend. Overall, the CNN–BiGRU with attention provides an effective and robust approach for capturing multi-scale temporal patterns in IHSG forecasting.
Downloads
References
W. Bao, Y. Cao, Y. Yang, H. Che, J. Huang, and S. Wen, “Data-driven stock forecasting models based on neural networks: A review,” Information Fusion, vol. 113, pp. 1–20, Jan. 2025, doi: 10.1016/j.inffus.2024.102616.
G. Sun and Y. Li, “Intraday and Post-Market Investor Sentiment for Stock Price Prediction: A Deep Learning Framework with Explainability and Quantitative Trading Strategy,” Systems, vol. 13, no. 5, pp. 1–24, May 2025, doi: 10.3390/systems13050390.
X. Kong et al., “Deep learning for time series forecasting: a survey,” International Journal of Machine Learning and Cybernetics, vol. 16, no. 1, pp. 5079–5112, Aug. 2025, doi: 10.1007/s13042-025-02560-w.
M. K. Anam, T. P. Lestari, L. Efrizoni, N. S. Handayani, and I. Andhika, “Sentiment Analysis Optimization Using Ensemble of Multiple SVM Kernel Functions,” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 9, no. 4, pp. 905–914, Aug. 2025, doi: 10.29207/resti.v9i4.6708.
M. A. Lubis and Samsudin, “Using the Random Forest Method in Predicting Stock Price Movements,” Journal of Dinda Data Science, Information Technology, and Data Analytics, vol. 5, no. 1, pp. 28–35, 2025, doi: 10.20895/dinda.v5i1.1765.
P. Chhajer, M. Shah, and A. Kshirsagar, “The applications of artificial neural networks, support vector machines, and long–short term memory for stock market prediction,” Decision Analytics Journal, vol. 2, p. 1, Mar. 2022, doi: 10.1016/j.dajour.2021.100015.
A. Rahmadeyan and Mustakim, “Long Short-Term Memory and Gated Recurrent Unit for Stock Price Prediction,” in Procedia Computer Science, Elsevier B.V., 2024, pp. 204–212. doi: 10.1016/j.procs.2024.02.167.
S. Shinde, L. Wadhwa, N. Mohane, V. Pagar, N. Sherje, and S. Mane, “Stock Price Prediction using LSTM,” in 2023 7th International Conference on Computing, Communication, Control And Automation, ICCUBEA 2023, Institute of Electrical and Electronics Engineers Inc., 2023, pp. 1–7. doi: 10.1109/ICCUBEA58933.2023.10392023.
G. Wojarnik, “The potential of convolutional neural networks for the analysis of stock charts,” in Procedia Computer Science, Elsevier B.V., 2023, pp. 941–950. doi: 10.1016/j.procs.2023.10.081.
A. F. Azyus, S. K. Wijaya, and M. Naved, “Prediction of remaining useful life using the CNN-GRU network: A study on maintenance management,” Software Impacts, vol. 17, pp. 1–6, Sep. 2023, doi: 10.1016/j.simpa.2023.100535.
Y. Lan, “A Hybrid CNN-LSTM Model for Stock Price Prediction with Spatial and Temporal Dependencies,” in CONF-FMCE 2025 Symposium: Semantic Communication for Media Compression and Transmission, EWA Publishing, 2025, pp. 236–242. doi: 10.54254/2755-2721/155/2025.GL23570.
M. K. Anam, S. Defit, Haviluddin, L. Efrizoni, and M. B. Firdaus, “Early Stopping on CNN-LSTM Development to Improve Classification Performance,” Journal of Applied Data Sciences, vol. 5, no. 3, pp. 1175–1188, 2024, doi: 10.47738/jads.v5i3.312.
M. K. Anam et al., “Improved Performance of Hybrid GRU-BiLSTM for Detection Emotion on Twitter Dataset,” Journal of Applied Data Sciences, vol. 6, no. 1, pp. 354–365, Jan. 2025, doi: 10.47738/jads.v6i1.459.
F. M. P. Fozap, “Hybrid Machine Learning Models for Long-Term Stock Market Forecasting: Integrating Technical Indicators,” Journal of Risk and Financial Management, vol. 18, no. 4, pp. 1–21, Apr. 2025, doi: 10.3390/jrfm18040201.
H. Liu, “A Hybrid CNN-LSTM Approach for Effective Stock Price Prediction in Optimizing Investment Strategies,” in Proceedings of the International Workshop on Navigating the Digital Business Frontier for Sustainable Financial Innovation (ICDEBA 2024), Atlantis Press, 2025, pp. 628–640. doi: 10.2991/978-94-6463-652-9_65.
L. Xu, W. Xu, Q. Cui, M. Li, B. Luo, and Y. Tang, “Deep Heuristic Evolutionary Regression Model Based on the Fusion of BiGRU and BiLSTM,” Cognit Comput, vol. 15, no. 5, pp. 1672–1686, Sep. 2023, doi: 10.1007/s12559-023-10135-6.
M. K. Anam et al., “Sara Detection on Social Media Using Deep Learning Algorithm Development,” Journal of Applied Engineering and Technological Science, vol. 6, no. 1, pp. 225–237, Dec. 2024, doi: 10.37385/jaets.v6i1.5390.
M. K. Anam, S. Defit, and R. Sovia, “Evaluating Word2Vec and FastText Embeddings in CNN-LSTM for Hotel Customer Satisfaction: Impact on Accuracy and Model Stability,” in International Conference on Data Science and Its Applications (ICoDSA), Jakarta: IEEE, 2025, pp. 540–545. doi: 10.1109/ICoDSA67155.2025.11157433.
G. Airlangga, “Stress Detection Using Hybrid Deep Learning Models with Attention Mechanisms: A Comparative Study of CNN-LSTM, CNN-GRU, and Ensemble Approaches,” Journal of Computer System and Informatics (JoSYC), vol. 6, no. 1, pp. 234–243, 2024, doi: 10.47065/josyc.v6i1.6284.
A. E. Minarno, M. Fadhlan, Y. Munarko, and D. R. Chandranegara, “Classification of Dermoscopic Images Using CNN-SVM,” JOIV: INTERNATIONAL JOURNAL ON INFORMATICS VISUALIZATION, vol. 3, no. 2, pp. 606–612, 2024, doi: 10.62527/joiv.8.2.2153.
L. Xu, W. Xu, Q. Cui, M. Li, B. Luo, and Y. Tang, “Deep Heuristic Evolutionary Regression Model Based on the Fusion of BiGRU and BiLSTM,” Cognit Comput, vol. 15, no. 5, pp. 1672–1686, Sep. 2023, doi: 10.1007/s12559-023-10135-6.
Q. Zhu, X. Jiang, and R. Ye, “Sentiment Analysis of Review Text Based on BiGRU-Attention and Hybrid CNN,” IEEE Access, vol. 9, pp. 149077–149088, 2021, doi: 10.1109/ACCESS.2021.3118537.
M. S. Islam, M. N. Islam, N. Hashim, M. Rashid, B. S. Bari, and F. Al Farid, “New Hybrid Deep Learning Approach Using BiGRU-BiLSTM and Multilayered Dilated CNN to Detect Arrhythmia,” IEEE Access, vol. 10, pp. 58081–58096, 2022, doi: 10.1109/ACCESS.2022.3178710.
Z. Hu, “Sentiment Analysis of Film Reviews Based on BiGRU+Attention+Capsule Fusion,” TechRxiv, vol. 1, no. 1, pp. 1–8, 2021, doi: 10.36227/techrxiv.14863401.v1.
B. A. S. Al-rimy, F. Saeed, M. Al-Sarem, A. M. Albarrak, and S. N. Qasem, “An Adaptive Early Stopping Technique for DenseNet169-Based Knee Osteoarthritis Detection Model,” Diagnostics, vol. 13, no. 11, pp. 1–17, Jun. 2023, doi: 10.3390/diagnostics13111903.
N. Wang and X. Zhao, “Time-Series Forecasting Based on Multi-Layer Attention Architecture,” KSII Transactions on Internet and Information Systems, vol. 18, no. 1, pp. 1–14, Jan. 2024, doi: 10.3837/tiis.2024.01.001.
L. Zhou, S. Yuan, Z. Feng, G. Dai, and G. Zhou, “A Lambda Layer-Based Convolutional Sequence Embedding Model for Click-Through Rate Prediction,” Wuhan University Journal of Natural Sciences, vol. 29, no. 3, pp. 198–208, Jun. 2024, doi: 10.1051/wujns/2024293198.
L. L. Van Fc, S. Defit, and S. Bukhori, “Monitoring and Reporting Unethical Actions in Higher Education Using the BiLSTM and BiGRU Algorithms,” in ICFTSS 2024 - International Conference on Future Technologies for Smart Society, Institute of Electrical and Electronics Engineers Inc., 2024, pp. 69–74. doi: 10.1109/ICFTSS61109.2024.10690271.
A. Jierula, S. Wang, T. M. Oh, and P. Wang, “Study on accuracy metrics for evaluating the predictions of damage locations in deep piles using artificial neural networks with acoustic emission data,” Applied Sciences (Switzerland), vol. 11, no. 5, pp. 1–21, Mar. 2021, doi: 10.3390/app11052314.
T. O. Hodson, “Root-mean-square error (RMSE) or mean absolute error (MAE): when to use them or not,” Geosci Model Dev, vol. 15, no. 1, pp. 5481–5487, Jul. 2022, doi: 10.5194/gmd-15-5481-2022.
D. Chicco, M. J. Warrens, and G. Jurman, “The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation,” PeerJ Comput Sci, vol. 7, pp. 1–24, 2021, doi: 10.7717/PEERJ-CS.623.
R. J. Dhanal and V. R. Ghorpade, “Aspect-based sentiment-analysis using topic modelling and machine-learning,” International Journal of Electrical and Computer Engineering, vol. 14, no. 6, pp. 6689–6698, Dec. 2024, doi: 10.11591/ijece.v14i6.pp6689-6698.
L. Muflikhah, T. N. Fatyanosa, N. Widodo, R. S. Perdana, Solimun, and H. Ratnawati, “Feature Selection for Hypertension Risk Prediction Using XGBoost on Single Nucleotide Polymorphism Data,” Healthc Inform Res, vol. 31, no. 1, pp. 16–22, Jan. 2025, doi: 10.4258/hir.2025.31.1.16.
I. Made, D. C. Adyatma, and E. B. Setiawan, “Impact of Feature Selection on XGBoost Model with VGG16 Feature Extraction for Carbon Stock Estimation Using GEE and Drone Imagery,” Jurnal Ilmiah Teknik Elektro Komputer dan Informatika (JITEKI), vol. 10, no. 4, pp. 870–884, 2024, doi: 10.26555/jiteki.v10i4.30484.
H. P. Ho, “The supplier selection problem of a manufacturing company using the weighted multi-choice goal programming and MINMAX multi-choice goal programming,” Appl Math Model, vol. 75, pp. 819–836, 2019, doi: 10.1016/j.apm.2019.06.001.
Downloads
Published
Issue
Section
License
Copyright in each article belongs to the author
- The author acknowledges that the RESTI Journal (System Engineering and Information Technology) is the first publisher to publish with a license Creative Commons Attribution 4.0 International License.
- Authors can enter writing separately, arrange the non-exclusive distribution of manuscripts that have been published in this journal into other versions (eg sent to the author's institutional repository, publication in a book, etc.), by acknowledging that the manuscript has been published for the first time in the RESTI (Rekayasa Sistem dan Teknologi Informasi) journal ;





