{"title":"Stock market forecasting based on machine learning: The role of investor sentiment","authors":"Tingting Ren , Shaofang Li","doi":"10.1016/j.physa.2025.130533","DOIUrl":null,"url":null,"abstract":"<div><div>Stock market prediction remains a classical yet challenging problem, with the focus on the investor sentiment growing increasing significant in big data era. This analysis delves into the question whether and how predicable is the stock market when considering investor sentiment. By leveraging the initial and customized LM financial lexicon and Vader technology, Word2vec and Doc2vec and BERT embedding vector method (along with two fine-tuned models: FinBERT and SentiBERT), we first construct nine investor sentiment indexes based on the textual data from Twitter between November 2019 and December 2021. And then we employ three machine learning algorithms (SVR, AdaBoost, and RF) to predict the daily return of the S&P 500 index. The experiment results confirm that the investor sentiment index can enhance prediction accuracy beyond the market indicator, aligning with prior research. Embedding vector methods exhibit superior performance compared to the fine-tuned models, and the customized dictionaries outperform their traditional counterparts. Furthermore, the composite sentiment index, integrating all the single indexes, achieves the best overall performance. To further validate our findings, we conduct robustness checks on the DJIA index and across different economic cycles, observe that the single sentiment index performs worse with shorter datasets, whereas the composite index demonstrates consistent improvement in both volatile and steady periods. These findings offer valuable insights for future research and provide practical applications in stock market prediction.</div></div>","PeriodicalId":20152,"journal":{"name":"Physica A: Statistical Mechanics and its Applications","volume":"666 ","pages":"Article 130533"},"PeriodicalIF":2.8000,"publicationDate":"2025-03-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Physica A: Statistical Mechanics and its Applications","FirstCategoryId":"101","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0378437125001852","RegionNum":3,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"PHYSICS, MULTIDISCIPLINARY","Score":null,"Total":0}
引用次数: 0
Abstract
Stock market prediction remains a classical yet challenging problem, with the focus on the investor sentiment growing increasing significant in big data era. This analysis delves into the question whether and how predicable is the stock market when considering investor sentiment. By leveraging the initial and customized LM financial lexicon and Vader technology, Word2vec and Doc2vec and BERT embedding vector method (along with two fine-tuned models: FinBERT and SentiBERT), we first construct nine investor sentiment indexes based on the textual data from Twitter between November 2019 and December 2021. And then we employ three machine learning algorithms (SVR, AdaBoost, and RF) to predict the daily return of the S&P 500 index. The experiment results confirm that the investor sentiment index can enhance prediction accuracy beyond the market indicator, aligning with prior research. Embedding vector methods exhibit superior performance compared to the fine-tuned models, and the customized dictionaries outperform their traditional counterparts. Furthermore, the composite sentiment index, integrating all the single indexes, achieves the best overall performance. To further validate our findings, we conduct robustness checks on the DJIA index and across different economic cycles, observe that the single sentiment index performs worse with shorter datasets, whereas the composite index demonstrates consistent improvement in both volatile and steady periods. These findings offer valuable insights for future research and provide practical applications in stock market prediction.
期刊介绍:
Physica A: Statistical Mechanics and its Applications
Recognized by the European Physical Society
Physica A publishes research in the field of statistical mechanics and its applications.
Statistical mechanics sets out to explain the behaviour of macroscopic systems by studying the statistical properties of their microscopic constituents.
Applications of the techniques of statistical mechanics are widespread, and include: applications to physical systems such as solids, liquids and gases; applications to chemical and biological systems (colloids, interfaces, complex fluids, polymers and biopolymers, cell physics); and other interdisciplinary applications to for instance biological, economical and sociological systems.