Predicting Stock Return Movement Directions with Sentiment Analysis of News Headlines: A Machine Learning Approach
Hanxin Hu and
Ting Sun
Chapter 53 in Handbook of Investment Analysis, Portfolio Management, and Financial Derivatives:In 4 Volumes, 2024, pp 1707-1734 from World Scientific Publishing Co. Pte. Ltd.
Abstract:
This chapter combines the sentiment features of news headlines, stock market data, and macroeconomic factors to predict the direction of stock return movements in one month after the release of the news article. The sentiment features are extracted with Flair, an advanced library for Natural Language Processing (NLP). The stock market data of a company contains a comprehensive collection of 94 variables used by a prior literature (Gu et al., 2020) for the prediction of stock return. To construct the prediction model, this chapter applies seven machine learning algorithms (including Gradient Boosting, XGBoosting, Random Forest, Artificial Neural Networks, Support Vector Machine, Naïve Bayes, and Logistic Regression). The out-of-sample tests show that tree-based ensemble methods (i.e., Random Forest, XGBoosting, and Gradient Boosting) provide the most accurate predictions, with the maximum AUC-ROC of 0.74. Furthermore, this study provides evidence for the effectiveness of the sentiment features of news headline for the prediction of future stock returns as the median of the sentiment score of the news headline is listed as one of the most important predictors in the model.
Keywords: Financial Accounting; Financial Auditing; Mutual Funds; Hedge Funds; Asset Pricing; Options; Portfolio Analysis; Risk Management; Investment Analysis; Momentum Analysis; Behavior Analysis; Futures; Index Futures; CDCs; Financial Econometrics; Statistics; Financial Derivatives; Financial Accounting (search for similar items in EconPapers)
JEL-codes: G1 G11 G12 G3 M41 M42 (search for similar items in EconPapers)
Date: 2024
References: Add references at CitEc
Citations:
Downloads: (external link)
https://www.worldscientific.com/doi/pdf/10.1142/9789811269943_0053 (application/pdf)
https://www.worldscientific.com/doi/abs/10.1142/9789811269943_0053 (text/html)
Ebook Access is available upon purchase.
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:wsi:wschap:9789811269943_0053
Ordering information: This item can be ordered from
Access Statistics for this chapter
More chapters in World Scientific Book Chapters from World Scientific Publishing Co. Pte. Ltd.
Bibliographic data for series maintained by Tai Tone Lim ().