| The stock market in our country is becoming increasingly mature,and the number of active investors is on the rise.How to predict stock trends to assist decision-making for obtaining excess returns has become a focus of scholars’ attention.However,the stock system is a complex system affected by many factors,with high noise,nonstationarity,non-linearity and other complex features.Traditional statistical methods and machine learning are unable to uncover the deep logic behind stock data,resulting in limited prediction accuracy.Deep learning methods have powerful feature extraction and nonlinear approximation capabilities and have great potential in stock prediction problems.In this paper,the SSE 50 index and the CSI 500 index are taken as research targets.A CNN-Bi LSTM model based on attention mechanism is proposed for stock prediction,incorporating attention mechanism into the CNN model and LSTM model.Considering that there are too many influencing factors in the stock market,there may be cross redundancy between different technical indicators.Therefore,this article first conducted correlation analysis on the data and used PCA to reduce the dimensionality of the data.Subsequently,the model extracts stock features using the powerful feature extraction capability of the CNN model,and then trains and predicts high-frequency stock data using the excellent processing capability of the Bi LSTM model for timeseries sequences.At the same time,attention mechanism is integrated into the network to optimize the prediction capability during periods of sudden rise or fall in stock prices.The RNN,LSTM,Bi LSTM,and CNN-Bi LSTM models are compared in this paper,and MAE,MSE,and MAPE are used as evaluation indicators.Through comparative experiments,the proposed model performs better than other models in all evaluation indicators,demonstrating higher prediction accuracy.Experimental results show that the proposed model effectively combines the advantages of each model,fully learns the complex characteristics of stock time series,and has better prediction accuracy and generalization effect.Finally,the paper explores the needs of stock investors,combines the model with practical applications,and designs a deep learning-based stock price prediction system.The system includes system management,stock trend viewing and prediction,and simulated stock trading functions.After system design and development,a stock price prediction system was ultimately achieved,demonstrating the feasibility of the research results in stock prediction. |