Stock Price Prediction Based on Investor Sentiment Analysis and CNN-LSTM-Attention Model
摘要
Investor sentiment significantly impacts investors’ decision-making behavior and stock market returns. Therefore, how to analyze and utilize investor sentiment for stock price prediction is an important research direction in finance. Many studies have explored the influence of investor sentiment on stock market price fluctuations, but these studies have not comprehensively considered factors such as overall market trends, sector rotation, and individual stock characteristics. Addressing this issue, this paper combines sentiment analysis with deep learning methods to construct a CNN-LSTM-Attention model incorporating sentiment indices, aiming to assist investors in predicting closing prices. We selected feature indicators that reflect sentiment in the overall market, sectors, and individual stock, constructed a formula for calculating sentiment indices, and calculated sentiment indices to further explore the correlation between sentiment indices and stock trends. To enhance prediction accuracy, we designed and constructed a CNN-LSTM-Attention model based on attention mechanisms, integrating convolutional neural networks and long short-term memory neural networks. This model comprehensively utilizes sentiment indices and stock data containing fundamental data, historical trading data, and technical indicators for closing price prediction. Using the stock of “iFlytek” as an example, experimental results demonstrate that compared to models such as RNN and LSTM, this model achieves the best results, indicating that incorporating sentiment indices can effectively improve prediction performance.