A Stock Price Prediction Model Based on Investor Sentiment and Optimized Deep Learning

A Stock Price Prediction Model Based on Investor Sentiment and Optimized Deep Learning

Abstract:

Accurate prediction of stock prices can reduce investment risks and increase returns. This paper combines the multi-source data affecting stock prices and applies sentiment analysis, swarm intelligence algorithm, and deep learning to build the MS-SSA-LSTM model. Firstly, we crawl the East Money forum posts information to establish the unique sentiment dictionary and calculate the sentiment index. Then, the Sparrow Search Algorithm (SSA) optimizes the Long and Short-Term Memory network (LSTM) hyperparameters. Finally, the sentiment index and fundamental trading data are integrated, and LSTM is used to forecast stock prices in the future. Experiments demonstrate that the MS-SSA-LSTM model outperforms the others and has high universal applicability. Compared with standard LSTM, the R^{2} of MS-SSA-LSTM is improved by 10.74% on average. We found that: 1) Adding the sentiment index can enhance the model’s predictive performance. 2) The LSTM’s hyperparameters are optimized using SSA, which objectively explains the model parameter settings and improves the prediction effect. 3) The high volatility of China’s financial market is more suitable for short-term prediction.