Research on Financial Time Series Prediction Based on LSTM and Attention Mechanism
Liang Zhao, Yanyu Lai, Simin Shi, Guoyueyang Cheng, Zhibin Qiu, Zhikai Xie · 2025
To cope with the limitations of traditional time series models (e.g., ARIMA and GARCH) and deep learning models (e.g., LSTM), this study proposes a financial forecasting model based on the attention mechanism. The proposed model combines LSTM with attention mechanisms to enhance prediction accuracy by dynamically adjusting the importance of historical data. Additionally, the research explores the application of multi-head and self-attention mechanisms to further improve the model's representation capacity and forecasting performance. Validation on publicly available financial data, specifically Apple's stock prices from 2010 onwards, demonstrates that the attention-based model significantly outperforms traditional models. The values of MSE and MAE decreased by 15% and 12%, respectively. These findings highlight the model's robustness and effectiveness in capturing critical features within financial time series. The attention mechanism shows great promise for broader applications in the financial sector, including risk management, portfolio optimization, market sentiment analysis, and high-frequency trading.