key: cord-0899566-j351r1pd authors: Abedin, Mohammad Zoynul; Moon, Mahmudul Hasan; Hassan, M. Kabir; Hajek, Petr title: Deep learning-based exchange rate prediction during the COVID-19 pandemic date: 2021-11-26 journal: Ann Oper Res DOI: 10.1007/s10479-021-04420-6 sha: d918f3546e1376396aed55d1f1b503cccbc55fcd doc_id: 899566 cord_uid: j351r1pd This study proposes an ensemble deep learning approach that integrates Bagging Ridge (BR) regression with Bi-directional Long Short-Term Memory (Bi-LSTM) neural networks used as base regressors to become a Bi-LSTM BR approach. Bi-LSTM BR was used to predict the exchange rates of 21 currencies against the USD during the pre-COVID-19 and COVID-19 periods. To demonstrate the effectiveness of our proposed model, we compared the prediction performance with several more traditional machine learning algorithms, such as the regression tree, support vector regression, and random forest regression, and deep learning-based algorithms such as LSTM and Bi-LSTM. Our proposed ensemble deep learning approach outperformed the compared models in forecasting exchange rates in terms of prediction error. However, the performance of the model significantly varied during non-COVID-19 and COVID-19 periods across currencies, indicating the essential role of prediction models in periods of highly volatile foreign currency markets. By providing an improved prediction performance and identifying the most seriously affected currencies, this study is beneficial for foreign exchange traders and other stakeholders in that it offers opportunities for potential trading profitability and for reducing the impact of increased currency risk during the pandemic. The COVID-19 pandemic has thrown the world into economic chaos. It is the worst turmoil experienced since 1930 (IMF, 2021) . On the one hand, the International Monetary Fung (IMF) estimated a decline in global growth of − 3.2% in 2020, with advanced (emerging market) economies experiencing a negative growth of 4.6% (2.1%) (IMF, 2021) . On the other hand, the global economy is projected to grow 6.0% in and 4.9% in 2022 (IMF, 2021 . Global financial markets experienced steep declines during the pandemic. For example, the Dow Jones Industrial Average (DJIA) had dropped by 33% on March 20, 2020, from its value on December 31, 2019, when the World Health Organisation (WHO) reported the first confirmed case of the coronavirus in Wuhan, China (World Economic Forum, 2020) . Also, the DJIA experienced its third and sixth largest daily drops on March 16 and March 12, 2020, respectively (World Economic Forum, 2020) . Other leading indices, such as the Financial Times Stock Exchange 100 (FTSE 100) in the United Kingdom and the Nikkei 225 in Japan, also experienced large declines (Bloomberg, 2020; The Guardian, 2020) . Financial crises such as the Global Financial Crisis of 2007-2008, and crisis induced by the COVID-19 pandemic have effects on both commodity and financial markets, which spill over into returns and volatility (Cheng, 2020; Corbet et al., 2020) , portfolio allocations (Yoshino et al., 2021) , efficiency in foreign exchange markets (Aslam et al., 2020; Narayan, 2020) , and oil prices (Salisu et al. 2020a, b) . Since the beginning of the COVID-19 crisis, the foreign exchange market has experienced unprecedented volatility (Aslam et al., 2020) . The foreign exchange market is the largest financial market in average trading volume (Bank for International Settlements, 2019). Hence, it is critical for portfolio investors, regulators, and policymakers to understand the volatility in foreign exchange rates. Central banks across the world have attempted to manage the stability of their foreign exchange markets in a bid to withstand the COVID-19 pandemic (The Reserve Bank of Australia, 2020). Several studies have examined the impact of COVID-19 on the foreign exchange market (e.g., Aslam et al., 2020; Hofmann et al., 2020; Umar & Gubareva, 2020) . These studies applied traditional regression techniques to investigate the volatility of foreign exchange markets. However, these studies failed to consider the predictability of exchange rates during COVID-19 and non-COVID-19 periods. Our study attempts to apply the best machine learning and deep learning algorithms to predict the foreign currency exchange rates during the COVID-19 pandemic and compare them with the rates during the normal non-COVID-19 period. It is important to predict the exchange rate accurately because it helps policymakers and businesspeople to improve the quality and quantity of appropriate management decisions and plan their finances more precisely. Different methods are used to predict the foreign currency exchange rate (Mahmoud & Hosseini, 1994; Maya & Gómez, 2008; Rambaldi et al., 2015; Windsor & Thyagaraja, 2001) ; most of them have been based on statistical analysis. This study applies deep learning approaches to predict the exchange rates of 21 currencies against USD. We use the Long Short-Term Memory (LSTM) approach, a recurrent neural network algorithm that is one of the most promising current approaches in the field of deep learning. LSTM performs particularly well in analysing time-series data. One of the limitations of neural networks other than LSTM is that there is no memory associated with them, and this causes a major problem for time-series data. LSTM overcomes this issue by creating both a short-term and a long-term memory component. However, a traditional recurrent neural network (RNN) such as LSTM cannot handle the data when the input and output are of different sizes. Bi-directional LSTM (Bi-LSTM) overcomes this problem by considering both previous and future data patterns. This in turn leads to effective learning of long-term dependencies in the time-series data. For comparative purposes, this study also uses support vector regression (SVR) and random forest (RF) regression. The main advantages of SVR are that the computation does not depend on dimensionality and that it has an excellent generalisation capability with a high prediction accuracy. As a result, SVR works well for large datasets and can handle a large number of input variables without deletion. The most significant advantage of RF is its versatility. In fact, ensemble methods have been neglected in the existing literature on foreign currency market predictions even though ensemble methods are very powerful in reducing the variance inherently present in complex and volatile financial markets (Carta et al., 2021) . Therefore, we propose to use an ensemble deep learning approach, Bi-LSTM BR, by combining Bi-LSTM, a state-of-the-art deep learning-based model, with Bagging Ridge (BR) regression. This study shows that the proposed ensemble deep learning approach provides a robust prediction performance, performing well for different clusters of time-series data in our study. Our study analyses the prediction performance by clustering data based on the waves of confirmed COVID-19 cases and on the timing of fiscal and monetary policies meant to combat the economic consequences of the COVID-19 pandemic. Four clusters are categorized based on the waves of confirmed COVID-19 cases in the United States, and three clusters are based on the U.S. government's monetary and fiscal policy given that the United States was the country most affected by the pandemic and that the USD has been used for each pair of currency. All algorithms are applied for each dataset, the prediction performances are taken separately, and the accuracy curve is generated. In predicting the foreign currency exchange rate, we measured the performance of the algorithms using the root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE) . Results demonstrate that our proposed ensemble deep learning approach performed well in predicting the exchange rate during the non-COVID-19 and COVID-19 periods. The rest of the paper is organized as follows. Section 2 briefly reviews existing research work on predicting the foreign exchange market and the impact of COVID-19 on this market. Section 3 presents our experimental design and the data used for experiments. Section 4 outlines the proposed Bi-LSTM BR hybrid model and the used research methodology. Section 5 presents the experimental analysis, and Sect. 6 checks the robustness of the proposed model. The results are discussed in Sect. 7 and the conclusions about them in Sect. 8. This section reviews previous studies on predicting the forex exchange market and provides the theoretical justification for investigating the impact of COVID-19 on the predictability of foreign exchange markets. Nonlinear time series models used for predicting the forex exchange market include two categories of models, namely (1) traditional statistical parametric models (Mahmoud & Hosseini, 1994; Windsor & Thyagaraja, 2001; Rambaldi et al., 2005) and (2) advanced machine learning methods. Model specification is required for the former category of models, and it limits their accuracy because many nonlinear time-series patterns cannot be captured. Because advanced machine learning methods, such as support vector machine (SVM) and neural networks (NNs) outperformed the traditional parametric models in recent studies, we present these approaches in Table 1 . Among the advanced machine learning methods, SVM and extreme learning machines were particularly effective when handling multidimensional time-series data obtained by using technical indicators for preprocessing. However, these machine learning methods were proven ineffective when handling large and noisy data (Munkhdalai et al., 2019) . In contrast, LSTM-based models were highly effective due to their capacity to capture high-level temporal features from the foreign exchange time-series data (Ahmed et al., 2020; Rundo, 2019; Yıldırım et al., 2021) . The main limitation of existing approaches is that only single LSTMs were used without considering both previous and future data patterns, something that is needed to effectively learn long-term dependencies in the data. Moreover, ensemble methods have been overlooked even though the variance was substantially reduced and a more robust performance was achieved by combining multiple base LSTM models in a related stock market prediction problem (Borovkova & Tsiamas, 2019) . Several studies revealed a significant impact of COVID-19 on the volatility of foreign exchange markets. Hofmann et al. (2020) showed that borrowing through local currency bonds did not protect emerging market economies from the financial shock triggered by COVID-19, because the local currency bond spreads rose sharply. As a result, portfolio investors faced amplified losses. A high coherence was also found between the Coronavirus Panic Index and foreign exchange markets, indicating that new cross-currency hedges should be introduced to withstand the adverse effects of global economic turmoil (Umar & Gubareva, 2020) . A decline in forex market efficiency during the COVID-19 outbreak was observed by Aslam et al. (2020) . These findings inspired us to explore the prediction capacity of deep learning-based models during COVID-19 and non-COVID-19 periods, and that is the main contribution of this study. The dataset came from Kaggle and Oanda. 1 We used 21 currency exchange rates against USD. The data during COVID-19 came from Oanda and were divided into several clusters. The dataset description is provided in Table 2 . Data clusters were divided based on the number of confirmed cases in the United States and the timeline of events related to the COVID-19 pandemic. The experimental datasets were divided into training and testing sets. The training-to-testing ratio was 80:20. The amount of data for the pre-COVID-19 time period Statistical models, machine learning, and deep learning models have been used in the literature to predict financial asset prices Akyildirim et al., 2021; Cui et al., 2020; Fischer & Krauss, 2018; Guotai et al., 2017; Jiang et al., 2020; Kyriakou et al., 2021; Shajalal et al., 2021; Xia et al., 2020) . We apply machine learning and deep learning algorithms to measure different types of errors and find the best model for the dataset to measure the prediction accuracy for each currency against USD. Different algorithms have been used to select the best method to calculate the prediction error of exchange rate movements of the selected currencies. We applied some regression algorithms, namely the regression tree (RT), SVR, RF, BR, LSTM, Bi-LSTM, and Bi-LSTM BR, to estimate the prediction accuracy. 2,3 Using a decision tree is a common practical approach for supervised learning (Chen, 2011; Delen et al., 2013) . It is used for both classification and regression estimations. The decision tree is a tree-structured classifier that consists of three types of nodes, namely, the root node, interior node, and leaf node. The root node is the initial node that represents the whole sample. The interior nodes represent the characteristics of a data set. Lastly, the root nodes provide the outcome. For a particular data point, the decision tree is run by answering true/false questions until they reach the leaf node. The final prediction is calculated by finding the average value of a dependent variable in a specific leaf node. In this way, the tree can predict a proper value for the data point through several iterations (Fig. 1) . The decision tree is advantageous because it is simple to understand and requires less data cleaning. Like ridge and lasso regression, decision tree regression may have overfitting problems. An ensemble of decision trees (e.g., the RF algorithm) can overcome these problems. Support vector regression (SVR) is the most used and highest-performance algorithm in today's world (Balabin & Lomakina, 2011; Gazzola & Jeong, 2021) . This is a supervised machine learning algorithm used for classification and regression purposes (Weston et al., 1997) . This study applies three different kernels, linear, polynomial, and radial basis function (RBF), while training the SVR classifier. SVR makes a decision boundary based on the (Hsu & Lin, 2002) . Random forest is an ensemble algorithm that builds a set of independent and non-identical decision trees following the idea of randomisation (Provost et al., 2016) . This algorithm is used for both classification and regression purposes, and it is a combination of tree predictors. Each decision tree employs a random vector as a parameter randomly chooses the attributes of samples, and it then finally chooses the sample subset as the training dataset (Bradter et al., 2013) . The generalisation error of a forest of trees depends on the forest's individual trees' strength and correlation. However, deep decision trees might suffer from overfitting (Bramer, 2007) . RF prevents overfitting by generating random subsets of attributes and constructing trees using these subsets (Breiman, 2001) . LSTM is a recurrent neural network algorithm in the deep learning model (Alhagry et al., 2017; Hochreiter & Schmidhuber, 1997) . Initially, LSTM aims to capture the long-term dependency and determine the optimal lag order in the time-series analysis. We have applied LSTM neural networks to predict exchange rates (Sun et al., 2020) . The hidden state s t is determined as below: where f is an activation function, x t are inputs, U is the hidden layers' weight, V is the weights of output layers, and W is the transition weights of the hidden state. LSTM is an effective way to overcome the problem of a vanishing gradient by using the memory cells. The input gate, the forget gate, the output gate and the self-recurrent neuron are central units in a memory cell. The values of the input gate i t and the memory cell's candidate stateC t are estimated as below: (2) where x t is the memory cells inputs; and h t is the memory cell's value. The cell state vector C t and the value of the forget gate f t are estimated as follows: where o t and h t are the values of the output gate and the memory cell, respectively. Finally, the hidden state h t and the value of the output gate o t are estimated as below: The LSTM network consists of the delays and the hidden layers' sizes obtained from the time-series data by applying training data. A Bi-LSTM deep learning-based recurrent neural network ( Fig. 2 ) works efficiently to analyze any time-series data better than traditional statistical time-series models, such as the Bi-directional long short-term memory (Bi-LSTM) model autoregressive moving average (ARIMA), seasonal ARIMA, and ARIMAX models, because of its bidirectional nature of input patterns (Sezer et al., 2020; Sunny et al., 2020) . While LSTM works only with previous data patterns, the Bi-LSTM model considers both previous and future data during training, and this makes the Bi-LSTM model more effective than LSTM. This behavior of Bi-LSTM helps learn the present status of data both from past data and future data through its forward layer and backward layer. It can capture not only local features but also extract global features in the time-series data. In the Bi-LSTM layer, there are no hidden-to-hidden connections between forward and backward layers. This helps one to understand information from both the backward layer and forward layer in each Bi-LSTM unit. A bagging regressor is an ensemble procedure that can take any regression task and predict the target values more accurately by combining multiple simple regression models while reducing their overall variance. In this paper, we combined ridge regression with a bagging regressor to predict exchange rates in order to improve prediction performance. The primary purpose of bagging ridge regression is to increase the stability of the final model and reduce the error in testing data. The important aspect of BR for this study is that it performs well in cases where the size of the data is limited. Specifically, to understand the behaviour of prediction models before and during the COVID-19 pandemic, we divided the dataset into many subsets, and this ensemble regressor showed higher accuracy than the base ridge regression model. Bi-LSTM BR is an ensemble algorithm that combines Bi-LSTM and BR. There are many approaches to constructing an ensemble algorithm. We applied the averaging approach of ensemble formation (Ribeiro et al., 2020) . We generated an additional training dataset by applying the repetitions procedure (Hennig et al., 2021) . Our study combined the results of BR and Bi-LSTM to form a novel Bi-LSTM BR regression model, as depicted in Fig. 3 . We measured and compared the performance of the different algorithms mentioned above by computing the root mean squared error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE). RMSE is a standard metric for computing a numerical prediction error by squaring each data forecast, hence putting more weight on larger errors. This is a desirable feature in evaluating prediction performance in foreign exchange markets (Islam & Hossain, 2020) . RMSE is calculated as: where R i is the actual value, R t is the forecasted value, and N is the number of forecasts. MAE and MAPE are other standard evaluation metrics used in currency exchange rate prediction (Dash, 2018) : 5 Experimental analysis We have divided the data into two clusters: before the COVID-19 pandemic and during the COVID-19 pandemic. The cluster during COVID-19 was divided into seven sub-clusters based on confirmed COVID-19 cases and events. The dataset during COVID-19 was divided into four sub-clusters based on confirmed cases in the United States and three sub-clusters based on the timing of efforts by the U.S. government to combat the COVID-19 pandemic. These three sub-clusters have been used to check the robustness of the accuracy of the deep learning ensemble approaches in our study. The pre-COVID-19 period is from January 3, 2000, to December 31, 2019. On December 31, 2019, the first confirmed case of the COVID-19 was reported in Wuhan, China, by the WHO. The first sub-cluster (C1) of the COVID-19 period is between January 31 and March 11, 2020, when the WHO declared that a global pandemic was occurring. The 7-day moving average of U.S. confirmed cases was approximately 40,000 for most of the second sub-cluster (C2), between March 12 and July 25, 2020. The third sub-cluster (C3), between July 26 and September 8, 2020, witnessed a negative trend of cases after sub-cluster 2. Finally, the fourth sub-cluster, between September 9 and December 14, 2020, experienced a large increase in daily confirmed cases, with the recording of 246,716 new cases on December 11, 2020. The first sub-cluster (E1) based on the timeline of events related to the COVID-19 pandemic was between December 31, 2019, and March 11, 2020, when the WHO declared that a COVID-19 global pandemic was occurring. During this period, the U.S. Congress was debating the passage of the Coronavirus Aid, Relief, and Economic Security (CARES) Act. The second sub-cluster (E2), between March 12 and June 8, 2020, was the period in which the U.S. Congress passed an economic relief package exceeding USD 2 trillion to boost the economy. The third sub-cluster (E3), between June 9 and December 14, 2020, is when the U.S. government adopted several monetary and fiscal policies. For example, the Federal Reserve launched the Primary Market Corporate Credit Facility on June 29, 2020, and on July 28, 2020, the Federal Reserve extended the operation of emergency lending programs. During the third sub-cluster, on December 11, 2020, the Food and Drug Administration approved the first emergency use of the COVID-19 vaccine offered by Pfizer Biontech. We applied all the algorithms to train the clusters separately, calculate the errors, test the significance level, and choose the best algorithm for the large datasets, as well as for the cluster datasets. Figure 4 provides the flowchart of the experiment. The cluster for a non-COVID-19 period extends from January 3, 2000 to January 30, 2020. We have trained the models using the dataset and created graphs. Figure 5 shows the predicted exchange rates versus the actual exchange rates of 21 currencies against USD. Because a Table 3 presents the RMSE of all algorithms. Table 3 shows that the best-suited algorithm varied from one currency to another during the non-COVID-19 period. For example, BR appeared to be the best model for predicting the AUD/USD exchange rate but Bi-LSTM was the best model for predicting the EUR/USD rate. Figure 6 shows the performance of algorithms based on RMSE. Table 3 shows that the Diebold Mariano (DM) test (see Diebold & Mariano, 2002) examined the accuracy of our proposed Bi-LSTM BR deep learning algorithm against the benchmark algorithms in our study for major currencies (e.g., AUD, CNY, GBP, and JPY). 5 The DM test results demonstrated that our proposed Bi-LSTM BR ensemble deep learning approach was effective in terms of its RMSE loss function against the benchmark algorithms in our study (Table 4 ). The first cluster of the COVID-19 period (C1) contains data from January 31 to March 11, 2020. The number of days in this sample is 41. Table 5 shows that the best-suited algorithm varied from one currency to another in the C1 data of the COVID-19 period. For example, Bi-LSTM BR appears to be the best model to predict the AUD/USD exchange rate, and Bi-LSTM is the best model for CNY/USD. Figure 7 shows that the predicted exchange rates are closely aligned with actual exchange rates, providing evidence that our proposed BR ensemble deep learning approach performed well in predicting the exchange rate during the COVID-19 period. 6 Figure 8 shows the performance results of algorithms based on RMSE. Table 6 shows the results of the DM test in examining the accuracy of our proposed Bi-LSTM BR deep learning algorithm against the benchmark algorithms. The DM test results demonstrate that our proposed approach had superior forecasting effectiveness in terms of RMSE against the compared methods. The second cluster of data during the COVID-19 pandemic (C2) extends from March 12 to July 25, 2020 (41 days in the sample). Table 7 shows that Bi-LSTM BR was a superior model for predicting the GBP/USD exchange rate, whereas Bi-LSTM was the best model for EUR/USD. Figure 9 provides evidence that our proposed Bi-LSTM BR approach was effective in predicting testing data during this COVID-19 period. Figure 10 confirms this good performance with regard to RMSE. Table 8 provides the results of the DM test in comparing the performance of our proposed Bi-LSTM BR deep learning model in terms of This table shows the test statistics of DM test in examining the accuracy of our proposed Bi-LSTM BR deep learning algorithm against the benchmark algorithms in our study for major currencies (AUD, CNY, GBP, and JPY). ***, **, and * represent the rejection of a null hypothesis that an existing algorithm's forecast accuracy is better than our proposed Bi-LSTM BR ensemble deep learning approach at P < 0.001, P < 0.05 and P < 0.1, respectively RMSE. These results show that significant improvements were achieved using the proposed model. The third cluster of COVID-19 data (C3) is for the period from July 26 to September 8, 2020, or 45 days. Table 9 shows that the best-performing algorithms varied from one currency to This table shows the test statistics of DM test in examining the accuracy of our proposed Bi-LSTM BR deep learning algorithm against the benchmark algorithms in our study for major currencies (AUD, CNY, GBP, and JPY). ***, **, and * represent the rejection of a null hypothesis that an existing algorithm's forecast accuracy is better than our proposed Bi-LSTM BR ensemble deep learning approach at P < 0.001, P < 0.05 and P < 0.1, respectively another in the C3 data for the COVID-19 period. For instance, Bi-LSTM BR outperformed other models in predicting GBP/USD, whereas Bi-LSTM was the best model for EUR/USD. Figures 11 and 12 provide additional evidence for the good predictive capacity of our proposed Bi-LSTM BR approach during this COVID-19 period. The results of the DM test in Table 10 confirm the superiority of the proposed prediction model. This table shows the test statistics of DM test in examining the accuracy of our proposed Bi-LSTM BR deep learning algorithm against the benchmark algorithms in our study for major currencies (AUD, CNY, GBP, and JPY). ***, **, and * represent the rejection of a null hypothesis that an existing algorithm's forecast accuracy is better than our proposed Bi-LSTM BR ensemble deep learning approach at P < 0.001, P < 0.05 and P < 0.1, respectively The fourth cluster of COVID-19 data (C4) is for the period from September 9 to December 14, 2020, or 45 days. Table 11 shows that Bi-LSTM BR performed best in predicting the EUR/USD exchange rate, whereas Bi-LSTM performed best for AUD/USD. Figures 13 and 14 provide evidence that our proposed BR ensemble deep learning approach performed well Table 9 Evaluation of algorithms using RMSE for Cluster C3 ( learning algorithm against the benchmark algorithms in our study for major currencies (AUD, CNY, GBP, and JPY). ***, **, and * represent the rejection of a null hypothesis that an existing algorithm's forecast accuracy is better than our proposed Bi-LSTM BR ensemble deep learning approach at P < 0.001, P < 0.05 and P < 0.1, respectively in predicting the exchange rate during this COVID-19 period. Table 12 shows that the DM test examined the accuracy of our proposed Bi-LSTM BR deep learning algorithm against the benchmark algorithms. The DM test results demonstrate that our approach had forecasting effectiveness in terms of a RMSE loss function against the benchmark algorithms in our study. This table shows the test statistics of DM test in examining the accuracy of our proposed Bi-LSTM BR deep learning algorithm against the benchmark algorithms in our study for major currencies (AUD, CNY, GBP, and JPY). ***, **, and * represent the rejection of a null hypothesis that an existing algorithm's forecast accuracy is better than our proposed Bi-LSTM BR ensemble deep learning approach at P < 0.001, P < 0.05 and P < 0.1, respectively other words, we investigated the differences in the prediction capacity of the deep learningbased model between the two periods. Table 13 shows that there were not only substantial differences between the two periods but also among the used currencies. Generally, we can find two patterns in the results; one pattern showing the currencies for which the predictive capacity significantly deteriorated and one pattern showing those for which no significant effect was observed. The currencies that were least affected include AUD, GBP, CNY, HKD, NOK, and THB. In contrast, the largest decline in model performance occurred for EUR and For the COVID-19 period, the results were averaged over clusters C1-E3 (i.e., January 31-December 31, 2020). other European currencies. To further investigate the differences across the studied foreign exchange markets, we compared the overall performance for the two periods in terms of the RMSE, MAE and MAPE, as shown in Fig. 15 . On average, the prediction performance of Bi-LSTM BR deteriorated during the COVID-19 period, as confirmed by the significant differences obtained using the DM test at a P-value less than 0.05 for all the used performance metrics. The main motivation for our Bi-LSTM BR hybrid prediction model was to take full advantage of state-of-the-art deep learning models by combining them in an ensemble learning manner. To demonstrate the efficiency of the proposed Bi-LSTM BR model, Table 20 compares our results with those of existing studies. It is worth noting that only level estimation models were selected to achieve a fair comparison. Compared with existing approaches, the proposed model achieved a superior average performance in terms of the RMSE, MAE, and MAPE. It must be acknowledged that the best performance so far has been reported by Islam and Hossain (2020) . However, unlike in other studies, the authors did not use a daily prediction This table shows the test statistics of DM test in examining the accuracy of our proposed Bi-LSTM BR deep learning algorithm against the benchmark algorithms in our study for major currencies (AUD, CNY, GBP, and JPY). ***, **, and * represent the rejection of a null hypothesis that an existing algorithm's forecast accuracy is better than our proposed Bi-LSTM BR ensemble deep learning approach at P < 0.001, P < 0.05 and P < 0.1, respectively horizon but, rather, a 30-min prediction horizon, and this substantially reduced the average error. Overall, our model was superior to the compared neural network-based prediction models. In addition, a wide range of 21 currencies, including emerging foreign currency markets, provided strong experimental support for our results. Therefore, one implication of this study is that the advantages of combining state-of-the-art deep learning-based Bi-LSTM models with variance-reducing BR are reflected in a better prediction performance compared with more traditional deep learning-based models. The demonstrated robustness of the proposed model indicates high confidence in its predictions during the COVID-19 period. We have found additional empirical support for the previous findings of Umar and Gubareva (2020) that foreign exchange markets have been highly volatile during the pandemic. This can also be attributed to the decline in foreign exchange market efficiency during the COVID-19 period (Aslam et al., 2020) . Our results suggest that as the number of pandemic cases in a country increased, more negative effects were seen on the country's exchange rate predictability. This information can be used to develop targeted interventions aimed at stabilizing foreign exchange markets. In this study, we examined the predictability of 21 major currency pairs, including currencies of the world's largest economies. Therefore, the results of our study can help investors and other stakeholders to evaluate their risks and their effects on business decisions. In fact, exchange rate volatility is essential for the valuations of assets and liabilities and the pricing of derivative instruments. The predictions provided by the proposed model can be incorporated into existing volatility models to improve their prediction accuracy. Predicting foreign exchange market volatility during the pandemic period is also critical for policymakers in reducing systematic risks when planning for and implementing fiscal and monetary policies. The findings of this study have a number of important implications for stakeholders. In accordance with work by Umar and Gubareva (2020) , cross-currency hedges are suggested to address the higher currency risk posed by the pandemic. Indeed, during the COVID-19 period, it became crucial for stakeholders, including banks and private companies, to anticipate the Table 18 Evaluation of Algorithms using RMSE for Cluster E3 (June 9 to December 14, 2020) learning algorithm against the benchmark algorithms in our study for major currencies (AUD, CNY, GBP, and JPY). ***, **, and * represent the rejection of a null hypothesis that an existing algorithm's forecast accuracy is better than our proposed Bi-LSTM BR ensemble deep learning approach at P < 0.001, P < 0.05 and P < 0.1, respectively effects of the pandemic on their business and financial risks associated with increased foreign currency market volatility. These stakeholders are now increasingly checking the reliability of the foreign market data used as inputs for the valuation of their assets, liabilities, and contracts. The proposed prediction model might not only provide some support for this checking process but it can also be used to identify the most seriously affected exposures. This in turn can result in the reconsidering of current hedging strategies. Therefore, our research suggests that stakeholders should take more advantage of derivative markets by using hedging with options and cross-currency basis swaps. Another challenging issue is the post-pandemic scenario in the foreign exchange market. Our results indicate that the predictability of the foreign exchange market of countries less affected by COVID-19 is close to that from before the pandemic. Hence, post-pandemic foreign exchange markets are expected to be more predictable, allowing investors to find more opportunities in foreign exchange markets. In this study, we proposed an ensemble deep learning approach combining Bi-LSTM and BR. We have applied other machine learning algorithms, such as RT, SVR, and RF, and deep learning algorithms, such as LSTM and Bi-LSTM. Results from the DM test show that our proposed Bi-LSTM BR ensemble deep learning approach has superior forecasting effectiveness in terms of a RMSE loss function against these benchmark algorithms. These findings suggest that in general, the prediction performance of the used model worsened during the COVID-19 period. The performance deteriorated especially for exchange rates of the most adversely affected countries, and this can be attributed to a higher currency volatility induced by the pandemic. However, it should be noted that although this increased volatility translates into more challenging foreign exchange market predictions, our model still performed well compared with existing prediction models in terms of the RMSE, MAE, and MAPE. The highly competitive prediction capacity of the proposed model in both periods, pre-COVID-19 and COVID-19, is beneficial for policymakers, entrepreneurs, foreign exchange brokers, and dealers when addressing currency risks, particularly during the highly volatile COVID-19 period. This study's findings can support market participants as they try to find the best investment strategy that can generate profits during the crisis period while also managing the increased currency risk. This study has revealed several questions in need of further investigation. Our proposed Bi-LSTM BR ensemble deep learning approach was shown to be highly effective for foreign exchange markets. It would be interesting to investigate its effectiveness in other financial and commodity markets, such as in forecasting stock prices, crude oil prices, and prices of gold and other precious metals. Our primary focus was on exchange rate forecasting, and we have not included other factors such as interest rate differentials and inflation differentials. Additional determinants should therefore be incorporated into the proposed prediction model. The forecasting power may be enhanced if these factors are integrated into our proposed Bi-LSTM BR ensemble deep learning approach. This provides an opportunity for future research. The financial implications for investors of trading strategies based on the predictions of the proposed model should also be considered in further work. CNN is convolutional neural network, DBN is deep belief network, GRU is gated recurrent unit, and PSN is pi-sigma network Topological applications of multilayer perceptrons and support vector machines in financial decision support systems Tax default prediction using feature transformation-based machine learning FLF-LSTM: A novel prediction system using forex loss function Prediction of cryptocurrency returns using machine learning Emotion recognition based on EEG using LSTM recurrent neural network On the efficiency of foreign exchange markets in times of the COVID-19 pandemic Financial forecasting using ANFIS networks with quantum-behaved particle swarm optimization Support vector machine regression (SVR/LS-SVM)-An alternative to neural networks (ANN) for analytical chemistry? Comparison of non-linear methods on near infrared (NIR) spectroscopy data An ensemble of LSTM neural networks for high-frequency stock market classification Identifying appropriate spatial scales of predictors in species distribution models with the random forest algorithm Avoiding overfitting of decision trees. Principles of Data Mining Random forests Reinforcement learning applied to Forex trading A multi-layer and multi-ensemble stock trader using deep learning and deep reinforcement learning Predicting corporate financial distress based on integration of decision tree classification and logistic regression Volatility markets underreacted to the early stages of the COVID-19 pandemic Co-movements and spillovers of oil and renewable firms under extreme conditions: New evidence from negative WTI prices during COVID-19 Predicting product return volume using machine learning methods A hybridized ELM using self-adaptive multi-population-based Jaya algorithm for currency exchange prediction: An empirical assessment Performance analysis of a higher order neural network with an improved shuffled frog leaping algorithm for currency exchange rate prediction Measuring firm performance using financial ratios: A decision tree approach Comparing predictive accuracy Deep learning with long short-term memory networks for financial market predictions Neural networks performance in exchange rate prediction Support vector regression for polyhedral and missing data Modeling credit approval data with neural networks: An experimental investigation and optimisation A profit function-maximizing inventory backorder prediction system using big data analytics Introduction of a time series machine learning methodology for the application in a production system Long short-term memory Emerging market economy exchange rates and local currency bond markets amid the Covid-19 pandemic A comparison of methods for multiclass support vector machines World Economic Outlook Update Foreign exchange currency rate prediction using a GRU-LSTM Hybrid Network The two-stage machine learning ensemble models for stock price prediction by combining mode decomposition, extreme learning machine and improved harmony search algorithm Forecasting benchmarks of long-term stock returns via machine learning Modeling and predicting historical volatility in exchange rate markets A comparison of forecasting techniques for predicting exchange rates Deep learning techniques: An overview What exactly is' Bad News' in foreign exchange markets?: Evidence from Latin American markets Mixture of activation functions with extended min-max normalization for forex market prediction Has COVID-19 changed exchange rate resistance to shocks? Short-term trend prediction in financial time series data Forecasting exchange rate better with artificial neural network Multi currency exchange rate prediction using convolutional neural network Automatic classification of endogenous seismic sources within a landslide body using random forest algorithm Modeling foreign exchange market activity around macroeconomic news: Hawkes-process approach Multi-objective ensembles of echo state networks and extreme learning machines for streamflow series forecasting Deep LSTM with reinforcement learning layer for financial trend prediction in FX high frequency trading systems Revisiting oil-stock nexus during COVID-19 pandemic: Some preliminary results Hedging oil price risk with gold during COVID-19 pandemic Financial time series forecasting with deep learning: A systematic literature review Product backorder prediction using deep neural network on imbalanced data Forecasting exchange rate using deep belief networks and conjugate gradient method A new ensemble deep learning approach for exchange rates forecasting and trading Deep Learning-Based Stock Price Prediction Using LSTM and Bi-Directional LSTM Model FTSE 100 suffers worst quarter since 1987 as Covid-19 recession looms-as it happened The Response by Central Banks in Advanced Economies to COVID-19 A time-frequency analysis of the impact of the Covid-19 induced panic on the volatility of currency and cryptocurrency markets Density estimation using support vector machines The prediction of periods of high volatility in exchange markets Mad March: How the stock market is being hit by COVID-19 Identifying Fintech risk through machine learning: Analysing the Q&A text of an online loan investment platform A case study on using neural networks to perform technical forecasting of forex Forecasting directional movement of Forex data using LSTM with technical and macroeconomic indicators Covid-19 and optimal portfolio selection for investment in sustainable development goals Publisher's Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations Acknowledgements This article was supported by the scientific research project of the Czech Sciences Foundation Grant No. 19-15498S.