LAGRU: A GRU-Based Model with Local Context Attention for Stock Price Prediction
摘要
Accurate stock price prediction remains a challenging task due to the volatile and nonlinear nature of financial markets. Nowadays, Long-Short-Term Memory (LSTM) is widely used in stock price prediction and has demonstrated strong performance in capturing temporal dependencies. Alongside LSTM, GRU has emerged as a simplified alternative with fewer parameters and faster training time. However, when applied to stock price prediction, GRU often yields less favorable results in terms of MSE, MAPE, and R \(^2\) compared to LSTM. In this study, we propose LAGRU, a hybrid deep learning model that integrates Gated Recurrent Units (GRU) with a Local Context Attention mechanism to enhance the prediction of stock closing prices. The attention component enables the model to dynamically focus on the most relevant time steps within input sequences, capturing important local patterns often missed by standard recurrent architectures. Experimental results demonstrate that the proposed LAGRU model outperforms both LSTM and GRU in three real-world stock market datasets: VNINDEX, AAPL, and CSI300.