As the world continues to deal with the effects of COVID-19, the market has been filled with news of every emotion. We measured two of these emotions — “hope” and “fear” — in news specifically about the S&P500 companies in early 2020. Powerfully, we can see news of hope battling it out with fear over the last months, but ultimately with hope coming out ahead.
One instance of where the chart most apparently represents market sentiment is if we take a look at March 8th. Before the market opened March 9, 2020, there was a spike of 100% fearful word mentions and 0% hopeful word mentions. At that time, the Dow had its worst day since 2008 in response to the collapse of oil prices and bond yields.
We've published the code used to create the chart in our GitHub repository. This research notebook goes through the steps to plot the instances of fearful and hopeful words in the news related to S&P500 companies over the last several months.
We used QuantConnect's alternative data source TiingoNews which crawls the web for thousands of news articles a day. The data is linked to ticker symbols, allowing users to leverage news about specific assets across time to determine trading strategies.
The percentage scale used for the y-axis represents the percentage of fearful words out of all mentions of fearful and hopeful words and the percentage of hopeful words out of all mentions of fearful and hopeful words. We defined fearful and hopeful words in the following way:
# Words for sentiment scoring
fearful_words = ["hopeless", "death", "fear", "fearful", "bearish", "panic", "loss", "scared", "crisis", "emergency", "pessimistic"]
hopeful_words = ["hope", "hopeful", "uplifting", "optimism", "hoping", "hopes", "bullish", "bright", "improve", "optimistic", "growth"]
We encourage you to draw your own findings from the data and modify the code for your research. You can learn more about how to conduct research with QuantConnect using this short tutorial. You can continue to find research related to current events and financial data in our research GitHub repository. We can't wait to make more information accessible for all.
In the face of all the challenges of our present day, the reminders to stay optimistic are ever needed. Let's hold on to the sentiment that hope can conquer fear, even in unpredictable times.
Sherry Yang
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!