Font Size: a A A

Research On Stock Forecasting By Incorporating Emotional Features Of News Headlines

Posted on:2024-03-03Degree:MasterType:Thesis
Country:ChinaCandidate:X T HuFull Text:PDF
GTID:2568307064996669Subject:Engineering
Abstract/Summary:PDF Full Text Request
Stock investment is an important investment method,and accurately predicting stock trends is the foundation for investors to achieve good returns.The generation of investment risks and profits relies on the effectiveness of stock trend prediction models.News information has a significant impact on stocks,and the stock market is highly sensitive to news regarding companies,the economy,and global events.Global events can influence market indices,which are considered benchmarks for the overall health of the stock market.Changes in these indices can have a significant impact on investor sentiment.In addition to using historical stock trading data,incorporating stock news published by media platforms can help improve the accuracy of stock trend prediction models,thereby reducing investment risks and increasing investment returns.The stock market typically exhibits sector effects,where stocks in the same sector experience similar business themes and are affected by the same policies,leading to simultaneous upward or downward trends in stock prices.Investor herd mentality can lead to the occurrence of herd behavior,making sector effects more pronounced.Based on the above,the main work of this paper is as follows:1.To study the impact of sector effects on individual stocks,this paper selects stocks from the food and beverage sector as the research object.Using web scraping techniques,over 10,000 news headlines related to the food and beverage sector from the East Money website are collected.After removing duplicate headlines and irrelevant information,16,400 news headlines are selected.The headlines are manually labeled into three categories: negative,neutral,and positive sentiment.The proposed ERNIEText CNN model is trained,which utilizes ERNIE to generate dynamic word vector matrices for the news headlines.Text CNN is then applied to convolve and pool the word vectors,followed by a fully connected network to output the classification results.The proposed model achieves an accuracy of 81.89% on the designated test set.2.Historical trading data for stocks in the food and beverage sector in recent years is obtained from the Tushare platform.ST stocks and New Third Board stocks are excluded,and various technical indicators for each stock are calculated using the TALib technical analysis library.The sentiment classification results of the news headlines for each stock are converted into sentiment indicators.The trading data from January 2,2018,to May 31,2022,is designated as the training set,while the data from June 1,2022,to December 31,2022,is designated as the test set.All indicators are trained using the proposed BLSA-News(Bi LSTM-Self-Attention-News,BLSA-News)model,which utilizes Bi LSTM to extract features from the various stock indicators and employs self-attention mechanisms to calculate the impact weights between adjacent trading days.The model then outputs the prediction results through fully connected layers.The proposed model achieves a high accuracy of 60% and precision ranging from 51% to 72% on the selected stock test set.Based on the model’s predictions,the paper backtests the stock’s historical data to verify the effectiveness of the model.Buy and sell operations are conducted based on the predicted price movements,with a baseline strategy of holding the stock continuously.The backtesting demonstrates that the model’s strategy generates good returns and has a lower risk coefficient compared to the baseline strategy.
Keywords/Search Tags:stock prediction, sentiment classification, quantitative backtesting, ERNIE
PDF Full Text Request
Related items