GRU-Enhanced Attention Mechanism for LSTM in Hybrid CNN-LSTM Models for Stock Prediction
Abstract
We propose a novel GRU-enhanced attention mechanism integrated into LSTM layers to improve stock prediction accuracy in hybrid CNN-LSTM models. The proposed method dynamically adjusts the importance of different time steps by combining the strengths of GRUs and attention mechanisms, thereby capturing temporal dependencies more effectively in volatile financial time series. The GRU processes the input sequence to generate hidden states, which are then weighted by an attention mechanism to compute a context vector. This context vector is fed into the LSTM layer, enabling the model to focus on the most relevant time steps and enhance its ability to handle non-stationarity and noise. The integration of GRU-enhanced attention into LSTM allows the model to better capture long-term dependencies and temporal patterns, which are critical for accurate stock prediction. Experimental results demonstrate that the proposed approach outperforms traditional methods in terms of prediction accuracy and robustness, particularly in scenarios with high market volatility. Furthermore, the model’s adaptability to varying time scales and its ability to filter out irrelevant information make it a promising tool for financial time series analysis. The proposed method not only advances the state-of-the-art in stock prediction but also provides a framework for integrating attention mechanisms into other sequential data tasks.
Keywords
Financial Time Series, GRU-Enhanced Attention Mechanism, Hybrid CNN-LSTM Model, Stock Prediction, Deep Learning
References
- Rushil Yavasani & Haoxiang Wang (2023) Comparative Analysis of LSTM, GRU, and ARIMA Models for Stock Market Price Prediction. Journal of Student Research.
- Qinghe Zhao, Yue Hao & Xuechen Li (2024) Stock price prediction based on hybrid CNN-LSTM model. Applied and Computational Engineering.
- Luocheng Liang (2024) ARIMA with Attention-based CNN-LSTM and XGBoost hybrid model for stock prediction in the US stock market. SHS Web of Conferences.
- Chunna Zhao, Junjie Ye, Zelong Zhu & Yaqun Huang (2024) FLRNN-FGA: Fractional-Order Lipschitz Recurrent Neural Network with Frequency-Domain Gated Attention Mechanism for Time Series Forecasting. Fractal and Fractional.
- Xinhao Sun (2024) Application of Attention-Based LSTM Hybrid Models for Stock Price Prediction. Advances in Economics, Management and Political Sciences.
- Li Zhang, Jian Zhang, Wenlian Gao, Fengfeng Bai, Nan Li & N. Ghadimi (2024) A deep learning outline aimed at prompt skin cancer detection utilizing gated recurrent unit networks and improved orca predation algorithm. Biomed. Signal Process. Control., 90:105858.
- Luocheng Liang (2024) ARIMA with Attention-based CNN-LSTM and XGBoost hybrid model for stock prediction in the US stock market. SHS Web of Conferences.
- Jingjuan Zhang, Wingho Chan & Yiwei Lin (2024) Stock Price Prediction Research Based on CNN-LSTM. Highlights in Business, Economics and Management.
- Aditi Arora, Yashaswi Upadhyay, Satvik Shukla & Saket (2024) Forecasting Stock Price by LSTM-CNN Hybrid Model and Compares Deep Learning Models.
- Xinhao Sun (2024) Application of Attention-Based LSTM Hybrid Models for Stock Price Prediction. Advances in Economics, Management and Political Sciences.
- Xinyi Chen (2023) Stock Prediction Using Evolutionary Attention-based LSTM.
- Li Zhang, Jian Zhang, Wenlian Gao, Fengfeng Bai, Nan Li & N. Ghadimi (2024) A deep learning outline aimed at prompt skin cancer detection utilizing gated recurrent unit networks and improved orca predation algorithm. Biomed. Signal Process. Control., 90:105858.
- Sihan Fu, Zining Tang & Jialin Li (2023) IBM Stock Forecast Using LSTM, GRU, Attention and Transformer Models.
- Cai Chen (2023) Stock Price Prediction Based on the Fusion of CNN-GRU Combined Neural Network and Attention Mechanism.
- Fang Liu, Shaobo Guo, Qianwen Xing, Xinye Sha, Ying Chen, Yuhui Jin, Qi Zheng & Chang Yu (2024) Application of an ANN and LSTM-Based Ensemble Model for Stock Market Prediction. 2024 IEEE 7th International Conference on Information Systems and Computer Aided Education (ICISCAE).
- Mehmet Sarıkoç & Mete Celik (2024) PCA-ICA-LSTM: A Hybrid Deep Learning Model Based on Dimension Reduction Methods to Predict S&P 500 Index Price. Computational Economics.
- Eray Gemi̇ci̇, M. Polat, Remzi Gök, Muhammad Asif Khan, Mohammed Arshad Khan & Yunus Kılıç (2023) Do Bubbles in the Bitcoin Market Impact Stock Markets? Evidence From 10 Major Stock Markets. SAGE Open, 13.
- Suchita Borkar, Anil Jadhav, Anishkumar Dhablia, Rani NandkishorAher, Nandkishor Daulat Aher & Amit Ashok Aware (2023) Selection of Technical Indicators for Stock Market Prediction: Correlation Based Approach.
- Xinhao Sun (2024) Application of Attention-Based LSTM Hybrid Models for Stock Price Prediction. Advances in Economics, Management and Political Sciences.
- Luocheng Liang (2024) ARIMA with Attention-based CNN-LSTM and XGBoost hybrid model for stock prediction in the US stock market. SHS Web of Conferences.
- Xinhao Sun (2024) Application of Attention-Based LSTM Hybrid Models for Stock Price Prediction. Advances in Economics, Management and Political Sciences.
- Rushil Yavasani & Haoxiang Wang (2023) Comparative Analysis of LSTM, GRU, and ARIMA Models for Stock Market Price Prediction. Journal of Student Research.