Stock Market Price Prediction Based on Attention-LSTM Model with Multi-Feature Bayesian Optimization
DOI:
https://doi.org/10.54097/61dqqx35Keywords:
LSTM model; attention mechanism; Bayesian optimization; stock price prediction.Abstract
Stock price prediction plays a critical role in investment decision-making and financial regulation. However, traditional time series models and early neural networks are limited either by restrictive assumptions or by their inability to effectively handle long sequences, resulting in suboptimal prediction performance. This paper proposes a hybrid predictive model that integrates multi-feature fusion, the attention mechanism, and Bayesian optimization into a Long Short-Term Memory (LSTM) framework to enhance prediction accuracy and stability. Using daily data from the S&P 500 Index from 2020 to 2022, the study employs LSTM to capture long-term temporal dependencies, introduces an attention mechanism to highlight key sequential features, and utilizes Bayesian optimization for adaptive hyperparameter tuning. Empirical results demonstrate that compared with conventional LSTM, attention-enhanced LSTM, and Bayesian-optimized LSTM models, the proposed Multi-Feature Bayesian Optimized Attention-LSTM achieves significantly lower Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE), reaching 25.51, 18.35, and 0.66%, respectively. Even during periods of extreme market volatility such as the Russia–Ukraine conflict and the U.S. Federal Reserve’s interest rate hikes in 2022, the MAPE remained below 0.70%. These findings validate the synergistic effect of multi-feature fusion, the attention mechanism, and Bayesian optimization, providing more reliable decision support for financial market participants.
Downloads
References
[1] S. Hochreiter and J. Schmidhuber, "Long Short-Term Memory," in Neural Computation, vol. 9, no. 8, pp. 1735-1780, 15 Nov. 1997, doi: 10.1162/neco.1997.9.8.1735. DOI: https://doi.org/10.1162/neco.1997.9.8.1735
[2] R. Akita, A. Yoshihara, T. Matsubara and K. Uehara, "Deep learning for stock prediction using numerical and textual information," 2016 IEEE/ACIS 15th International Conference on Computer and Information Science (ICIS), Okayama, Japan, 2016, pp. 1-6, doi: 10.1109/ICIS.2016.7550882. DOI: https://doi.org/10.1109/ICIS.2016.7550882
[3] C. Y. Lai, R. -C. Chen and R. E. Caraka, "Prediction Stock Price Based on Different Index Factors Using LSTM," 2019 International Conference on Machine Learning and Cybernetics (ICMLC), Kobe, Japan, 2019, pp.1-6, doi: 10.1109/ICMLC48188.2019.8949162. DOI: https://doi.org/10.1109/ICMLC48188.2019.8949162
[4] Chen S, Ge L. Exploring the attention mechanism in LSTM-based Hong Kong stock price movement prediction[J].Quantitative Finance,2019,19(9):1507-1515. DOI: https://doi.org/10.1080/14697688.2019.1622287
[5] Heeseok Kwon, & Minhyuk Lee (2023). Stock Index Forecasting Using Combined Model of Wavelet Transform LSTM and Multi-Head Attention. KOREAN MANAGEMENT SCIENCE REVIEW, 40(2), 97-112. 10.7737/KMSR.2023.40.2.097 DOI: https://doi.org/10.7737/KMSR.2023.40.2.097
[6] Jayanth T, Manimaran A. Unlocking Stock Price Prognostication Dual Attention-Infused Bi-Directional LSTM Empowered by Bayesian Optimization DA-Bi-LSTM-BO[J]. SN Computer Science, 2024, 5(8):1046-1046. DOI: https://doi.org/10.1007/s42979-024-03355-6
[7] Lin Xin, Zhu Xiaodong. LSTM stock price prediction model based on the attention mechanism [J]. Journal of Chongqing Technology and Business University (Natural Science Edition), 2022, 39(02): 75-82.DOI:10.16055/j.issn.1672-058X.2022.0002.011.
[8] Zi-sheng O, Xi-te Y, Yongzeng L. Systemic financial risk early warning of financial market in China using Attention-LSTM model[J].North American Journal of Economics and Finance,2021,56 DOI: https://doi.org/10.1016/j.najef.2021.101383
[9] Youfeng N ,Mingxi G ,Wenhao Y , et al.A Bayesian optimization-based LSTM model for DGA domain name identification approach[J].Journal of Physics: Conference Series,2022,2303(1). DOI: https://doi.org/10.1088/1742-6596/2303/1/012015
[10] Sang, S., & Li, L. (2024). A Novel Variant of LSTM Stock Prediction Method Incorporating Attention Mechanism. Mathematics, 12(7), 945. https://doi.org/10.3390/math12070945 DOI: https://doi.org/10.3390/math12070945
[11] Benchaji, I., Douzi, S., El Ouahidi, B. et al. Enhanced credit card fraud detection based on attention mechanism and LSTM deep model. J Big Data 8, 151 (2021). DOI: https://doi.org/10.1186/s40537-021-00541-8
[12] Z. Zhang et al., "HGLA: Biomolecular Interaction Prediction Based on Mixed High-Order Graph Convolution With Filter Network via LSTM and Channel Attention," in IEEE/ACM Transactions on Computational Biology and Bioinformatics, vol. 21, no. 6, pp. 2011-2024, Nov.-Dec. 2024, doi: 10.1109/TCBB.2024.3434399. DOI: https://doi.org/10.1109/TCBB.2024.3434399
[13] Liwei T, Li F, et al. Forecast of LSTM-XGBoost in Stock Price Based on Bayesian Optimization[J]. Intelligent Automation & Soft Computing, 2021,29(3):855-868. DOI: https://doi.org/10.32604/iasc.2021.016805
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Highlights in Business, Economics and Management

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.







