Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2023 Jan:64:101881.
doi: 10.1016/j.ribaf.2023.101881. Epub 2023 Jan 16.

Machine learning sentiment analysis, COVID-19 news and stock market reactions

Affiliations

Machine learning sentiment analysis, COVID-19 news and stock market reactions

Michele Costola et al. Res Int Bus Finance. 2023 Jan.

Abstract

The recent COVID-19 pandemic represents an unprecedented worldwide event to study the influence of related news on the financial markets, especially during the early stage of the pandemic when information on the new threat came rapidly and was complex for investors to process. In this paper, we investigate whether the flow of news on COVID-19 had an impact on forming market expectations. We analyze 203,886 online articles dealing with COVID-19 and published on three news platforms (MarketWatch.com, NYTimes.com, and Reuters.com) in the period from January to June 2020. Using machine learning techniques, we extract the news sentiment through a financial market-adapted BERT model that enables recognizing the context of each word in a given item. Our results show that there is a statistically significant and positive relationship between sentiment scores and S&P 500 market. Furthermore, we provide evidence that sentiment components and news categories on NYTimes.com were differently related to market returns.

Keywords: COVID-19 news; Sentiment analysis; Stock markets.

PubMed Disclaimer

Conflict of interest statement

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Figures

None
Graphical abstract
Fig. 1
Fig. 1
Weekly number of articles collected from the three news sources over time: MarketWatch.com, NYTimes.com, and Reuters.com.
Fig. 2
Fig. 2
The Preprocessing steps using the Natural Language Toolkit (NLTK). Notes: Text refers to the raw text, which consists of all articles collected from NYTimes, Reuters, and MarketWatch; Sentence Tokenizer (NLTK) indicates the splitting of the text into single sentences using the NLTK; BERT Subword Tokenization refers to the splitting of sentences into words known to the model (or subwords and characters if the entire word is unknown); Conversion of Tokens into IDs indicates the creation of readable IDs; BERT Model is the final step, where BERT is able to train the model based on the preprocessing input.
Fig. 3
Fig. 3
FinBERT architecture developed by Araci (2019). Notes: The Financial Phrasebank consists of 4840 sentences from financial news originally developed by Malo et al. (2014); [CLS] stands for Classification and represents the token at the beginning of each sequence, which contains one or two sentences; Token 1 to k refer to the tokens created by the model. Each token represents a word that is known to the model’s vocabulary (or subwords and characters if the entire word is not known to the model); [SEP] stands for separation and represents the token at the end of each sequence; Dense refers to the dense layer, a neural network layer in which the final classification takes place; Sentiment prediction represents the output of the FinBERT model, which is a positive, negative, or neutral sentiment value.
Fig. 4
Fig. 4
Rolling seven-day average of the sentiment indicators over time according to the three news sources: MarketWatch.com, NYTimes.com, and Reuters.com. Dashed red lines indicate numbered significant events related to the COVID-19, as reported in Table 3. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)
Fig. 5
Fig. 5
Market returns, realized volatility, and Δlog trading volumes of the S&P 500 over the period from 23 January 2020 to 22 June 2020.

Similar articles

Cited by

References

    1. Ahmad W., Kutan A.M., Gupta S. Black swan events and COVID-19 outbreak: Sector level evidence from the US, UK, and European stock markets. Int. Rev. Econ. Finance. 2021;75:546–557. doi: 10.1016/j.iref.2021.04.007. - DOI
    1. Ahmed S., Alshater M.M., El Ammari A., Hammami H. Artificial intelligence and machine learning in finance: A bibliometric review. Res. Int. Bus. Finance. 2022;61 doi: 10.1016/j.ribaf.2022.101646. - DOI
    1. Akhtaruzzaman M., Boubaker S., Sensoy A. Financial contagion during COVID-19 crisis. Finance Res. Lett. 2021;38 doi: 10.1016/j.frl.2020.101604. - DOI - PMC - PubMed
    1. Akhtaruzzaman M., Boubaker S., Umar Z. COVID–19 media coverage and ESG leader indices. Finance Res. Lett. 2022;45 doi: 10.1016/j.frl.2021.102170. - DOI - PMC - PubMed
    1. Andriotis P., Takasu A., Tryfonas T. In: Advances in Digital Forensics. Peterson G., Shenoi S., editors. Springer; Cham: 2014. Smartphone message sentiment analysis; pp. 253–265. - DOI

LinkOut - more resources