A New Approach to Predicting Cryptocurrency Returns Based on the Gold Prices with Support Vector Machines during the COVID-19 Pandemic Using Sensor-Related Data
Abstract
:1. Introduction
2. Sensing Data of Cryptocurrencies, Gold, and COVID-19
Algorithm 1 Approach to predict the daily classification of cryptocurrencies returns relating them to gold price and COVID-19 data using sensors. |
|
3. Methodology
- One-to-one method: Here, we break down the m classes into mutual binary classes, where a binary SVM is employed to differentiate between every two binary classes. Each binary SVM finds a hyperplane that separates between every two classes, neglecting the data points of the other classes. For example, consider , say, with classes , and 4. In this case, we have six different SVMs applied to the binary classes , and .
- One-to-rest method: Here, the classifier can use m binary SVMs by obtaining an optimal hyperplane that separates between a class and all others at once. For example, consider , say, with classes , and 3. In this case, we have three different SVMs applied to the binary classes , , and .
- Linear function:
- Polynomial function:
- Radial basis function:
- Sigmoid function:
4. Empirical Analysis with Real-World Data
- Daily confirmed COVID-19 infections and deaths:First, we collect the daily confirmed COVID-19 infections and deaths from the online repository https://github.com/CSSEGISandData/COVID-19 (accessed on 29 August 2021). This web-hosting has been operated by the Johns Hopkins University Center for Systems Science and Engineering from 23 January 2020 until the present, and it is updated twice daily. We consider the period from 23 January 2020 to 14 July 2021. This period essentially accounts for all available data officially published [39] up to the date where we started this research.
- Daily gold price in US dollars:Second, to compare the impact of the pre-COVID-19 period with the COVID-19 period on the classification of cryptocurrency returns according to the quantile values of the gold price (in US dollars), we collected the gold price data from the website https://www.gold.org/goldhub/data/gold-prices (accessed on 29 August 2021) over the period 04 December 2018 to 14 July 2021. In this article, the word return is used synonymously with log returns.The four graphs in the upper and middle of Figure 2 present the distribution and trend of the daily infections and deaths due to COVID-19. The graphs show that, for more than 100 days, the number of daily deaths ranged from 5000 to 7500 cases. The plots in Figure 2 show that the daily confirmed COVID-19 infections and deaths and the daily gold prices followed a similar trend during the period of the ongoing COVID-19 pandemic. The gold prices report high volatility clustering in the pandemic compared with the pre-COVID-19 period. For the entire period of study, the probability density function of the gold prices is slightly skewed to the left with a high excess kurtosis.Remark. Note that the shaded region in Figure 2, Figure 3 and Figure 4 describes the period after the beginning of the pandemic for better visualization of the impact of COVID-19 on the gold price/cryptocurrency return. Also, in these figures and in Figure 5, Figure 6 and Figure 7, the vertical dotted line represents the threshold between the pre-COVID-19 period and ongoing COVID-19 period.
- Daily closing price of major cryptocurrencies in US dollars:Third, we collect the daily closing price and market capitalization for some major cryptocurrencies available from the online source https://coinmarketcap.com (accessed on 29 August 2021). For the current research, as mentioned, we study the six cryptocurrency assets, that is, ADA, BNB, BTC, DOGE, ETH, and XRP, selected from the top 10 ranked currencies.Table 1 provides the main characteristics of the top-ranked cryptocurrencies and Figure 3 presents the market capitalization of used currencies over the study period. Again, the vertical dotted lines represent the threshold between the two periods of time (before and during the pandemic). The trends show an exponential increase in the market capitalization of BTC and ETH and less increase in the other currencies during the period of the outbreak of the pandemic.
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Chahuan-Jimenez, K.; Rubilar, R.; de la Fuente-Mella, H.; Leiva, V. Breakpoint analysis for the COVID-19 pandemic and its effect on the stock markets. Entropy 2021, 23, 100. [Google Scholar] [CrossRef]
- Dyhrberg, A.H. Bitcoin, gold and the dollar—A GARCH volatility analysis. Financ. Res. Lett. 2016, 16, 85–92. [Google Scholar] [CrossRef] [Green Version]
- Makala, D.; Li, Z. Prediction of gold price with ARIMA and SVM. J. Phys. Conf. Ser. 2021, 1767, 012022. [Google Scholar] [CrossRef]
- Salisu, A.A.; Ogbonna, A.E. The return volatility of cryptocurrencies during the COVID-19 pandemic: Assessing the news effect. Glob. Financ. J. 2021. [Google Scholar] [CrossRef]
- Shen, M.; Zhu, L.; Xu, K. Blockchain: Empowering Secure Data Sharing; Springer: Singapore, 2020. [Google Scholar]
- Sanchez, L.; Leiva, V.; Galea, M.; Saulo, H. Birnbaum-Saunders quantile regression and its diagnostics with application to economic data. Appl. Stoch. Model. Bus. Ind. 2021, 37, 53–73. [Google Scholar] [CrossRef]
- Saulo, H.; Dasilva, A.; Leiva, V.; Sanchez, L.; de la Fuente-Mella, H. Log-symmetric quantile regression models. Stat. Neerl. 2021. [Google Scholar] [CrossRef]
- Bouoiyour, J.; Selmi, R.; Wohar, M.E. Measuring the response of gold prices to uncertainty: An analysis beyond the mean. Econ. Model. 2018, 75, 105–116. [Google Scholar] [CrossRef] [Green Version]
- Bouri, E.; Gupta, R.; Tiwari, A.K.; Roubaud, D. Does bitcoin hedge global uncertainty? Evidence from wavelet-based quantile-in-quantile regressions. Financ. Res. Lett. 2017, 23, 87–95. [Google Scholar] [CrossRef] [Green Version]
- Dastgir, S.; Demir, E.; Downing, G.; Gozgor, G.; Lau, C.K.M. The causal relationship between bitcoin attention and bitcoin returns: Evidence from the copula-based granger causality test. Financ. Res. Lett. 2019, 28, 160–164. [Google Scholar] [CrossRef]
- Kim, M.J.; Canh, N.P.; Park, S.Y. Causal relationship among cryptocurrencies: A conditional quantile approach. Financ. Res. Lett. 2021. [Google Scholar] [CrossRef]
- Sim, N.; Zhou, H. Oil prices, us stock return, and the dependence between their quantiles. J. Bank. Financ. 2015, 55, 1–8. [Google Scholar] [CrossRef]
- Mensi, W.; Sensoy, A.; Vo, X.V.; Kang, S.H. Impact of covid-19 outbreak on asymmetric multifractality of gold and oil prices. Resour. Policy 2020, 69, 101829. [Google Scholar] [CrossRef]
- de la Fuente-Mella, H.; Rubilar, R.; Chahuan-Jimenez, K.; Leiva, V. Modeling COVID-19 cases statistically and evaluating their effect on the economy of countries. Mathematics 2021, 9, 1558. [Google Scholar] [CrossRef]
- Yousaf, I.; Ali, S. Discovering interlinkages between major cryptocurrencies using high-frequency data: New evidence from COVID-19 pandemic. Financ. Innov. 2020, 6, 1. [Google Scholar] [CrossRef]
- Bustos, N.; Tello, M.; Droppelmann, G.; Garcia, N.; Feijoo, F.; Leiva, V. Machine learning techniques as an efficient alternative diagnostic tool for COVID-19 cases. Signa Vitae 2022. [Google Scholar] [CrossRef]
- Iqbal, N.; Fareed, Z.; Wan, G.; Shahzad, F. Asymmetric nexus between covid-19 outbreak in the world and cryptocurrency market. Int. Rev. Financ. Anal. 2021, 73, 101613. [Google Scholar] [CrossRef]
- Conlon, T.; Corbet, S.; McGee, R.J. Are cryptocurrencies a safe haven for equity markets? An international perspective from the covid-19 pandemic. Res. Int. Bus. Financ. 2020, 54, 101248. [Google Scholar] [CrossRef]
- Mokni, K.; Ajmi, A.N. Cryptocurrencies vs. US dollar: Evidence from causality in quantiles analysis. Econ. Anal. Policy 2021, 69, 238–252. [Google Scholar] [CrossRef]
- Guzman, A.; Pinto-Gutierrez, C.; Trujillo, M.A. Trading cryptocurrencies as a pandemic pastime: COVID-19 lockdowns and bitcoin volume. Mathematics 2021, 9, 1771. [Google Scholar] [CrossRef]
- Leiva, V.; Saulo, H.; Souza, R.; Aykroyd, R.G.; Vila, R. A new BISARMA time series model for forecasting mortality using weather and particulate matter data. J. Forecast. 2021, 40, 346–364. [Google Scholar] [CrossRef]
- Palacios, C.A.; Reyes-Suarez, J.A.; Bearzotti, L.A.; Leiva, V.; Marchant, C. Knowledge discovery for higher education student retention based on data mining: Machine learning algorithms and case study in Chile. Entropy 2021, 23, 485. [Google Scholar] [CrossRef] [PubMed]
- Cortes, C.; Vapnik, V. Support-vector networks. Mach. Learn. 1995, 20, 273–297. [Google Scholar] [CrossRef]
- Razi, M.A.; Athappilly, K. A comparative predictive analysis of neural networks (NNS), nonlinear regression and classification and regression tree (CART) models. Expert Syst. Appl. 2005, 29, 65–74. [Google Scholar] [CrossRef]
- Aykroyd, R.G.; Leiva, V.; Ruggeri, F. Recent developments of control charts, identification of big data sources and future trends of current research. Technol. Forecast. Soc. Chang. 2019, 144, 221–232. [Google Scholar] [CrossRef]
- Geranian, H.; Tabatabaei, S.H.; Asadi, H.H.; Carranza, E.J.M. Application of discriminant analysis and support vector machine in mapping gold potential areas for further drilling in the Sari-Gunay gold deposit, NW Iran. Nat. Resour. Res. 2016, 25, 145–159. [Google Scholar] [CrossRef]
- Ślepaczuk, R.; Zenkova, M. Robustness of support vector machines in algorithmic trading on cryptocurrency market. Cent. Eur. Econ. J. 2018, 5, 186–205. [Google Scholar] [CrossRef] [Green Version]
- Ramirez-Figueroa, J.A.; Martin-Barreiro, C.; Nieto, A.B.; Leiva, V.; Galindo-Villardón, M.P. A new principal component analysis by particle swarm optimization with an environmental application for data science. Stoch. Environ. Res. Risk Assess. 2021, 35, 1969–1984. [Google Scholar] [CrossRef]
- Hitam, N.A.; Ismail, A.R.; Saeed, F. An optimized support vector machine based on particle swarm optimization (PSO) for cryptocurrency forecasting. Procedia Comput. Sci. 2019, 163, 427–433. [Google Scholar] [CrossRef]
- Sebastiǎo, H.; Godinho, P. Forecasting and trading cryptocurrencies with machine learning under changing market conditions. Financ. Innov. 2021, 7, 3. [Google Scholar] [CrossRef]
- Cabezas, X.; García, S.; Martin-Barreiro, C.; Delgado, E.; Leiva, V. A two-stage location problem with order solved using a Lagrangian algorithm and stochastic programming for a potential use in COVID-19 vaccination based on sensor-related data. Sensors 2021, 21, 5352. [Google Scholar] [CrossRef]
- Martin-Barreiro, C.; Ramirez-Figueroa, J.; Cabezas, X.; Leiva, V.; Galindo-Villardon, M. Disjoint and functional principal component analysis for infected cases and deaths due to COVID-19 in South American countries with sensor-related data. Sensors 2021, 21, 4094. [Google Scholar] [CrossRef] [PubMed]
- Rojas, F.; Leiva, V.; Huerta, M.; Martin-Barreiro, C. Lot-size models with uncertain demand considering its skewness/kurtosis and stochastic programming applied to hospital pharmacy with sensor-related COVID-19 data. Sensors 2021, 21, 5198. [Google Scholar] [CrossRef] [PubMed]
- Boser, B.E.; Guyon, I.M.; Vapnik, V.N. A Training Algorithm for Optimal Margin Classifiers; Association for Computing Machinery: New York, NY, USA, 1992. [Google Scholar] [CrossRef]
- Luenberger, D.G.; Ye, Y. Linear and Nonlinear Programming; Springer: New York, NY, USA, 2008. [Google Scholar]
- Meyer, D.; Dimitriadou, E.; Hornik, K.; Weingessel, A.; Leisch, F.; Chang, C.C.; Lin, C.C. e1071: Misc Functions of the Department of Statistics (e1071), TU Wien. R Package Version V.1.7-9. 2021. Available online: https://cran.r-project.org/web/packages/e1071 (accessed on 16 September 2021).
- Wickham, H. ggplot2: Elegant Graphics for Data Analysis; Springer: New York, NY, USA, 2016; Available online: https://ggplot2.tidyverse.org (accessed on 15 September 2021).
- R Core Team. R: A Language and Environment for Statistical Computing; R Foundation for Statistical Computing: Vienna, Austria, 2021. [Google Scholar]
- World Health Organization. Coronavirus Disease (COVID-19) Outbreak; WHO: Ginebra, Switzerland, 2021; Available online: https://www.who.int/emergencies/diseases/novel-coronavirus-2019 (accessed on 16 September 2021).
- Stone, M. Cross-validation choice and assessment of statistical predictions. J. R. Stat. Soc. B 1974, 36, 111–147. [Google Scholar]
- Henrique, B.M.; Sobreiro, V.A.; Kimura, H. Stock price prediction using support vector regression on daily and up to the minute prices. J. Financ. Data Sci. 2018, 4, 183–201. [Google Scholar] [CrossRef]
Rank | Name | Symbol | Price (in US $) | Market Capitalization (in US $) |
---|---|---|---|---|
1 | Bitcoin | (BTC) | 32,822.35 | 615,635,042,692 |
2 | Ethereum | (ETH) | 1,994.33 | 232,727,182,406 |
3 | Tether | (USDT) | 1.00 | 62,093,784,456 |
4 | Binance Coin | (BNB) | 309.41 | 47,473,117,237 |
5 | Cardano | (ADA) | 1.26 | 40,444,089,747 |
6 | Ripple | (XRP) | 0.62 | 28,669,334,327 |
7 | USD Coin | (USDC) | 1.00 | 26,668,074,913 |
8 | Dogecoin | (DOGE) | 0.20 | 25,738,852,158 |
9 | Polkadot | (DOT) | 13.67 | 13,310,832,721 |
10 | Binance USD | (BUSD) | 1.00 | 11,579,221,385 |
Variable | Period | Min | Mean | Median | Max | SD * | JB Test ** | ||
---|---|---|---|---|---|---|---|---|---|
Gold | Pre-COVID-19 | 1235 | 1292 | 1391 | 1400 | 1490 | 1573 | 31 | |
COVID-19 | 1474 | 1720 | 1792 | 1800 | 1880 | 2067 | 113 | 12 | |
Both periods | 1235 | 1429 | 1617 | 1617 | 1817 | 2067 | 51 | ||
BTC | Pre-COVID-19 | 137 | |||||||
COVID-19 | |||||||||
Both periods | 12196 | ||||||||
ETH | Pre-COVID-19 | 96 | |||||||
COVID-19 | 5793 | ||||||||
Both periods | 8429 | ||||||||
BNB | Pre-COVID-19 | 43 | |||||||
COVID-19 | |||||||||
Both periods | 7818 | ||||||||
ADA | Pre-COVID-19 | 317 | |||||||
COVID-19 | 1817 | ||||||||
Both periods | 2550 | ||||||||
XRP | Pre-COVID-19 | 109 | |||||||
COVID-19 | 1657 | ||||||||
Both periods | 4590 | ||||||||
DOGE | Pre-COVID-19 | 452 | |||||||
COVID-19 | 36,238 | ||||||||
Both periods | 154,646 |
COVID-19 Infected Cases | COVID-19 Death Cases | |||||
---|---|---|---|---|---|---|
Null Hypothesis | Wald | -Value | Null Hypothesis | Wald | p-Value | |
0.4376 | 0.7262 | 0.1968 | 0.8985 | |||
0.9753 | 0.4044 | 0.6815 | 0.5638 | |||
1.9525 | 0.1207 | 0.8400 | 0.4726 | |||
0.7258 | 0.5371 | 0.2029 | 0.8944 | |||
1.0662 | 0.3634 | 2.0982 | 0.1000 | |||
2.4939 | 0.0597 | 2.2387 | 0.0834 | |||
0.8942 | 0.4442 | 2.2739 | 0.0796 |
Currency | Linear Kernel | Polynomial Kernel | Radial Kernel | |||||
---|---|---|---|---|---|---|---|---|
Accuracy | c | Accuracy | c | d | Accuracy | c | ||
Binance Coin | 73.2 | 64 | 76.8 | 512 | 3 | 91.5 | 512 | 0.4 |
Bitcoin | 74.5 | 256 | 77.3 | 256 | 3 | 91.8 | 512 | 0.3 |
Cardano | 72.6 | 256 | 74.8 | 512 | 3 | 91.1 | 128 | 0.4 |
Dogecoin | 71.8 | 256 | 76.5 | 512 | 3 | 89.4 | 16 | 0.4 |
Ethereum | 73.0 | 64 | 79.3 | 128 | 3 | 90.9 | 128 | 0.3 |
Ripple | 72.3 | 128 | 75.8 | 512 | 3 | 90.8 | 256 | 0.3 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Mahdi, E.; Leiva, V.; Mara’Beh, S.; Martin-Barreiro, C. A New Approach to Predicting Cryptocurrency Returns Based on the Gold Prices with Support Vector Machines during the COVID-19 Pandemic Using Sensor-Related Data. Sensors 2021, 21, 6319. https://doi.org/10.3390/s21186319
Mahdi E, Leiva V, Mara’Beh S, Martin-Barreiro C. A New Approach to Predicting Cryptocurrency Returns Based on the Gold Prices with Support Vector Machines during the COVID-19 Pandemic Using Sensor-Related Data. Sensors. 2021; 21(18):6319. https://doi.org/10.3390/s21186319
Chicago/Turabian StyleMahdi, Esam, Víctor Leiva, Saed Mara’Beh, and Carlos Martin-Barreiro. 2021. "A New Approach to Predicting Cryptocurrency Returns Based on the Gold Prices with Support Vector Machines during the COVID-19 Pandemic Using Sensor-Related Data" Sensors 21, no. 18: 6319. https://doi.org/10.3390/s21186319
APA StyleMahdi, E., Leiva, V., Mara’Beh, S., & Martin-Barreiro, C. (2021). A New Approach to Predicting Cryptocurrency Returns Based on the Gold Prices with Support Vector Machines during the COVID-19 Pandemic Using Sensor-Related Data. Sensors, 21(18), 6319. https://doi.org/10.3390/s21186319