The role of cryptocurrencies in predicting oil prices pre and during COVID-19 pandemic using machine learning

This study aims to explore the role of cryptocurrencies and the US dollar in predicting oil prices pre and during COVID-19 pandemic. The study uses three machine learning models (i.e., Support vector machines, Multilayer Perceptron Neural Networks and Generalized regression neural networks (GRNN)) over the period from January 1, 2018, to July 5, 2021. Our results are threefold. First, our results indicate Bitcoin is the most influential in predicting oil prices during the bear and bull oil market before COVID-19 and during the downtrend during COVID-19. Second, COVID-19 variables became the most influential during the uptrend, especially the number of death cases. Third, our results also suggest that the most accurate model to predict the price of oil under the conditions of uncertainty that prevailed in the world during the bear and bull prices in the wake of COVID-19 is GRNN. Though the best prediction model under normal conditions before COVID-19 during an uptrend is SVM and during a downtrend is GRNN. Our results provide crucial evidence for investors, academics and policymakers, especially during global uncertainties.


Introduction
The global COVID-19 pandemic has created economic chaos worldwide and made a number of severe socio-economic issues (Abedin et al., 2021;Ftiti et al., 2021;Queiroz et al., 2020). For instance, governmental restrictions such as large-scale closure and travel restrictions due to lockdown actions led to an unprecedented decline in global growth by 3.2% in 2020 (Abedin et al., 2021). Due to these severe uncertainties, many investors moved to secure safe-haven assets because trade risky assets have the largest decline in a single week since the 2008 global financial crisis in the final week of February 2020 (Park, 2022). Also, the Dow Jones Industrial Average (DJIA) declined by 33% on 20 March 2020, from its 2019 value, since the start of COVID-19 in Wuhan, China (Abedin et al., 2021;Albitar et al., 2021;Alshater et al., 2022;Chen et al., 2021;Elmarzouky et al., 2021). This has led to a quick decline in the global demand for crude oil with sharp downward variations. For example, West Texas intermediate (WTI) oil prices have crushed to below zero in April 2020, with a 4.5% drop in the world industrial production index in the first three months of 2020 (Salisu et al., 2021). A strand of literature has been conducted on crude oil because it is one of the most vital commodities worldwide. It represents about 50% of the general commodity index (Bašta & Molnár, 2018). Also, it has become evident that crude oil works as a fundamental asset in the trading of different financial instruments and the expanded power of oil price shocks on the global financial markets.
Meanwhile, cryptocurrency markets have been affected and gained investors' attention during the current COVID-19 uncertainties. Bitcoin and Ethereum, which are the greatest illustrative cryptocurrencies, have documented the biggest trading volumes and occupy the highest market capitalizations (Kim et al., 2021). For instance, Bitcoin has noted a trading volume of USD 1240 billion (21,336,435 BTC) and a market capitalization of USD 1097 billion, and Ethereum has reached a trading volume of USD 546 billion (118,187,782 ETH) and a market capitalization of USD 547 billion in November 2021. It is worth mentioning that Bitcoin and Ethereum account for 62% of the cryptocurrency markets according to the CoinMarketCap data, 1 Consequently, Bitcoin and Ethereum were chosen to represent cryptocurrencies. The global COVID-19 outbreak has affected cryptocurrency markets. For instance, the biggest weekly decline in the Bitcoin price (nearly 36%) occur on 13 March 2020 (Jareño et al., 2021). Although these declines paralleled oil prices, we have observed the opposite in other periods. Specifically, Fig. 2 shows that oil prices were rising and Bitcoin and Ethereum prices were falling and vice versa during periods from October 2019 until August 2021. Academic literature argues that cryptocurrencies such as Bitcoin can be used for hedging against oil, especially during times of political and economic turmoil (Al-Yahyaee et al., 2019;Das et al., 2020;Ghazani & Khosravi, 2020;Mo et al., 2018;Selmi et al., 2018). Thus, cryptocurrency assets are commodities and present the same aspects of commodity markets. Per se, we expect that cryptocurrency prices may predict global crude oil prices. Moreover, active trading and mining of cryptocurrencies demand extensive electricity consumption. This may affect the energy markets (Okorie & Lin, 2020). Thus, our study aims to predict crude oil prices using cryptocurrencies and the US dollar pre and during COVID-19 in times of severe uncertainty. Then, it determines the importance of these variables in predicting the price of oil before and after COVID-19 and identifying the most accurate neural network model during the market downtrend and uptrend.
Using three neural network models (i.e., SVM, MLP and GRNN), we predicted the price of USOIL based on historical data for Bitcoin, Ethereum, the US dollar index and the COVID-19, dividing our data into 8 scenarios before and during COVID-19 with and without COVID-19 variables during the uptrend and downtrend of oil markets. Our results indicate that Bitcoin is the most influential in predicting oil prices during the bear and bull oil market before COVID-19 and the downtrend during COVID-19. Ethereum has become the most influential during the bull oil market during COVID-19. The reason for this may be due to Tesla cancelling dealing in Bitcoin and the statement of its chairman that the reason for this is the use of fossil fuels in mining. In addition, Bitcoin has been banned in China during this period. After adding COVID-19 variables to our model, we found that they became more important than Ethereum and the US dollar index during the downtrend, and Bitcoin continued to be the most influential according to SVM and MLP, while COVID-19 variables became the most influential during the uptrend, and the most influential variable was death cases according to the three models. Our results also suggest that the most accurate model to predict the price of oil under the conditions of uncertainty that prevailed in the world during the downtrend during COVID-19 is GRNN and during the uptrend also if the COVID-19 data is used as a total case alone, but if we add the new cases, the most accurate model is SVM. Though the best prediction model under normal conditions before COVID-19 during an uptrend is SVM and during a downtrend is GRNN.
This study contributes to the current literature in several ways. First, we use machine learning (Karim et al., 2021;Kazancoglu et al., 2022;Khalilpourazari & Hashemi Doulabi, 2022) to understand the predictability power of cryptocurrencies, the US dollar, and the COVID-19 on oil prices. Other studies used conventional models to investigate this relationship (e.g., Albulescu & Ajmi, 2021;Bénassy-Quéré et al., 2007;Charfeddine et al., 2020;Jareño et al., 2021;Mensi et al., 2020;Okorie & Lin, 2020;Kumar et al., 2022aKumar et al., , 2022bKumar et al., 2022aKumar et al., , 2022bNyawa et al., 2022;Queiroz et al., 2020;Queiroz & Fosso Wamba, 2021;Wen et al., 2018;Zhang et al., 2008). Second, we cover a longer period during COVID-19. Specifically, we cover the period from January 2020 to July 2021, which is a longer period than the period covered by previous literature that studied cryptocurrencies and oil during COVID-19 (Jareño et al., 2021). Third, to the best of our knowledge, this is the first work that describes the importance of the impact of each variable of Bitcoin, Ethereum and the US dollar in predicting oil prices in detail before and during COVID-19. Fourth, to the best of our knowledge, this is the first work that includes specific and detailed COVID-19 variables such as total confirmed, total death, total recovered, new confirmed, new death and new recovered cases. Fifth, to the best of our knowledge, this is the first work that describes the effect of cryptocurrencies, the US dollar and COVID-19 on oil during different uncertain periods such as the up-and down-market trends. Sixth, we identify the most accurate model that can be used before and during COVID-19 in the up-and-down-market trends. In other words, we identify the most accurate prediction model under normal and severe uncertainties conditions.
The remainder of this study is constructed as follows: Sect. 2 reviews the literature. Section 3 describes our dataset and methodology. Section 4 presents and discusses our results while Sect. 5 concludes our work.

Literature review and hypotheses development
This section analyses extant literature on predicting oil prices and offers the theoretical reasoning for examining the impact of cryptocurrencies and COVID-19 on the predictability of oil prices.

Cryptocurrency and oil prices
A growing strand of literature recently has focused on the analysis of cryptocurrencies with the aim of discovering the response of the cryptocurrency markets to the COVID-19 outbreak in addition to differences in the relations between cryptocurrencies and other traditional assets (Corbet et al., 2019;Jareño et al., 2021). Corbet et al. (2019) review the existing literature, suggesting that cryptocurrencies are reliable investment assets with genuine value. several studies examined the potential relation between energy and cryptocurrencies from the view of the influence of energy prices on cryptocurrency prices (Bouri et al., 2017a(Bouri et al., , 2017bO'Dwyert & Malone, 2014). These studies show that energy is associated with Bitcoin and other cryptocurrencies. In fact, cryptocurrencies production depends on mining, which consumes a lot of energy. This is clear in the case of Bitcoin (Bouri et al., 2017a(Bouri et al., , 2017b. O'Dwyert and Malone (2014) expect that electricity utilized in Bitcoin mining is almost equal to Ireland electricity consumption. Li et al. (2019) also show that Monero mining electricity consumption in the world in 2018 is 645.62 GWh worldwide. Gallersdörfer et al. (2020) show that the biggest cryptocurrency from the market capitalisation view (i.e., Bitcoin) is responsible for 2/3 of the total energy demand, while the second cryptocurrency from the market capitalisation view (i.e., Ethereum) accounts for 11.46% of the total energy demand as shown in Fig. 1. Hayes (2017) indicates that Bitcoin value shows the mining cost. Kristjanpoller and Minutolo (2021) examined and provided evidence about the fractal and cross-correlation between electricity prices in the USA and crude oil and natural gas prices. Therefore, an increase in oil prices signals a potential increase in Bitcoin prices. Yet, this relationship might be bidirectional. On the one hand, cryptocurrencies such as Bitcoins are generated by utilizing intensive energy and, as a result, lower energy prices may lead to lower Bitcoin prices. This suggests a positive association between energy and Bitcoin prices (Bouri et al., 2017a(Bouri et al., , 2017b.  Bouri et al., (2017aBouri et al., ( , 2017b and Dyhrberg (2016) suggest that investors can use cryptocurrencies such as Bitcoins as a hedge against uncertainty. Also, Bitcoins can be employed as a hedge against the US dollar in the short term. Thus, Bitcoin has some hedging abilities like traditional hedging commodities such as gold and can be used to hedge market-specific risk. in the same vein, Das et al. (2020) explore the hedging and safe haven characteristics of Bitcoin against crude oil implied volatility and structural shocks. They found that traditional hedging commodities such as gold, commodity and the US Dollar outperform Bitcoin to hedge oil-related uncertainties. However, Selmi et al. (2018) suggested that despite that Bitcoin can be employed as a hedging instrument, it depends on Bitcoin's different (bear, normal or bull) market conditions and the trend of oil prices. Also, Guesmi et al. (2019) show that Bitcoin can be employed for hedging. They mentioned that Bitcoin will be the best option to lower the overall portfolio risk if investors need to add other assets to their portfolio of gold, oil and equities.
In the same context, other studies examined Bitcoin as a diversifier. Charfeddine et al. (2020) show that cryptocurrencies can act as financial diversification. Moreover, Charfeddine et al. (2020) find that the association between cryptocurrencies and conventional assets (gold, S&P 500, and oil) is vulnerable to outside economic and financial shock waves. Dutta et al. (2020) show that Bitcoin acts only as a diversifier for crude oil but not as a safe haven. Al-Yahyaee et al. (2019) support this notion. In the same line, a strand of the literature suggests that Bitcoin is less effective than the traditional safe-haven asset such as gold when it acts as a safe-haven (Baur et al., 2018;Klein et al., 2018;Musialkowska et al., 2020). Smales (2019) points out that liquidity problems, transaction costs and the time required to execute transactions hinder Bitcoin from being an optimal safe-haven asset.
Regarding the relationship between cryptocurrencies and oil, Gajardo et al. (2018) suggest that Bitcoin is greater multifractal spectra compare to the other currencies with crude oils (WTI). Ghazani and Khosravi (2020) support this notion and found the cross-correlations between three cryptocurrencies (including Bitcoin, Ethereum and Ripple) and crude oils (WTI and Brent). Van Wijk (2013) shows a negative relationship between Bitcoin and oil prices. Huynh et al. (2020) show that the USA and European crude oil indices shocks are largely associated with the movements of most cryptocurrencies. Further, the findings show that the European crude oil prices are a source of shocks to the cryptocurrencies while the USA oil index looks to be a receiver of shocks. On the contrary, other studies have pointed to the impact of cryptocurrencies on oil, for example (Ji et al., 2019) study the information interdependence between major cryptocurrencies and some commodities such as energy, agriculture, and metals. It finds that the interdependence changes over time as cryptocurrencies are becoming more connected and prominent over time while energy commodities are dependent on cryptocurrencies' price dynamics.
According to the above previous studies, cryptocurrencies can be used as diversifiers (Al-Yahyaee et al., 2019;Charfeddine et al., 2020;Dutta et al., 2020) or hedging (Al-Yahyaee et al., 2019;Bouri et al., 2017aBouri et al., , 2017bDas et al., 2020;Dyhrberg, 2016;Guesmi et al., 2019;Selmi et al., 2018) or it can also be a safe haven (Klein et al., 2018;Musialkowska et al., 2020). Consequently, when there is an expectation of the arrival of a period of uncertainty, mutual funds, hedge funds and individual investors will turn to a safe haven, hedge or diversify to face this period, which will lead to a rise in cryptocurrencies price and then a decline in oil prices as they approach a period of uncertainty. That an increase in cryptocurrency prices occurs before the fall in oil prices, as is the case in the government bond market, and we can infer what happened during the Covid-19 pandemic, which is shown in Fig. 2. It suggests that the price of both Bitcoin and Ethereum increases while the price of oil decreases. Most of the previous studies focused on the impact of oil prices on cryptocurrency prices, as cryptocurrencies consume energy to mine them (Bouri et al., 2017a(Bouri et al., , 2017bHayes, 2017;Krugman & Obstfeld, 2003;Palombizio & Morris, 2012), but few have studied otherwise (Ji et al., 2019) and we add to this rare literature, as we study the impact of cryptocurrencies on oil prices. What motivated us for that is three reasons: First: cryptocurrencies are used by investors, investment funds and hedging funds for diversification, hedging and as a safe haven. Therefore, the demand for it can increase during periods of uncertainty, and consequently, the profits of the miners, which may push more miners to enter the cryptocurrencies mining industry and the current miners increase their activity, which may lead to an increase in demand for energy and thus increase the demand for oil that is used in power generation and thus increases its prices. Second: investment fund managers and investors may expect a state of uncertainty in the future, which may push them to buy cryptocurrencies to face this situation, and thus the change in cryptocurrencies prices may precede the change in oil prices. Third, a scarcity of previous studies that studied the impact of cryptocurrencies on oil. Yet, to our best knowledge, no extant literature has focused on the relation between the cryptocurrencies market and oil prices during the COVID-19 pandemic using machine learning. Thus, we hypothesize that: H1 Machine learning models can enhance the predictability of cryptocurrencies on oil prices pre and during the COVID-19 outbreak.

USD and oil prices
A number of theories explain the relationship between oil prices and exchange rates (Albulescu & Ajmi, 2021). Darby (1982) refers to the supply-demand avenue as oil price differences are associated with greater inflation. Specifically, national interest rate changes due to inflationary pressures, thus influencing the national currency value in line with the real interest rate parity hypothesis. Bénassy-Quéré et al. (2007) assert that short-run portfolios and the medium-and long-run wealth channels influence a currency increase for the oilexporting nations, creating a currency devaluation of oil-importing countries. The exchange rate influence on oil prices is likewise happening as a result of oil prices are generally designated in USD. The decrease of one rate indicates that the USD increase lessens the demand for oil beyond the USA (Blomberg & Harris, 1995). Additionally, the USD increase may create growth in oil supply, causing a reduction in oil prices at the global level (Coudert et al., 2007).
We found many results from empirical studies that indicate the existence of a relationship between the exchange rate of the USA dollar and oil as follows. Ferraro et al. (2015) show evidence to establish the presence of a short-term connection between the nominal Canadian-USA exchange rate and simultaneous oil prices. The findings indicate that oil prices can forecast the exchange rate at a daily rate. While Ding and Vo (2012), Fratzscher et al. (2014) and Wu et al. (2012) observed a bidirectional connection between the USD and oil prices. Likewise, Aloui et al. (2013) noticed that the decrease in USD is related to crude oil price growth, especially during the global financial crisis. Cifarelli and Paladino (2010) and Jiang and Gu (2016) also document a negative association between the volatility of real oil prices and the real USD exchange rate in the long run.
Other studies found an effect of oil on exchange rates as follows: Wen et al. (2018) suggest a nonlinear Granger-cause of the USD exchange rate and crude oil prices, but not vice versa. Turhan et al. (2013) use daily data to investigate the role of oil prices in describing the underlying forces of the exchange rate in developing countries. Turhan et al. (2013) show that an increase in oil prices leads to a considerable increase in currencies versus the USD. Likewise, Lizardo and Mollick (2010) utilized a cointegration test and discovered that oil prices impact substantially in justifying long-term USD movements.
Alternatively, further studies have discovered an influence of the USD exchange rate on oil prices. Mo et al. (2018) examine and show the dynamic negative linkages between the US dollar and the crude oil market, however, after the global financial crisis they see a positive non-linear correlation from USD to crude oil. In the same line, Houcine et al. (2020) examine and found a co-integration connection between the price of crude oil in USD per barrel, and the Euro-Dollar exchange rate using Auto-Regressive Distributed Lag (ARDL). Granger causality test result reveals a one-way correlation between the Euro-Dollar exchange rate towards oil prices; specifically, the change in the exchange rate leads to fluctuations in oil prices. Sadorsky (2000) suggests that futures prices for crude oil and oil are related to exchange rates. Akram (2009) indicates that a lower USD causes greater commodity prices. Shocks also to the dollar are observed to represent significant shares of variations in commodity prices. Zhang et al. (2008) show that there is a substantial long-term equilibrium cointegration connection between the US dollar exchange rate and international crude oil prices. Wen et al. (2018) suggest that the USD exchange rate offers a greater and more stable negative impact on crude oil prices in the short term, and the effect steadily declines after 2012. Similarly, Yousefi and Wirjanto (2004) and Lin et al. (2016) show similar results.
Based on the above argument and results, we find that there is a potential relationship between the USD and oil prices (Aloui et al., 2013;Cifarelli & Paladino, 2010;Ding & Vo, 2012;Ferraro et al., 2015;Fratzscher et al., 2014;Jiang & Gu, 2016;Wu et al., 2012), and there is evidence that oil affects the USD (Lizardo & Mollick, 2010;Turhan et al., 2013;Wen et al., 2018) and vice versa (Akram, 2009;Houcine et al., 2020;Lin et al., 2016;Mo et al., 2018;Wen et al., 2018;Yousefi & Wirjanto, 2004). Thus, we use three models named: Support Vector Machine (SVM), General Regression Neural Networks (GRNN) and Multilayer Perceptron Networks (MLP) to study the impact of cryptocurrencies and the US dollar on oil prices before and during the COVID-19 pandemic, during the up and down market trends, and their ability to predict oil prices and determine the importance of each of them in influencing oil. Thus, we hypothesize that: H2 Machine learning models can enhance the predictability of the US dollar on oil prices pre and during the COVID-19 outbreak.

Experimental data
The dataset came from TradingView. 2 The data is the daily closing of West Texas Intermediate CFDs (USOIL). CFDs were used as they are traded 24 h a day and 5 days a week, including during the close of the main markets to reflect fresh COVID-19 announced data, which is used in the baseline analysis. While, daily closing of Brent crude oil CFDs was used in a robustness check and the daily closing of the US dollar index (DXY) and daily COVID-19 data worldwide including confirmed, death, and recovered cases. The data covers the period from January 1, 2018, to July 5, 2021. Data panels were divided based on USOIL and UKOIL price trends and the existence of the COVID-19 pandemic. According to technical analysis, prices move in an uptrend, downtrend or horizontal trend (Murphy, 1999). Figure 3 shows that there is a downtrend (in red area) in USOIL and Brent crude oil (UKOIL) prices at the beginning of COVID-19. Then prices changed to an uptrend (in green area) and there was no horizontal trend during this period. Consequently, the last uptrend and downtrend before We employ the most representative cryptocurrencies that are Bitcoin and Ethereum. Specifically, both cryptocurrencies have recorded the largest trading volumes and possess the highest market capitalizations (Kim et al., 2021). As of November 2021, Bitcoin has recorded a trading volume of USD 1240 billion (21,336,435 BTC) and a market capitalization of USD 1097 billion, and Ethereum has reached a trading volume of USD 546 billion (118,187,782 ETH) and a market capitalization of USD 547 billion. It is worth noting that Bitcoin and Ethereum control 62% of the cryptocurrency market, according to the data on the CoinMarketCap website. 3 Thus, Bitcoin and Ethereum were chosen to represent cryptocurrencies.

Methodology
In building our models, DTREG software is used. Three different machine learning modelling techniques are used, namely, Support Vector Machines (SVM); Multilayer Perceptron Neural Networks (MLP) and Generalized Regression Neural Networks (GRNN).

Support vector machines
Support vector machines (SVM) are a common category of supervised machine learning algorithms. They are a comparatively new modelling technique that showed potential at building accurate models for a variety of problems and are closely related to neural networks. SVM is predominantly good at pattern recognition, but it is also applicable to various types of modelling applications (DTREG, 2021). An SVM model which uses 'sigmoid kernel function' can be equivalent to a two-layers multilayer perceptron (also known as feed-forward) neural network or 'radial basis function'. It can be used for both classification and regression modelling problems. Furthermore, it performs the model by constructing an N-dimensional 'hyperplane' that optimally splits data into two (i.e., binary dependent variable) or more (continuous dependent variable). SVM uses quadratic programming problems with linear constraints to solve the wight of the network.
In an SVM network 'a predictor variable is called an attribute, and a transformed attribute that is used to define the hyperplane is called a feature' (DTREG, 2021, p. 289). Then 'feature selection' is taken place where the most appropriate representation of data is chosen. Each set of 'features' describes one raw of predictor values and is called a 'vector'. Therefore, SVM modelling works in a way to find the optimal 'hyperplane' that separates clusters of 'vectors'. Those vectors which are near the hyperplane are called 'support vectors'. In this paper, we use the 'radial basis function' as the recommended kernel function in building our SVM models (DTREG, 2021).

Multi-Layer perceptron neural network
Multilayer Perceptron Neural Networks (MLP) also known as Multilayer Feed-forward Neural Networks were initially developed by Frank Rosenblatt (1958) and are more suitable to be used to describe complex relationships between independent predictor variables (Abdou, et al., 2019). Figure 4 presents an example of an MLP architecture.

Generalised regression neural networks
Generalised Regression Neural Network (GRNN) is a network with similar architecture to a Probabilistic Neural network but with the essential difference that GRNN runs regression with a continuous dependent variable. Both Networks are theoretically like k-Nearest Neighbour known as k-NN but with completely different applications. Furthermore, Abdou et al., (2012Abdou et al., ( , 2021 explained that GRNN does not require various stationarity tests that regression family models would require. Figure 5 presents an example of a GRNN architecture.

The predictability power of cryptocurrencies, the US dollar and COVID-19 on oil prices.
Oil price prediction has been made for four different scenarios. Two of those scenarios are the downtrend and uptrend periods before the COVID-19 outbreak. The remaining scenarios are the downtrend and uptrend during the COVID-19 outbreak.

Scenario 1: Results during downtrend before COVID-19 outbreak
When we run the model during the downtrend before covid-19, there is an agreement between SVM, MLP and GRNN models on the results of measuring the predictability power of cryptocurrencies and the US dollar (DXY) on West Texas Intermediate (USOIL). Tables 1, In this network, the number of nodes in the 2nd hidden layer is larger than the number of nodes in the 1st hidden layer. The output at a given layer (e.g., the 2nd hidden layer) can be expressed as a connectionweighted summation of outputs from the previous layer (e.g., 1st hidden layer) plus a neuron bias (a parameter assigned to each neuron). Arriving at a neuron in the output layer, the value from each hidden layer neuron is multiplied by a weight, and the resulting weighted values are added together. Finally, Y values are produced by a conversion function for the output layer (Abdou et al., 2019, p. 5;Abdou, 2009, p.101;modified) 2, 3 and 4 and Fig. 6 suggest that Bitcoin is the major influence on USOIL prices. There is also an agreement between SVM and MLP models that Ethereum ranks second and the US dollar index (DXY) in third place. However, GRNN model results were the opposite, as the US dollar index comes second and Ethereum in third place.

Scenario 2: Results during downtrend during COVID-19 outbreak
First, when we run the baseline model during the downtrend without adding covid-19 variables, there is an agreement between SVM, MLP and GRNN models on the results of measuring the predictability power of cryptocurrencies and DXY on USOIL. Tables 1, 2, 3 and 4 and Fig. 6 suggest that Bitcoin is the major influence on USOIL prices. Ethereum ranked second, then DXY. Second, we run the model during a downtrend during COVID-19 after adding covid-19 variables (total confirmed, death and recovered cases). From Tables 1,2,3 and 4 and Fig. 7, we find that there is an agreement between SVM and MLP models that Bitcoin is the biggest The 1st layer i.e., input layer comprises a neuron for each independent predictor variable in the model. Each node in the 2nd layer i.e., pattern layer, which contains one node for each training case, measures the distance between each of the input values and the training values reintroduced by each of the nodes. Then, each of these values pass to each of the nodes in the 3rd layer i.e., summation layer (Numerator & denominator nodes), which is a function of the distance in the smoothing factors. One node per dependant predictor variable is in the 3rd layer, each node computes a weighted average using the training cases in that category. In the 3rd layer i.e., summation layer, the nodes sum its inputs, whilst the output node divide then to generate the best possible predictions (Abdou, et al., 2021, p. 6285;Abdou, et al., 2012, p. 800) influence on the price of USOIL, and second are confirmed cases. In third place, the results of SVM refer to recovered cases, while the results of MLP refer to Ethereum. In fourth place, SVM and MLP coincided in the death cases and in the fifth rank, SVM referred to Ethereum, while MLP referred to recovered cases. Then SVM and MLP coincided in the last order of DXY. The results of GRNN were as follows: confirmed cases have the greatest influence, followed by death cases in the second place, and the third place was for cases of recovery, then the dollar in the fourth place, followed by Bitcoin and then Ethereum.
Third, we run the model during a downtrend during COVID-19 after adding COVID-19 variables (total confirmed, death recovered, new confirmed, new death and new recovered cases). From Tables 1, 2, 3 and 4 and Fig. 8, death cases were the greatest influence according to MLP and GRNN, while recovered cases were the greatest influence according to SVM. The second influence in the order was confirmed cases according to SVM, Bitcoin according to MLP and recovered cases according to GRNN. The third rank was new deaths according to SVM, confirmed cases according to MLP and Ethereum according to GRNN. The fourth rank was death cases according to SVM, recovered cases according to MLP, and DXY according to GRNN. New confirmed cases ranked fifth based on SVM, Ethereum based on MLP, and new recovered cases based on GRNN. Bitcoin ranked sixth based on SVM, new death cases

Scenario 3: Results during uptrend before COVID-19 outbreak
When we run the model during the uptrend before COVID-19, there is an agreement between SVM, MLP and GRNN models on the results of measuring the predictability of cryptocurrencies and DXY on USOIL. From Tables 1, 2, 3 and 4 and Fig. 6, it is clear that Bitcoin is the major influence on USOIL prices, Ethereum ranked second, then DXY.

Scenario 4: Results during uptrend during COVID-19 outbreak
First, when we run the baseline model during an uptrend during covid-19 without adding COVID-19 variables, there is an agreement between SVM, MLP and GRNN models on the results of measuring the predictability of cryptocurrencies and DXY on USOIL. From Tables 1, 2, 3 and Fig. 6, it is clear that Ethereum is the major influence on USOIL prices, Bitcoin ranked second, then DXY ranked third. We note that there has been an exchange of roles between Bitcoin and Ethereum compared to what happened in the uptrend before COVID-19. Second, we run the model during an uptrend during COVID-19 after adding COVID-19 variables (total confirmed, death and recovered cases). From Tables 1 and 2 and Fig. 7, we found that there is an agreement among the three models that the greatest influence is death cases, followed by confirmed cases according to MLP and GRNN and recovery cases according to SVM. Then the recovered cases come in third place according to MLP and GRNN and the confirmed cases according to SVM, then Bitcoin in fourth place according to SVM and MLP and DXY according to GRNN. Then the three models agree that Ethereum comes in fifth place and in the end, the least impact is DXY according to SVM and MLP and Bitcoin according to GRNN.
Third, we run the model during an uptrend during COVID-19 after adding covid-19 variables (total confirmed, death recovered, new confirmed, new death and new recovered cases). From Tables 1, 2, 3 and 4 and Fig. 8, death cases were the greatest influence according to SVM and MLP, while DXY were the greatest influence according to GRNN. The second influence in the order was Bitcoin according to SVM, confirmed cases according to MLP and new recovered cases according to GRNN. The third rank was confirmed cases according to SVM, Bitcoin according to MLP and new confirmed cases according to GRNN. The fourth rank was recovered cases according to SVM, and new death cases according to MLP and GRNN. Ethereum ranked fifth based on SVM, DXY based on MLP, and recovered cases based on GRNN. DXY ranked sixth based on SVM, Ethereum based on MLP, and Bitcoin-based on GRNN. New confirmed cases ranked seventh based on SVM and MLP, and Ethereum based on GRNN. New death cases ranked eighth based on SVM, recovered cases based on MLP, and death cases based on GRNN. New recovered cases ranked last according to SVM and MLP and confirmed cases according to GRNN.

Scenarios discussion
First, changes in the impact of Bitcoin, Ethereum and DXY during the downtrend before and during COVID-19 are presented in Fig. 9. We observe in Fig. 9 A, B, C that the predictability of Bitcoin did not change according to our three models. While the predictability of Ethereum decreased according to SVM and MLP and increased according to GRNN. The predictability of DXY decreased according to MLP and GRNN and increased according to SVM. Second, changes in the predictability of Bitcoin, Ethereum and DXY during the uptrend before and during COVID-19 are presented in Fig. 9. We observe in Fig. 9 D, E, F that the predictability of Bitcoin did not change according to GRNN and decreased according to SVM and MLP. The predictability of Ethereum and DXY increased according to all our models.
Third, changes in the impact of Bitcoin, Ethereum, DXY and COVID-19 variables (total confirmed, death and recovered cases) during downtrend and uptrend during COVID-19 are presented in Fig. 9. We observe in Fig. 9 G, H, I that the effect of Bitcoin decreased according to the three models, while the effect of Ethereum increased according to SVM but decreased according to MLP and GRNN. DXY effect increased according to SVM and GRNN but decreased according to MLP, confirmed cases effect decreased according to MLP but increased according to SVM, death cases effect increased according to the three models, recovered cases effect increased according to SVM and MLP but decreased according to GRNN. Fourth, changes in the impact of Bitcoin, Ethereum, DXY and COVID-19 variables (total confirmed, death recovered, new confirmed, new death and new recovered cases) during down and uptrend during COVID-19. We observe in Fig. 9 J, K, L that the effect of Bitcoin decreased according to SVM and MLP but increased according to GRNN. The effect of Ethereum decreased according to the three models, while the effect of Ethereum increased according to MLP and GRNN but decreased according to SVM. Confirmed cases effect decreased according to the three models, death cases effect decreased according to SVM and GRNN but did not change according to MLP. The recovered cases effect decreased according to the three models, the new confirmed cases effect increased according to MLP and GRNN but decreased according to SVM, new death effect increased according to MLP and GRNN but decreased according to SVM. New recovered cases effect decreased according to SVM and MLP but increased according to GRNN.
Our results can be explained by previous literature that explored the relationship between cryptocurrencies, the US dollar, and oil prices. Musialkowska et al. (2020) conclude that Bitcoin can be considered a weak safe haven. Also, a number of studies (Al-Yahyaee et al., 2019;Charfeddine et al., 2020;Dutta et al., 2020) concluded that cryptocurrencies can be used as a diversifier. In the same line, a strand of research (Al-Yahyaee et al., 2019;Bouri et al., 2017a, b;Das et al., 2020;Dyhrberg, 2016;Guesmi et al., 2019;Selmi et al., 2018) concluded that cryptocurrency can be used in hedging, Therefore, it can be concluded that the reason for the strong predictability of Bitcoin and Ethereum during COVID-19 during the downtrend is due to the fact that individual investors, mutual funds and hedge funds have used cryptocurrencies in hedge, diversification and as a safe haven under conditions of uncertainty during this period. Our results differ from Ji et al. (2019), as they concluded that energy commodities such as oil depend on the dynamics of cryptocurrencies. We have studied the impact of cryptocurrencies and the US dollar as a traditional currency using neural network models to identify the importance of Bitcoin, Ethereum and the dollar, which was presented above. Our results support extant literature (Aloui et al., 2013;Cifarelli & Paladino, 2010;Ferraro et al., 2015;Fratzscher et al., 2014;Jiang & Gu, 2016), as they concluded that there is a relationship between oil prices and the US dollar or exchange rates in which the US dollar is directly or indirectly part, but our results showed the strength of the impact of the US dollar on oil compared to cryptocurrencies before and during the COVID-19 during the uptrend and downtrend.

Prediction error before and during COVID-19
This section aims to measure forecast error using five metrics, such as Normalized Mean Square Error (NMSE), Root Mean Squared Error (RMSE), Mean Squared Error (MSE), Mean Absolute Error (MAE) and Mean Absolute Percentage Error (MAPE). This helps identify the best prediction model before and during COVID-19 and during the uptrend and downtrend, which will guide policy and decision-makers to the best prediction model when predicting the price of oil under normal conditions and during periods of uncertainty.
First, we measure USOIL prediction error before COVID-19 during the uptrend and downtrend. From Tables 1, 2, 3 and 4 and Fig. 10, we found that the best model to predict USOIL price before COVID-19 during the downtrend is SVM, since its prediction error is less than MLP and GRNN, and the best model to forecast before COVID-19 during the uptrend is GRNN because its prediction error is less than SVM and MLP. Second, we measure USOIL prediction error during COVID-19 during uptrend and downtrend after adding COVID-19 variables (total confirmed, death and recovered cases). From Tables 1, 2, 3 and 4 and Fig. 11, we found that the best prediction model during the uptrend and downtrend is GRNN because the prediction error is less than SVM and MLP prediction error. Thus, we recommend using GRNN when predicting the price of USOIL during periods of uncertainty similar to COVID-19 whether the market trend is optimistic or downtrend.
Third, we calculate USOIL prediction error during COVID-19 during uptrend and downtrend after adding COVID-19 variables (total confirmed, death recovered, new confirmed, new death and new recovered cases). From Tables 1, 2, 3 and 4 and Fig. 12. We found that the best model to predict USOIL price during COVID-19 during the downtrend is GRNN, since its prediction error is less than SVM and MLP, and the best model to forecast during COVID-19 during the uptrend is SVM because its prediction error is less than MLP and GRNN.
We observe from the second and third that the best model to forecast the downtrend during COVID-19 with the use of the uncertainty source data as a total in addition to the change in it is GRNN. As for the best model during the uptrend during COVID-19, if we use the data from the source of uncertainty as a total is GRNN, but if we use the data as a total. In addition to changing it, the best model will become SVM, and this is what we advise the policy and decision-makers when forecasting the price of USOIL during periods of uncertainty.

The role of COVID-19 variables in improving the ability of models to predict the downtrend during the COVID-19
Tables 1, 2, 3 and 4 and Fig. 13 present our results when we run the baseline model during a downtrend without adding covid-19 variables. The prediction error shown in Fig. 13 A was greater than the prediction error when we run the model during a downtrend during COVID-19 after adding COVID-19 variables (total confirmed, death and recovered cases) as shown in Fig. 13 B which was greater than the prediction error when we run the model during downtrend during COVID-19 after adding covid-19 variables (new confirmed, new death and new recovered cases) as shown in Fig. 13 C. Therefore, we recommend, during periods of uncertainty, to use the source of uncertainty data as a total, in addition to the new Fig. 13 The role of COVID-19 variables in improving the ability of models to predict the downtrend during COVID-19. Variables are defined in Appendix 1 change in it, as this will improve the ability of the models used to predict the price of USOIL by reducing the prediction error.

Robustness analysis
To ensure the accuracy of our results, we performed the analysis using Brent crude oil (UKOIL) instead of USOIL, and the results were very similar, as shown in Tables 5, 6, 7 and 8.

Summary and conclusion
The global COVID-19 pandemic has created massive losses and instabilities in global markets (Gradojevic & Kukolj, 2022;Kapoor et al., 2021), especially in oil markets. Thus, building an accurate model to predict oil prices during the bear and bull oil market can offer investors and policymakers the knowledge to take correct decisions in escaping crashes. Our study contributes to the current research by proposing advanced machine learning models to explore the role of cryptocurrencies and the US dollar in predicting oil prices pre and during the COVID-19 pandemic. In this paper, the effect of COVID-19 and two leading cryptocurrencies on the efficiency of predicting oil prices is analyzed via the application of three neural network models (i.e., SVM, MLP and GRNN) over a long period from January 1, 2018, to July 5, 2021, to decrease the bias and the misspecification errors produced by the parametric models.
Our results indicate that Bitcoin is the most influential in predicting oil prices during the bear and bull oil market before COVID-19 and during the downtrend during COVID-19. Ethereum has become the most influential during the bull oil market during COVID-19. The reason for this may be due to Tesla cancelling dealing in Bitcoin and the statement of its chairman that the reason for this is the use of fossil fuels in mining. In addition, Bitcoin has been banned in China during this period. After adding COVID-19 variables to our model, we found that they became more important than Ethereum and the US dollar index during the downtrend, and Bitcoin continued to be the most influential according to SVM and MLP, while COVID-19 variables became the most influential during the uptrend, and the most influential variable was death cases according to the three models. Our results also suggest that the most accurate model to predict the price of oil under the conditions of uncertainty that prevailed in the world during the downtrend during COVID-19 is GRNN and during the uptrend also if the COVID-19 data is used as a total case alone, but if we add the new cases, the most accurate model is SVM. Though the best prediction model under normal conditions before COVID-19 during an uptrend is SVM and during a downtrend is GRNN. Likewise, our results demonstrate that COVID-19 variables are a very rich source of information for predicting the volatility of oil prices, and the inclusion of COVID-19 variables in our models showed consistent outperformance. Consequently, governments may consider the role of COVID-19 variables in formulating policy procedures to attenuate the turmoil and uncertainty of the crude oil markets.
Our results have several policy implications for investors, policymakers and regulators. Policymakers and investors should consider the market condition when predicting oil prices (bull market vs. bear market). This is more predominant during major uncertainties and outbreaks such as COVID-19. Second, our results confirm the role of cryptocurrencies in predicting oil prices during bear and bull oil market conditions. This result may assist investors  and policymakers construct more accurate prediction models based on different market states. Third, our results during extreme conditions (bear and bull) suggest a high-value prospect for investors to mix cryptocurrencies and crude oil prices for portfolio hedging and trading strategies during the COVID-19 outbreak. Finally, future research may include more predictive macroeconomic variables to reduce prediction errors. Also, future research may explore the applicability of this study to other markets, such as stock and gold markets.
Data Availability Statement Data available on request from the authors.

Conflict of interest
The authors declared no potential conflicts of interest.
Ethical approval This article does not contain any studies with human participants or animals performed by any of the authors.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.