Font Size: a A A

Research On Stock Prediction Based On Attention Mechanism With Fusion Of Multi-features

Posted on:2022-01-24Degree:MasterType:Thesis
Country:ChinaCandidate:J P YangFull Text:PDF
GTID:2518306560491204Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the continuous development of the financial market,more and more people invest in buying and selling stocks to obtain more returns.However,stock price fluctuations are affected by developing the corresponding industry market,industry news information,and national macro policies,and the changes are highly random.Predicting the trend of stock prices more accurately plays a vital role in investors' investment decision-making.Using stock price data to predict the future trend of stock prices based on algorithmic models can provide investors with an investment basis.However,this method does not consider the impact of industry news information on stock price trends.The industry news information reflects the industry's current situation,affects investors' investment decisions,and has an essential impact on stock price trends.The algorithms for the stock prediction that integrate stock price features and news text features are studied in this paper based on deep learning technology.The main results are as follows:(1)A model for feature extraction of stock news text information based on basic BERT and attention mechanism is proposed.First,BERT is used to embed the news headlines of stocks as words to obtain the vectorized representation of the text.Then we use BERT's Fine-tune do semantic classification tasks to extract the positive and negative feature vectors of a single news text.Finally,the attention mechanism is adopted to set different weights for different news information,and the day's comprehensive news text feature vector is obtained.Compared with traditional feature extraction methods for stock news text,this model better considers the meaning of the text context when extracting features,and considers the impact of multiple news on stocks.At the same time,the convolutional neural network is used to extract features of historical stock price data,which can effectively capture short-term dependencies while reducing the data dimension.The two types of feature extracting methods are fused as the input of the subsequent prediction model.(2)A stock prediction model based on GRU-Attention fusion multi-features is proposed.The fused features of historical stock price data and news text are fed into the model.The cyclic neural network GRU is used to capture the long-term dependence in the time sequence,which solves the problem of the vanishing or exploding gradient of the ordinary cyclic network.Since different stock characteristics have different degrees of influence on stock price trends,the attention mechanism is used to focus on crucial feature information and filter worthless information to further improve stock trend prediction accuracy.Finally,the data set is constructed by the historical price data and news text data of the corresponding stocks from the finance websites of Net Ease Finance and Oriental Fortune.Then experiments for verifying the proposed model are conducted on this data set.The experimental results show that stock news information will have an impact on stock price fluctuations.When the historical stock price and news features are used as input,the prediction accuracy rate is 3.42% higher than that of only inputting historical price features.Compared with the Word2 Vec model,the positive and negative feature extraction of news text through BERT is sufficient,and the prediction accuracy is increased by 1.6%.
Keywords/Search Tags:Stock Prediction, Deep Learning, BERT, Attention Mechanism
PDF Full Text Request
Related items