Implementation Of LSTM, GRU, And BI-LSTM Algorithms For LQ45 Index Prediction

Authors

  • Angga Muhammad Galih Department of Informatics Engineering, Universitas Esa Unggul, Jakarta, Indonesia
  • Binastya Anggara Sekti Department of Informatics Engineering, Universitas Esa Unggul, Jakarta, Indonesia

DOI:

https://doi.org/10.31004/koloni.v5i3.1460

Keywords:

Bidirectional LSTM, Deep Learning, Flask Framework, Gated Recurrent Unit, Stock Price Prediction

Abstract

The Indonesian capital market, particularly the LQ45 Index and its leading sectoral stocks, exhibits high volatility and complex non-linear price patterns. This complexity renders conventional statistical methods insufficient for accurate forecasting and risk mitigation. This study aims to develop and compare three Deep Learning architectures Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU), and Bidirectional LSTM (Bi-LSTM) in predicting the daily close prices of the LQ45 Index and six highly liquid stocks. The research methodology adopted the CRISP-DM framework utilizing historical data from January 2020 to May 2026. To prevent data leakage and ensure scientific rigor, model training incorporated a 5-Fold Walk-Forward Validation with an expanding window and multi-seed training. Performance was evaluated and benchmarked against statistical baseline models (Naïve, ARIMA, ETS) using RMSE, MAPE, and Directional Accuracy (DA). Experimental results reveal that all Deep Learning models achieved highly accurate performance with an average MAPE below 5%. The GRU model proved to be the most optimal, recording the lowest RMSE across the majority of assets. While statistical models showed slight superiority in minimizing short-term nominal errors, Deep Learning architectures consistently outperformed in recognizing market trend directions. Finally, the best models were successfully deployed into StockAI, an interactive web application built on the Flask framework using Model-View-Template (MVT) architecture for real-time live inference.

References

Abdelfattah, B. A., Darwish, S. M., & Mesbah Elkaffas, S. M. (2024). Enhancing the prediction of stock market movement using neutrosophic-logic-based sentiment analysis. Journal of Theoretical and Applied Electronic Commerce Research, 19(1), 116–134. https://doi.org/10.3390/jtaer19010007

Abdullah, H. S., Ali, N. H., Jassim, A. H., & Hussain, S. H. (2025). An analytical comparison of the behavior of machine learning and deep learning in stock market prediction. Baghdad Science Journal, 22(1), 297–309. https://doi.org/10.21123/bsj.2024.10017

Adiatmaja, G., & Indraswari, R. (2024). Comparative analysis of LSTM and GRU models for Indonesian stock price prediction with integrated technical and fundamental indicators. In 2024 International Conference on Information Technology Systems and Innovation (ICITSI) (pp. 206–211). IEEE. https://doi.org/10.1109/ICITSI65188.2024.10929370

Adikane, N., & Nirmalrani, V. (2024). Updated deep long short-term memory with Namib beetle Henry optimisation for sentiment-based stock market prediction. International Journal of Intelligent Information and Database Systems, 16(3), 316–344. https://doi.org/10.1504/IJIIDS.2024.137715

Afrianto, N., Fudholi, D. H., & Rani, S. (2022). Stock price prediction using BiLSTM with public sentiment factor. Jurnal RESTI, 6(1), 41–46. https://doi.org/10.29207/resti.v6i1.3676

Ahmad, Z., Bao, S., & Chen, M. (2024). DeepONet-inspired architecture for efficient financial time series prediction. Mathematics, 12(24). https://doi.org/10.3390/math12243950

Akdogan, Y. E., & Anbar, A. (2024). More than just sentiment: Using social, cognitive, and behavioral information of social media to predict stock markets with artificial intelligence and big data. Borsa Istanbul Review, 24, 61–82. https://doi.org/10.1016/j.bir.2024.12.003

Almahadeen, L., et al. (2025). Strategic decision support in financial management using deep learning-based stock price prediction models. International Journal of Advanced Computer Science and Applications, 16(9), 600–610. https://doi.org/10.14569/IJACSA.2025.0160956

AlQahtani, H. S., Alhaddad, M. J., & Jarrah, M. (2025). Stock market prediction of the Saudi telecommunication sector using univariate deep learning models. International Journal of Advanced Computer Science and Applications, 16(8), 346–353. https://doi.org/10.14569/IJACSA.2025.0160835

Alsheebah, F. M. M., & Al-Fuhaidi, B. A. (2024). Emerging stock market prediction using GRU algorithm: Incorporating endogenous and exogenous variables. IEEE Access, 12, 132964–132971. https://doi.org/10.1109/ACCESS.2024.3444699

Amalia, A., Hayati, I., Afandi, A., Lubis, A. S., & Marpaung, J. L. (2025). Comparative forecasting of Indonesian stock prices using ARIMA and support vector regression: A statistical learning approach. Mathematical Modelling of Engineering Problems, 12(7), 2307–2315. https://doi.org/10.18280/mmep.120711

Azzahra, F., Dzikrya, K., & Prabowo, A. (2025). Rancang bangun sistem perpustakaan web Universitas Esa Unggul dengan metode Scrum untuk pengelolaan digital. Jurnal Informatika: Jurnal Pengembangan IT, 10(2), 494–502. https://doi.org/10.30591/jpit.v10i2.8207

Bagastio, K., Oetama, R. S., & Ramadhan, A. (2023). Development of stock price prediction system using Flask framework and LSTM algorithm. Journal of Infrastructure, Policy and Development, 7(3). https://doi.org/10.24294/jipd.v7i3.2631

Barua, M., Kumar, T., Raj, K., & Roy, A. M. (2024). Comparative analysis of deep learning models for stock price prediction in the Indian market. FinTech, 3(4), 551–568. https://doi.org/10.3390/fintech3040029

Dey, P., et al. (2021). Comparative analysis of recurrent neural networks in stock price prediction for different frequency domains. Algorithms, 14(8). https://doi.org/10.3390/a14080251

Elsegai, H., El-Metwally, H. S. H. M., & Almongy, H. M. (2025). Predicting the trends of the Egyptian stock market using machine learning and deep learning methods. Computational Journal of Mathematical and Statistical Sciences, 4(1), 186–221. https://doi.org/10.21608/cjmss.2024.320645.1077

Hansun, S., & Young, J. C. (2021). Predicting LQ45 financial sector indices using RNN-LSTM. Journal of Big Data, 8(1). https://doi.org/10.1186/s40537-021-00495-x

Herwindiati, D. E., Hendryli, J., & Sarmin, N. H. (2023). A comparison of two deep learning models on the stock exchange predictions. International Journal of Advanced Soft Computing and Its Applications, 15(2), 225–234. https://doi.org/10.15849/IJASCA.230720.15

Miftahqul, O., & Kurniasih, T. (2024). Perancangan sistem inventory berbasis web menggunakan framework Flask: PT. Gagas Mitra Jaya (Area Salatiga). Jurnal Indonesia: Manajemen Informatika dan Komunikasi, 5(2), 1947–1959. https://doi.org/10.35870/jimik.v5i2.822

Pimpalkar, A. P., Urmude, R., Ghule, A., Jayappa, P., Prasad, J. R., & Gulame, M. (2025). Machine learning-based stock forecasting. In 2025 International Conference on Emerging Smart Computing and Informatics (ESCI) (pp. 1–5). IEEE. https://doi.org/10.1109/ESCI63694.2025.10988318

Prabowo, A., Kusuma, W. A., Annisa, & Rafi, M. (2022). Identification of Java tea adulteration by babadotan and tekelan using machine learning. Jurnal Jamu Indonesia, 7(3), 86–92. https://doi.org/10.29244/jji.v7i3.273

Saboor, K., Saboor, Q. U. A., Han, L., & Zahid, A. S. (2020). Predicting the stock market using machine learning: Long short-term memory. Electronic Research Journal of Engineering, Computer and Applied Sciences, 2, 202. https://ssrn.com/abstract=3810128

Sahu, S. K., Mokahde, A. S., Chakole, J., Ajani, S. N., & Goswami, M. M. (2025). Performance analysis of LSTM, Bidirectional LSTM (BiLSTM), Gated Recurrent Unit (GRU), Convolutional LSTM (ConvLSTM) and LSTM with attention in stock market prediction. International Journal of Basic and Applied Sciences, 14(Special Issue 2), 131–140. https://doi.org/10.14419/6wpxv706

Wahyuddin, E. P., Caraka, R. E., Kurniawan, R., Caesarendra, W., Gio, P. U., & Pardamean, B. (2025). Improved LSTM hyperparameters alongside sentiment walk-forward validation for time series prediction. Journal of Open Innovation: Technology, Market, and Complexity, 11(1), 100458. https://doi.org/10.1016/j.joitmc.2024.100458

Wu, X., & Wu, G. (2023). Construction of enterprise financial data visualization analysis system based on data mining technology. In Frontiers in Artificial Intelligence and Applications (pp. 289–295). https://doi.org/10.3233/FAIA230822

Yang, S. Y., Duricova, L., & Labosova, V. (2026). Corporate loan default prediction in the Slovak banking context: An interpretable and ensemble CRISP-DM pipeline for credit risk assessment. Systems, 14(7), 738. https://doi.org/10.3390/systems14070738

Yonathan, M. J., Darmawan, D. P. D., Rachmawanto, A. D., & Prabowo, A. (2025). Sistem rekomendasi musik berdasarkan playlist dengan collaborative filtering. Jurnal Informatika dan Teknologi Komputer, 5(3), 175–184. https://doi.org/10.55606/jitek.v5i3.8039

Downloads

Published

29-09-2026

How to Cite

Galih, A. M., & Sekti, B. A. (2026). Implementation Of LSTM, GRU, And BI-LSTM Algorithms For LQ45 Index Prediction. KOLONI, 5(3), 3167–3176. https://doi.org/10.31004/koloni.v5i3.1460