Algorithmic trading based on the fear of COVID-19 in Europe

The spread of Covid-19 in Europe has affected our way of living, thinking, and even investing. The fear of the epidemic caused a context of maximum uncertainty and volatility in financial markets, which were driven by fear of the spread of the epidemic. In this article we propose an algorithmic trading system on the future of the Eurostoxx 50 that, instead of following technical indicators, follows the number of cases confirmed by Covid-19 in Europe. The back test of this system carried out throughout the weeks of confinement shows that the system is profitable. In this context, confirmed cases data is useful to assess investors’ mood and anticipate the evolution of the market. Therefore, an alternative way of investing arises for maximum uncertainty contexts, based exclusively on behavioral finance.


Introduction
This paper explores the behavioral finance capacity to anticipate market trends. In this case, we focus on the European stock market and its most representative index, the Euroxotxx 50, during the lockdown caused by the Covid-19 epidemic.
Sending buy and sell orders to the market for a certain financial instrument, algorithmic trading systems invest in financial markets without manual intervention, following the investment signals issued by an algorithm. Most of the trading systems that are operating nowadays follows Chartism rules, but the irruption of big data in asset management has opened a new approach for algorithmic trading.
There are many studies that show that the investor's mood is affected by multiple factors, changes over time and can be conditioned by experience or training (Cohen and Kudryavtsev, 2012). These mood swings provide evidence of anomalies in the behavior of the stock markets (Nofsinguer, 2005). Corredor, Ferrer and Santamaría (2013) state that investor mood has a significant effect on the performance of stocks.
Some of the factors that cause investor sentiment to change are: • Wheather (Hirshleifer andShumway, 2003, Jacobsen andMarquering, 2008) as sunny climates are associated with an optimistic mood and then positive returns. • Seasonal patterns like vacations generates the effect of "sell in May and go away" or the "Halloween" effect (Bouman and Jacobsen, 2002). This means that securities market yield should be greater from November to April than from May to October. • The Moon (Yuan, Zheng and Zhu, 2006) implies different returns according to the different phases of the moon observing differences from 3% to 5% in yield from one phase to another. • Sports results: Edmans, García and Norli (2007) studied the results of football, cricket, rugby and basketball and others have focused on the NFL (Chang, Chen, Chou and Lin, 2012), football (Berument, Ceylan and Gozpinar, 2006;Kaplanski and Levy, 2010) and on cricket (Mishra and Smyth, 2010). Gómez and Prado (2014) performed a statistical analysis of the following stock markets session return after national team football matches. The results obtained show that after a defeat of the national team, we should expect negative and lower than average prices on the country's stock market, the opposite occurring in the case of a victory.
If these factors that are common affect the behavior (Cachón-Rodríguez et al., 2019) of investors, then we can infer that suffering an epidemic such as Covid-19 with the consequences that this implies will also affect the evolution of the market. Thus, during the first days of the lockdown it was observed that Spanish investors gave preference to the shares of companies that showed a socially responsible attitude (Martín-Miguel et al., 2020;Plama-Ruiz et al, 2020). In the U.S. stock market, no previous infectious disease outbreak has affected the stock market as forcefully as the Covid-19 pandemic. Government restrictions on commercial activity and social distancing (Cachón-Rodríguez et al., 2021), operating with powerful effects in a service-oriented economy, are the main reasons the U.S. stock market reacted so much more forcefully to Covid-19 than to previous pandemics (Baker et al, 2020).
At this stage, if investor mood affects financial markets, the challenge is how to measure the effect of covid-19 in investors' mood to predict market trend. The media coverage of the evolution of the epidemic has been enormous. This coverage implied that rural residents are more likely to practice social distancing if they live in a media market (Cachón-Rodríguez et al., 2020) that is more impacted by Covid-19 (Kim et al, 2020), in other words, media coverage of the pandemic has affected the daily habits of the population, and delays, denials and misinformation about Covid-19 have exacerbated its spread and slowed pandemic response (Motta et al, 2020).
The relationship between sentiment generated by coronavirus-related news and volatility of equity markets is clear. The ongoing coronavirus outbreak resulted in unprecedented news coverage and outpouring of opinions in this age of swift propagation of information. Ensuing uncertainty in financial markets leads to heightened volatility in prices. The overwhelming panic generated by the news outlets are associated with increasing volatility in the equity markets and panic-laden news contributed to a greater extent to volatility in the sectors perceived to be most affected by coronavirus outbreak (Haroon et al, 2020). The more confirmed cases we see in the news, the greater the fear of the evolution of the pandemic and its devastating effects on the economy.
Gómez-Martínez (2013) elaborated a "Risk Aversion Index" based on the stats of Google Trends for certain economic and financial terms that relate to market growth. Through an econometric model, he shows that Google Trends provide relevant information on the growth of financial markets and may generate investment signs that can be used to predict the growth of major European stock markets. Therefore, could this indicator be valid to measure the fear of COVID-19 and thus anticipate the evolution of the financial market? According to this approach, we propose an algorithmic trading system that issues buy and sell orders by measuring the level of aversion to risk, in this case measured by the confirmed cases of Covid-19.
After this introduction, section 2 states the study hypothesis, discusses the research methodology and describes how the data was collected. Section 3 summarizes the model outputs followed with conclusions an discussion in section 5.

Theoretical framework
As we have seen in previous sections, investment decisions always have an emotional component, which is dominant in times of crisis. The purpose of this study is to analyze whether the fear of the spread of the Covid-19 epidemic in Europe, and its economic repercussions, has been able to guide the evolution of the European stock market.
Therefore, the hypothesis to be validated is: H0: Fear of the Covid-19 epidemic anticipates the evolution of the European stock market.
To validate this hypothesis, we first must define the two variables of the study.
On the one hand, we must measure fear of the epidemic. To quantify the fear of the spread of the epidemic, we have selected the number of new confirmed infections published daily by the World Health Organization (WHO). We assume that an increase in the daily number of confirmed cases increases fear of the epidemic while a reduction would imply that the epidemic is being contained and therefore its effects on the economy are being limited. Data have been collected directly form WHO dashboard for Europe: https://who.maps.arcgis.com/apps/opsdashboard/index.html#/ead3c6475654481ca51c248d52ab9c61 On the other hand, how could we measure the evolution of European Stock Market? In this case we have chosen the EURO STOXX 50 Index. As Stoxx.com defines , this is the Europe's leading blue-chip index for the Eurozone and provides a blue-chip representation of supersector leaders in the region. The index covers 50 stocks from 11 Eurozone countries: Austria, Belgium, Finland, France, Germany, Ireland, Italy, Luxembourg, the Netherlands, Portugal and Spain which is a good representation of European countries.
The methodology to be used was already used by Gómez-Martínez, Prado-Román and Plaza-Casado (2019) and is based on an algorithmic trading system that opens and closes long and short positions following only investor sentiment indicators.
In this study, we defined an intraday algorithmic trading system that will open short position in Eurostoxx 50 futures market if the number of new confirmed cases of Covid-19 has increased in the previous day (meaning that the fear of the epidemic grows), closing position in the afternoon. If the new confirmed cases of Covid-19 have decreased the previous day, the system will open a long position that will close hours later.
We validate the hypothesis of this study if the trading system is profitable during the coronavirus crisis period, the profit factor (ratio between money earned and money lost) is greater than one and the success rate is greater than 50% (more sessions winners than losers).
The study period begins on February 24, the date on which the WHO begins to offer relevant data in its dashboard and ends at the market break for Easter.
The quotes have been provided by the securities company iBroker, and the back test of the system has been executed using the Trading Motion SDK tool

Results
The main statistics of the back test performed are shown in Table 1.  The profit and loses chart of the system is shown in Figure 1 whereas the trade log of those operations could be consulted in the Annex.
Considering the data in the previous tables and figure, it is evident that the strategy followed, based exclusively on the evolution of the number of confirmed cases in Europe, has been profitable (with an ROI of 424%) and has exceeded the objectives defined for its statistics of performance (profit factor and success rates). Therefore, we accept the hypothesis H0.

Conclusions
For years, research in behavioral finance has shown that financial markets react to external stimuli that induce optimism or pessimism in investors. An impact such as the spread of the Covid-19 epidemic in Europe could not fail to affect the financial markets. This research article explores how financial markets react to fear, in this case the European financial market to fear of the evolution of the Covid-19 epidemic.
The methodology followed in this study has been based on the development of an intraday algorithmic trading system that operated short and long depending on the increase or decrease in confirmed cases in Europe published the previous day. The financial instrument chosen for this study was the future of the Eurostoxx.
The main contributions that could be highlighted from this study are: • The number of confirmed cases of new Covid-19 infections is a representative metric of the evolution of the epidemic and therefore of the fear that this implies on health, the economy and financial markets. • This metric has predictive capacity on the evolution of financial markets. Therefore, an algorithmic trading system that goes short (long) if there is an increase (decrease) in confirmed cases is a profitable system, in contexts of maximum uncertainty.
This is new evidence that sentiments affect the evolution of financial markets, especially in contexts of maximum uncertainty. In these contexts, investors could adopt multiple investment strategies that are based on metrics on the evolution of fear and thus obtain positive returns in absolute terms, applying bullish and bearish strategies.
The research has focused on a very specific period and opens a new line of research based on finding metrics that are adequate indicators of investor optimism and pessimism, and the correlation of these metrics with the market. The challenge is to find the metrics in the next contexts of volatility that will surely come and invest using them to obtain positive returns.
From this study, the most risk-tolerant and innovative investors can follow an alternative investment strategy that can give them great returns and turn extreme volatility situations into an opportunity.

References
Baker