Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Infographics Challenge: Economic Implications of COVID-19

About the Challenge:
COVID-19 has stolen lives, paralyzed economies, and continues to be a threat to life as we know it. Just how damaging the pandemic will be to the global economy is still a question that we’d like to explore.

We have designed this challenge to encourage you, our talented and diverse community, to work on this problem. Because you are from all over the world and have different backgrounds and interests, we are confident that you will help us look at this issue from various angles and provide insight invisible to others.

This challenge is quite different from previous ones. Instead of creating factors to predict stock movements, we are asking you to create infographics that illustrate the impacts of COVID-19 on the economy and the stock market. This challenge is broad and not as specific as previous ones — we want to encourage you to get creative and sharpen your data science and visualization skills. Unlike our factor challenges, the analysis can be completely historical.

The data sources below and the attached notebook are here to get you started. Feel free to use other datasets and to get as creative as you'd like — we very much encourage it! If you are interested in supporting this challenge as a sponsor or running a similar one, please reach out to us at [email protected].

Data Sources:
The following datasets are ones we think are relevant to this challenge. You're free to use other data sources as well.
- FactSet Geographic Revenue Exposure (particularly the est_pct field)
- FactSet RBICS Focus
- Coronavirus Source Data provided by Our World in Data

We recognize that both RBICS and Geographic Revenue Exposure have holdouts in place. However, since both of these datasets update relatively infrequently, you can just forward-fill them (as shown in the example notebook).

The Coronavirus Source Data is a csv file with information about new_cases, new_deaths, total_cases, and total_deaths per country, per day, starting December 31, 2019. This file can be found in your data directory in research and used in research as a local_csv. We will update the file every two weeks.

You are also free to use other data sources you find online, like the ones from COVID19Tracking project containing data on hospital admissions in the US.

Requirements:
There aren't many requirements for this challenge. Keep your submissions related to the economic implications of COVID-19 and use your creativity to best visually communicate your ideas.

Selection Criteria:
Every two weeks, we select the top 10 submissions, share them in a survey with you all, and have you vote for the top two winners. So keep an eye out for the survey we’ll be sharing in the replies below with our top 10 selected infographics. All submissions should connect COVID-19 to economic data (there are enough pure COVID-19 analyses out there already). To submit to the challenge, simply reply to this post and attach your notebook.

Please include the following in your submissions:
- A clearly articulated hypothesis. For example, “healthcare companies fared better in the COVID-19 crises due to their services being in higher demand.”
- Clear graph(s) showing your conclusion with proper labels and titles. Ideally, the graph stands on its own.
- Interim steps outlined and explained in the analysis
- A clear writeup discussing conclusions (a paragraph is enough). Note that the hypothesis must not necessarily pan out, it is also interesting to refute them.

Prizes:
- This challenge is run on a rolling basis. Every two weeks, the top two infographics, voted for by the community, each will win $100 each.
- Selected winners will have the opportunity to see their infographics updated with current data (in the holdout period) and present their analysis during one of our webinars where it will later be shared on our YouTube Channel.

Important Upcoming Dates:
There is no deadline for this challenge - we're evaluating ideas on a rolling basis. Share your insights and let's come together through this isolating global crisis.

I hope to see your submission on the list!

Thomas Wiecki,
VP of Data Science at Quantopian

Disclaimer

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 Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian 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.

9 responses

Here's some specific questions I've personally been interested in, but haven't yet had the opportunity to explore:

  • Can we look at data from 2007-2008 to attempt to predict the magnitude and duration of the global economic impact?
  • Can any of our data sets (GeoRev, RBICS Focus, etc) help us understand the interconnectedness of various industries and supply chains, and predict which ones will be most severely impacted?
  • Can data from markets with more advanced infection rates help predict similar economic effects in other markets?
  • Can we compare different governments' responses against ongoing market or other data, so that governments can make more informed decisions about how to respond?
  • Could analyses like these help individuals make more informed decisions about their investments, rather than panic-selling or buying back in at a bad time?

It's important to avoid contributing to the ongoing crisis by making strong claims which prove to be incorrect, so any attempt to effectively address questions like these will need to both come from and communicate a healthy posture of epistemic humility (now even more so than usual!); but I am confident that thoughtful analysis of reasonable data can be tremendously beneficial.

Disclaimer

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 Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian 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.

This looks like an interesting paper: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3570280

Quant Bust 2020
Zura Kakushadze

Abstract
We explain in a nontechnical fashion why dollar-neutral quant trading strategies, such as equities Statistical Arbitrage, suffered substantial losses (drawdowns) during the COVID-19 market selloff. We discuss: (i) why these strategies work during "normal" times; (ii) the market regimes when they work best; and (iii) their limitations and the reasons for why they "break" during extreme market events. An accompanying appendix (with a link to freely accessible source code) includes backtests for various strategies, which put flesh on and illustrate the discussion in the main text.

(First submission ever :])

Hi everyone, here is a first notebook for visualizing COVID-19 effects for factor returns and mapping related areas. Everything here as to be taken for information purpose only.

Summary:
I added the cumulative changes of reported cases to Thomas Wiecki notebook sample to visualize the stagnation of the epidemy (China for instance).
The dendrograms reflect the degree of correlation between reported cases. The standard deviation of factor returns doesn't seem to be affected by the reported cases until cases in Europe and US were rising.

However, the factor returns seem to hold well even in stress period as they slowly came back to normal.
The spread of factor returns seems to indicate higher spread than normal level, further steps will requires stationarity test of integration order in larger dataset to explore whether the relationship holds in the long run.

Take care and stay at home.

Lucas BL

@Lucas BL: Thanks for your submission -- it looks great! I think studying volatility and factor spreads is a great direction to go in. I also think further study of market correlation patterns could be very interesting.

I wonder here:

delta_df = covid_df.pct_change().rolling(1).mean().mean(axis=1)  
delta_df = pd.DataFrame(delta_df).dropna()  
delta_df.columns = ['delta_df']  
delta_df['Volatility'] = delta_df.rolling(2).std().mean(axis=1)  
delta_df = delta_df.pct_change().dropna()  

Did you mean to take the pct change of the pct-change of the covid-numbers and the pct-change of the volatility of that change?

@Thomas Wiecki, thank you for your feedback and mapping this blackmagic line. It actually doesn't affect the elbow curve but the last line should be deleted for readability purpose.

To make the code more explicit:

global_total_cases_df = pd.DataFrame()  
global_total_cases_df['mean'] = (covid_df.pct_change().rolling(1).mean().mean(axis=1).dropna()  
global_total_cases_df['volatility'] = global_total_cases_df.rolling(2).std().mean(axis=1)  
global_total_cases_df = global_total_cases_df.dropna()  

In terms of correlation a simple plot of the total cases reported in each areas show that all countries are following similar patterns that 'could' be an interesting route for mapping pandemic pattern of disease spread.

Hypothesis:

SPY and SHY z-score-normalized minutely dollar volume difference plotted as a heat map can be used to detect COVID-19 global pandemic related shifts in market regimes

Discussion:

Extreme relative dollar volume movements in SPY and SHY, both intraday and near end-of-day, indicate a COVID-19 pandemic related shift in the market regime, relative to the earlier period of 2020, when the economic impact of the pandemic had not yet been factored into the market. The data also suggest that U.S. government market interventions may play a role in driving changes in market regimes (further investigation is required to reveal explicit correlations, e.g. passage of a major economic stimulus package by Congress, and Federal Reserve actions).

@Grant: That's a really neat idea. Two thoughts:

  • The Jet colormap is usually frowned upon, see here: https://jakevdp.github.io/blog/2014/10/16/how-bad-is-your-colormap/
  • There are definitely clusterings visible in the data. I wonder how much would be lost if you averaged over days. That would then allow you to more clearly link this to the spread of the pandemic which is data currently not included in your analysis.

Thanks Thomas -

I've attached an update. I am using a 1-year baseline window for the mean and standard deviation, and a 1-day window for the dollar volume smoothing. The latter window could be changed for better intraday resolution (see code pasted below).

As far as linking to the pandemic spread, my read is that the Fed did something right that took effect the last week of March 2020 to fix the market plumbing (see https://www.federalreserve.gov/covid-19.htm), versus a glimmer of hope that the epidemic was in check, and that the economic impact was understood and priced into the market.

Here's an early article (published Jan 27, 2020,10:20am EST) highlighting the black swan event risk of COVID-19:

https://www.forbes.com/sites/jackkelly/2020/01/27/the-coronavirus-is-a-black-swan-event-that-may-have-serious-repercussions-for-the-us-economy-and-job-market/

The question in my mind is how many other similar public statements are out there, and is there any indication in the market data that actions were taken in response to them (e.g. large moves closing out long stock positions)? Does Quantopian have access to ETF flow data?

WINDOW_BASELINE = 260*390  
WINDOW = 390  
dollar_volumes = data.iloc[:, 0:2]  
means = dollar_volumes.apply(lambda x: pd.rolling_mean(x, window=WINDOW_BASELINE))  
sds = dollar_volumes.apply(lambda x: pd.rolling_std(x, window=WINDOW_BASELINE))  
dv = dollar_volumes.apply(lambda x: pd.rolling_mean(x,window=WINDOW))  
zs = ((dv - means) / sds)  
data['z_diff'] = zs.iloc[:, 1] - zs.iloc[:, 0] # DV_SHY - DV_SPY (where DV is the z-score normalized dollar volume)  

Want to submit to our COVID-19 challenge, but don’t know where to start? Check out our latest video, “COVID-19 Infographics Challenge Overview” to get an in-depth explanation of the challenge and the possible approaches you could take:

Disclaimer

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 Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian 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.