| The uncertainty and volatility of the stock market have always been hot research topics.Stock data,as a typical time series data,has highly nonlinear and complex characteristics.Predicting stock prices using historical stock data has always been a focus of investors and scholars.Early stock price prediction mainly relied on autoregressive models for stock price modeling,but these models have limited data representation capabilities and poor prediction accuracy.With the rapid development of artificial intelligence technology,neural networks have become one of the popular tools for stock prediction.We proposes a stock prediction model based on data feature engineering and an improved LSTM algorithm,aiming to make full use of the sentiment features and technical features of stocks to improve the accuracy of stock price prediction.Specifically,this thesis extracts sentiment features of stocks by performing sentiment analysis on stock reviews,and obtains technical features of stocks through the analysis of moving closing prices.These feature engineering techniques enhance the expressive power of stock data and improve prediction accuracy.In order to optimize the model parameter update process,we have chosen the Adam algorithm as the parameter update algorithm for the LSTM model and provided a detailed derivation of the parameter update process based on the Adam algorithm.We conducted experiments using i Flytek’s stock data from January 1,2012,to January 31,2023.In the comparative experiments,this thesis also established single and double-layer LSTM stock price prediction models based on gradient descent,Agagrad,and RMSProp parameter update algorithms as comparison models.A series of comparative experimental results show that the proposed multi-layer LSTM model based on feature engineering and Adam update algorithm performs best in stock price prediction tasks,with faster convergence speed and better stability.The experimental results show that the proposed double-layer Multi-Feature LSTM model can achieve 0.1833,0.0086,0.0207 in MAPE,MAE,and RMSE indicators,respectively,which are better than traditional statistical models and LSTM models based on other optimization algorithms.In summary,the multi-layer improved LSTM model based on stock data feature engineering and the Adam update algorithm proposed performs best in stock price prediction.This research is the first to combine sentiment features and technical features of stocks and apply an improved LSTM algorithm for stock price prediction,providing reference significance for the optimization and improvement of stock price prediction models,as well as a new research approach and method in the time series domain,i.e.,enhancing data representation capabilities through data-level feature engineering and improving the generalization capabilities of models by refining neural network optimization algorithms.Future research can try to introduce more types of features and explore other advanced deep learning algorithms and optimization strategies to further improve the performance of stock price prediction models. |