Font Size: a A A

Stock Price Prediction Research Using Attention-based LSTM Neural Network

Posted on:2022-04-11Degree:MasterType:Thesis
Country:ChinaCandidate:T X LengFull Text:PDF
GTID:2480306761983549Subject:Investment
Abstract/Summary:PDF Full Text Request
With the progress of society and the rapid development of science and technology,China's stock market has attracted more and more attention from investors.In order to achieve investment goals,it is particularly important for investors to predict stock prices through some effective methods.At present,in the prediction of financial time series,the more cutting-edge method is LSTM neural network,which can partially alleviate the problem of long-term dependence.The attention mechanism,as a sharp tool to further solve the problem of long-term dependence,has broad application prospects.This paper incorporates the attention mechanism on the basis of the LSTM neural network,and builds a stock price prediction model(Att-LSTM)based on the attention mechanism and the LSTM.The forecast target uses the latest constituent stocks of the FTSE China A50 Index,which contains the 50 largest stocks in Shanghai and Shenzhen stock markets by market capitalization.It is of practical significance to predict the price of the constituent stocks of this index.In order to cover the basic information that affects stock prices to a greater extent,the characteristic variables introduced into the model include not only the most basic opening price,closing price,highest price,lowest price,trading volume,and derivative technical indicators,but also additional Pearson-based correlations The closing prices of the top ten most relevant stocks calculated by the coefficient.On the basis of using the grid optimization method to select relatively optimal hyperparameters,the data of the training set is used to train each model,and then the test set is used to test the prediction effect.Furthermore,this paper studies the difference in prediction effects under different hyperparameter conditions and under the influence of extreme events.The results show that under different evaluation criteria,the three sub-models of AttLSTM constructed in this paper are superior to the comparison models in most of the prediction targets,and the mean and median differences have passed the significance test.In the three submodels Among them,the sub-model that adds three indicators at the same time performs best.At the same time,this article also finds that extreme events will weaken the prediction effect of the Att-LSTM model that adds derivative technical indicators and related stock indicators.In the case of extreme events,the Att-LSTM model that only adds basic indicators performs best.In addition,for the Att-LSTM model,selecting a reasonable combination of hyperparameters can help improve the prediction effect.
Keywords/Search Tags:Stock price prediction, Long-term dependence problem, LSTM neural network, attention mechanism
PDF Full Text Request
Related items