Performance Analysis of LSTM, Bidirectional LSTM (BiLSTM), Gated Recurrent Unit (GRU), Convolutional LSTM (ConvLSTM) and LSTM with Attention in Stock Market Prediction
-
https://doi.org/10.14419/6wpxv706
Received date: June 6, 2025
Accepted date: June 18, 2025
Published date: July 27, 2025
-
Deep Learning, Attention Mechanisms, Recurrent neural networks, LSTM, GRU, BiLSTM, Stock Market -
Abstract
Predicting the stock market is a complex and challenging endeavor because financial time series are inherently volatile and nonlinear. Recurrent neural networks (RNNs) and their advanced variants have shown significant promise in modeling sequential data. This study evaluates and contrasts the effectiveness of five deep learning models Classic LSTM, Bidirectional LSTM (BiLSTM), GRU, Convolutional LSTM (ConvLSTM), and LSTM with Attention Mechanism in forecasting stock market closing prices. Our evaluation employs historical stock index data, with model performance quantified using standard regression metrics—MSE, RMSE, MAE, MAPE, and R². Our results show that GRU consistently outperforms other models in capturing intricate temporal patterns, Results show that LSTM with Attention Mecha-nism achieves the highest accuracy (MSE: 0.000370 MAE: 0.014482, RMSE: 0.019242, MAPE: 6.676856 R2: 0.873357) while GRU offers the best balance of accuracy and efficiency. These findings provide actionable insights for selecting appropriate RNN models for financial forecasting applications.
-
References
- Sahu, S.K., Mokhade, A. and Bokde, N.D., 2023. An overview of machine learning, deep learning, and reinforcement learning-based techniques in quantitative finance: recent progress and challenges. Applied Sciences, 13(3), p.1956.
- Zheng A, Jin J (2017) Using AI to make predictions on stock market. pp. 1–6.
- Li Q, Chen Y, Wang J, Chen Y, Chen H (2018) Web media and stock markets: A survey and future directions from a big data perspective. IEEE Transactions on Knowledge and Data Engineering 30(2): 381–399. https://doi.org/10.1109/TKDE.2017.2763144.
- Saini A, Sharma A (2019) Predicting the unpredictable: An application of machine learning algorithms in Indian stock market. Annals of Data Sci-ence. https://doi.org/10.1007/s40745-019-00230-7.
- Weng B, Ahmed M A, Megahed F M (2017) Stock market one-day ahead movement prediction using disparate data sources. Expert Systems with Applications 79: 153–163. https://doi.org/10.1016/j.eswa.2017.02.041.
- Paspanthong, A., Tantivasadakarn, N. and Vithayapalert, W., 2019. Machine learning in intraday stock trading. Computer Science Department, Stanford University.
- Chakole J, Kurhekar M (2020) Trend following deep Q-learning strategy for stock trading. Expert Systems 37(4): 1–16. https://doi.org/10.1111/exsy.12514.
- Chakole J B, Kolhe M S, Mahapurush G D, Yadav A, Kurhekar M P (2021) A Q-learning agent for automated trading in equity stock markets. Ex-pert Systems with Applications 163: 113761. https://doi.org/10.1016/j.eswa.2020.113761.
- Park H, Sim M K, Choi D G (2020) An intelligent financial portfolio trading strategy using deep Q-learning. Expert Systems with Applications 158: 113573. https://doi.org/10.1016/j.eswa.2020.113573.
- Patel J, Shah S, Thakkar P, Kotecha K (2015) Predicting stock and stock price index movement using trend deterministic data preparation and ma-chine learning techniques. Expert Systems with Applications 42(1): 259–268. https://doi.org/10.1016/j.eswa.2014.07.040.
- Tan Z, Yan Z, Zhu G (2019) Stock selection with random forest: An exploitation of excess return in the Chinese stock market. Heliyon 5(8): e02310. https://doi.org/10.1016/j.heliyon.2019.e02310.
- Ananthi M, Vijayakumar K (2020) Stock market analysis using candlestick regression and market trend prediction (CKRM). Journal of Ambient Intelligence and Humanized Computing. https://doi.org/10.1007/s12652-020-01892-5.
- Sahu S K, Mokhade A S, Agrawal P K, Kalyani K (2025) Utilizing supervised machine learning and technical indicators for quantitative trading to improve stock market trading decisions. SN Computer Science 6(5). https://doi.org/10.1007/s42979-025-04025-x.
- Joshi S, Mahanthi B L, Pavithra G, Pokkuluri K S, Ninawe S S, Sahu R (2025) Integrating LSTM and CNN for stock market prediction: A dynam-ic machine learning approach. Journal of Artificial Intelligence and Technology 5: 168–179. https://doi.org/10.37965/jait.2025.0652.
- Abdulghani A, Alhammadi S (2025) Enhancing stock market prediction using attention-based LSTM models and classical models. 2(4): 25–32.
- Talhartit I, et al. (2025) Machine learning for stock price prediction on the Casablanca Stock Exchange: A comparative study of ANN and LSTM approaches. HAL Id: hal-05063012.
- Mehtarizadeh H, Mansouri N, Mohammad B, Zade H, Hosseini M M (2025) Stock price prediction with SCA LSTM network and statistical model ARIMA GARCH. Springer US. https://doi.org/10.1007/s11227-024-06775-6.
-
Downloads
-
How to Cite
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(SI-2), 131-140. https://doi.org/10.14419/6wpxv706
