# GJR-GARCH Volatility Modeling under NIG and ANN for Predicting Top Cryptocurrencies

^{1}

^{2}

^{3}

^{4}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Literature Review

## 3. Methodology

#### 3.1. Data Selections

#### 3.1.1. Exploratory Data Analysis

#### 3.1.2. Higher Moments, Correlations, and Value at Risk

- $x=$ cryptocurrency returns,
- $\mu =$ mean,
- $\sigma =$ standard deviation.

- $R=$ correlation coefficient,
- ${x}_{i}=$ values of the x-variable in a sample,
- $\overline{x}=$ mean of the values of the x-variable,
- ${y}_{i}=$ values of the y-variable in a sample,
- $\overline{y}=$ mean of the values of the y-variable.

#### 3.2. ARIMA Model for Cryptocurrency Prediction

#### Robust Model Selection

#### 3.3. Volatility Modeling with GJR-GARCH

#### 3.3.1. Confidence Bound by Markov Chain Monte Carlo Simulation

#### 3.3.2. Calculation of Sharpe Ratio

#### 3.3.3. Value at Risk Backtesting

#### 3.4. Supervised Machine Learning Approach: Artificial Neural Network

## 4. Results and Discussion

#### 4.1. GJR-GARCH and GARCH Models for Cryptocurrency Volatilities

#### 4.2. Monte Carlo Simulations of the Cryptocurrencies’ Volatility Using GJR-GARCH Model

#### 4.3. ARIMA and ANN for Forecasting Cryptocurrencies’ Prices

## 5. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## Note

1 | coinmarketcap.com accessed on 31 January 2021. |

## References

- Adebiyi, Ayodele Ariyo, Aderemi Oluyinka Adewumi, and Charles Korede Ayo. 2014. Comparison of arima and artificial neural networks models for stock price prediction. Journal of Applied Mathematics 2014: 614342. [Google Scholar] [CrossRef] [Green Version]
- Akaike, Hirotugu. 1974. A new look at the statistical model identification. IEEE Transactions on Automatic Control 19: 716–23. [Google Scholar] [CrossRef]
- Alberg, Dima, Haim Shalit, and Rami Yosef. 2008. Estimating stock market volatility using asymmetric garch models. Applied Financial Economics 18: 1201–8. [Google Scholar] [CrossRef] [Green Version]
- Barndorff-Nielsen, Ole. 1977. Exponentially decreasing distributions for the logarithm of particle size. Proceedings of the Royal Society of London A Mathematical and Physical Sciences 353: 401–19. [Google Scholar]
- Bollerslev, Tim. 1986. Generalized autoregressive conditional heteroskedasticity. Journal of Econometrics 31: 307–27. [Google Scholar] [CrossRef] [Green Version]
- Borri, Nicola. 2019. Conditional tail-risk in cryptocurrency markets. Journal of Empirical Finance 50: 1–19. [Google Scholar] [CrossRef]
- Bouri, Elie, Konstantinos Gkillas, Rangan Gupta, and Christian Pierdzioch. 2021. Forecasting realized volatility of bitcoin: The role of the trade war. Computational Economics 57: 29–53. [Google Scholar] [CrossRef]
- Bouri, Elie, and Rangan Gupta. 2019. Predicting bitcoin returns: Comparing the roles of newspaper-and internet search-based measures of uncertainty. Finance Research Letters 38: 101398. [Google Scholar] [CrossRef] [Green Version]
- Box, George E. P., Gwilym M. Jenkins, Gregory C. Reinsel, and Greta M. Ljung. 2015. Time Series Analysis: Forecasting and Control. Hoboken: John Wiley & Sons. [Google Scholar]
- Cheikh, Nidhaleddine Ben, Younes Ben Zaied, and Julien Chevallier. 2020. Asymmetric volatility in cryptocurrency markets: New evidence from smooth transition garch models. Finance Research Letters 35: 101293. [Google Scholar] [CrossRef]
- Crick, Francis. 1989. The recent excitement about neural networks. Nature 337: 129–32. [Google Scholar] [CrossRef]
- Danielsson, Jon. 2011. Financial Risk Forecasting: The Theory and Practice of Forecasting Market Risk with Implementation in R and Matlab. New York: John Wiley & Sons, vol. 588. [Google Scholar]
- De Goeij, Peter, and Wessel Marquering. 2004. Modeling the conditional covariance between stock and bond returns: A multivariate garch approach. Journal of Financial Econometrics 2: 531–64. [Google Scholar] [CrossRef]
- Enders, Walter. 2008. Applied Econometric Time Series. New York: John Wiley & Sons. [Google Scholar]
- Engle, Robert F. 1982. Autoregressive conditional heteroscedasticity with estimates of the variance of united kingdom inflation. Econometrica: Journal of the Econometric Society 50: 987–1007. [Google Scholar] [CrossRef]
- Feng, Wenjun, Yiming Wang, and Zhengjun Zhang. 2018. Can cryptocurrencies be a safe haven: A tail risk perspective analysis. Applied Economics 50: 4745–62. [Google Scholar] [CrossRef]
- Glosten, Lawrence R., Ravi Jagannathan, and David E. Runkle. 1993. On the relation between the expected value and the volatility of the nominal excess return on stocks. The Journal of Finance 48: 1779–801. [Google Scholar] [CrossRef]
- Hájek, Petr. 2011. Municipal credit rating modelling by neural networks. Decision Support Systems 51: 108–18. [Google Scholar] [CrossRef]
- Hassan, Md Rafiul, Baikunth Nath, and Michael Kirley. 2007. A fusion model of hmm, ann and ga for stock market forecasting. Expert Systems with Applications 33: 171–80. [Google Scholar] [CrossRef]
- Hatemi-J, Abdulnasser, Mohamed A. Hajji, Elie Bouri, and Rangan Gupta. 2019. The Benefits of Diversification between Bitcoin, Bonds, Equities and the Us Dollar: A Matter of Portfolio Construction. Technical Report. Pretoria: Department of Economics, University of Pretoria. [Google Scholar]
- Hertz, David B. 1964. Risk Analysis in Capital Investment: Harvard Business Review. Available online: https://hbr.org/1979/09/risk-analysis-in-capital-investment (accessed on 30 March 2021).
- Lánskỳ, Jan. 2016. Analysis of cryptocurrencies price development. Acta Informatica Pragensia 5: 118–37. [Google Scholar] [CrossRef]
- Liu, Yukun, and Aleh Tsyvinski. 2018. Risks and returns of cryptocurrency. The Review of Financial Studies 34: 2689–727. [Google Scholar] [CrossRef]
- Ma, Xiaomeng, Ruixian Yang, Dong Zou, and Rui Liu. 2020. Measuring extreme risk of sustainable financial system using gjr-garch model trading data-based. International Journal of Information Management 50: 526–37. [Google Scholar] [CrossRef]
- Maciel, Leandro. 2013. A hybrid fuzzy gjr-garch modeling approach for stock market volatility forecasting. In Advances in Financial Risk Management. Berlin: Springer, pp. 253–83. [Google Scholar]
- MacKay, David J. C., and David J. C. Mac Kay. 2003. Information Theory, Inference and Learning Algorithms. Cambridge: Cambridge University Press. [Google Scholar]
- McCulloch, Warren S., and Walter Pitts. 1943. A logical calculus of the ideas immanent in nervous activity. The Bulletin of Mathematical Biophysics 5: 115–33. [Google Scholar] [CrossRef]
- Moghaddam, Amin Hedayati, Moein Hedayati Moghaddam, and Morteza Esfandyari. 2016. Stock market index prediction using artificial neural network. Journal of Economics, Finance and Administrative Science 21: 89–93. [Google Scholar] [CrossRef] [Green Version]
- Mokni, Khaled, Ahdi Noomen Ajmi, Elie Bouri, and Xuan Vinh Vo. 2020. Economic policy uncertainty and the bitcoin-us stock nexus. Journal of Multinational Financial Management 57: 100656. [Google Scholar] [CrossRef]
- Mokni, Khaled, Elie Bouri, Ahdi Noomen Ajmi, and Xuan Vinh Vo. 2021. Does bitcoin hedge categorical economic uncertainty? A quantile analysis. SAGE Open 11: 21582440211016377. [Google Scholar] [CrossRef]
- Moschini, Gian Carlo, and Robert J. Myers. 2002. Testing for constant hedge ratios in commodity markets: A multivariate garch approach. Journal of Empirical Finance 9: 589–603. [Google Scholar] [CrossRef] [Green Version]
- Nieppola, Olli. 2009. Backtesting Value-at-Risk Models, Thesis Paper: Department of Economics. Espoo: Aalto University, Available online: https://aaltodoc.aalto.fi/handle/123456789/181 (accessed on 30 March 2021).
- Plakandaras, Vasilios, Elie Bouri, and Rangan Gupta. 2021. Forecasting bitcoin returns: Is there a role for the us–china trade war? Journal of Risk 23: 3. [Google Scholar] [CrossRef]
- Quah, Tong-Seng, and Bobby Srinivasan. 1999. Improving returns on stock investment through neural network selection. Expert Systems with Applications 17: 295–301. [Google Scholar] [CrossRef]
- Selvamuthu, Dharmaraja, Vineet Kumar, and Abhishek Mishra. 2019. Indian stock market prediction using artificial neural networks on tick data. Financial Innovation 5: 16. [Google Scholar] [CrossRef] [Green Version]
- Shahzad, Syed Jawad Hussain, Elie Bouri, Mobeen Ur Rehman, and David Roubaud. 2021. The Hedge Asset for Brics Stock Markets: Bitcoin, Gold, or Vix. Kiel: The World Economy. [Google Scholar]
- Wang, Gangjin, Yanping Tang, Chi Xie, and Shou Chen. 2019. Is bitcoin a safe haven or a hedging asset? evidence from china. Journal of Management Science and Engineering 4: 173–88. [Google Scholar] [CrossRef]
- Wang, Pengfei, Wei Zhang, Xiao Li, and Dehua Shen. 2019. Is cryptocurrency a hedge or a safe haven for international indices? A comprehensive and dynamic perspective. Finance Research Letters 31: 1–18. [Google Scholar] [CrossRef]
- White, Halbert. 1988. Economic prediction using neural networks: The case of ibm daily stock returns. Paper presented at IEEE 1988 International Conference on Neural Networks, San Diego, CA, USA, July 24–27; vol. 2, pp. 451–8. [Google Scholar] [CrossRef]
- Yao, Jingtao, Chew Lim Tan, and Hean-Lee Poh. 1999. Neural networks for technical analysis: A study on klci. International Journal of Theoretical and Applied Finance 2: 221–41. [Google Scholar] [CrossRef] [Green Version]
- Zhang, Guoqiang, B. Eddy Patuwo, and Michael Y. Hu. 1998. Forecasting with artificial neural networks: The state of the art. International Journal of Forecasting 14: 35–62. [Google Scholar] [CrossRef]

**Figure 1.**This figure plots daily prices for ten cryptocurrencies from 11 November 2018 to 31 December 2020. We scaled the prices of cryptocurrency to fit in one plot.

**Figure 2.**This figure shows the correlation among ten cryptocurrencies. Log prices of all cryptocurrencies have been used to calculate the correlation. Data are daily prices from coingeco.com. The sample period covers 11 November 2018 to 31 December 2020.

**Figure 6.**Volatility prediction by conditional variance (vs. absolute value of returns) using GJR-GARCH model.

**Figure 7.**The average and the $97.5\%$ and $2.5\%$ percentiles of the simulated paths for 10 cryptocurrencies.

**Figure 10.**ANN model diagnostics. Validation Performance plot are displayed by the regression plots. (

**a**) Training data set, (

**b**) Testing data set, (

**c**) Overall data set, and (

**d**) Epoachs vs. MSE.

**Table 1.**The table presents the summary statistics of the daily return of the ten cryptocurrencies. The sample period covers 11 November 2018 to 31 December 2020.

Cryptocurrency | Mean(%) | Std(%) | N | Min(%) | Max(%) |
---|---|---|---|---|---|

Bitcoin | 0.19 | 3.83 | 781 | −43.37 | 15.93 |

Bitcoin Cash | −0.06 | 6.10 | 781 | −57.99 | 38.99 |

Bitcoin SV | 0.09 | 8.53 | 781 | −64.31 | 88.66 |

Chainlink | 0.40 | 6.86 | 781 | −66.08 | 47.61 |

EOS | −0.09 | 5.39 | 781 | −48.87 | 22.90 |

Ethereum | 0.16 | 4.99 | 781 | −56.31 | 18.12 |

Litecoin | 0.12 | 5.25 | 781 | −47.14 | 26.20 |

TETHER | 0.00 | 0.32 | 781 | −1.97 | 2.50 |

Tezos | 0.05 | 6.11 | 781 | −62.54 | 27.49 |

XRP | −0.11 | 5.09 | 781 | −54.95 | 34.01 |

Cryptocurrencies | ADF Test Statistics | ADF p-Values | Stationary Test | KPSS Level |
---|---|---|---|---|

Bitcoin | 2.215 | 0.990 | Not stationary | 6.0433 |

Bitcoin Cash | −2.647 | 0.305 | Not stationary | 0.7578 |

Bitcoin SV | −2.827 | 0.228 | Not stationary | 4.4799 |

Chainlink | −2.325 | 0.441 | Not stationary | 8.2319 |

EOS | −2.297 | 0.453 | Not stationary | 2.7370 |

Ethereum | 0.820 | 0.990 | Not stationary | 6.0329 |

Litecoin | −0.769 | 0.964 | Not stationary | 0.9214 |

TETHER | −5.514 | 0.010 | Stationary | 0.1507 |

Tezos | −3.054 | 0.132 | Not stationary | 8.1873 |

XRP | −3.910 | 0.013 | Stationary | 2.0961 |

ARIMA(p,d,q) | ARIMA(0,2,1) | ARIMA(1,1,2) | ARIMA(0,1,1) | ARIMA(0,2,4) |
---|---|---|---|---|

Bitcoin | −2021.25 | −2032.82 | −2031.95 | −2020.21 |

Bitcoin Cash | −1602.01 | −1623.92 | −1624.76 | −1609.34 |

Bitcoin SV | −1300.44 | −1323.13 | −1318.15 | −1304.74 |

Chainlink | −1440.84 | −1454.68 | −1454.35 | −1442.16 |

EOS | −1685.25 | −1707.25 | −1705.49 | −1692.90 |

Ethereum | −1723.45 | −1743.80 | −1738.80 | −1728.94 |

Litecoin | −1697.86 | −1711.93 | −1712.14 | −1700.21 |

TETHER | −4881.19 | −5248.66 | −5250.03 | −5227.21 |

Tezos | −1512.13 | −1539.72 | −1534.68 | −1524.31 |

XRP | −1628.77 | −1644.95 | −1641.18 | −1629.69 |

Cryptocurrency | ${\mathit{\chi}}^{2}$ | p-Value |
---|---|---|

Bitcoin | 770.82 | $2.2\times {10}^{-16}$ |

Bitcoin Cash | 716.47 | $2.2\times {10}^{-16}$ |

Bitcoin SV | 511.07 | $2.2\times {10}^{-16}$ |

Chainlink | 739.29 | $2.2\times {10}^{-16}$ |

EOS | 712.23 | $2.2\times {10}^{-16}$ |

Ethereum | 761.36 | $2.2\times {10}^{-16}$ |

Litecoin | 741.24 | $2.2\times {10}^{-16}$ |

TETHER | 137.97 | $2.2\times {10}^{-16}$ |

Tezos | 724.35 | $2.2\times {10}^{-16}$ |

XRP | 681.12 | $2.2\times {10}^{-16}$ |

Cryptocurrency | Skewness | Kurtosis | ${\mathit{VaR}}_{\mathit{q}}$ | Sharpe Ratio |
---|---|---|---|---|

Bitcoin | −1.78 | 22.87 | −0.087 | 0.029 |

Bitcoin Cash | −0.68 | 16.53 | −0.143 | −0.022 |

Bitcoin SV | 1.43 | 29.69 | −0.198 | 0.001 |

Chainlink | −0.43 | 14.87 | −0.156 | 0.046 |

EOS | −1.00 | 11.02 | −0.126 | −0.032 |

Ethereum | −1.93 | 22.06 | −0.114 | 0.016 |

Litecoin | −0.62 | 10.43 | −0.121 | 0.007 |

TETHER | 0.59 | 13.71 | −0.007 | −0.252 |

Tezos | −1.16 | 15.49 | −0.142 | −0.004 |

XRP | −1.31 | 28.89 | −0.119 | −0.038 |

Cryptocurrencies | ARIMA Prediction | ANN Prediction |
---|---|---|

Bitcoin | 174,304.1 | 183,090.2 |

Bitcoin Cash | 142.6201 | 143.4331 |

Bitcoin SV | 60.34515 | 60.29052 |

Chainlink | 0.5256038 | 0.5184568 |

EOS | 0.01581617 | 0.01552488 |

Ethereum | 279.0574 | 288.4151 |

LiteCoin | 11.12067 | 11.33181 |

TETHER | $4.18\times {10}^{-6}$ | $5.09\times {10}^{-6}$ |

Tezos | 0.01715067 | 0.01733191 |

XRP | 0.000741516 | 0.00071525 |

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

**MDPI and ACS Style**

Mostafa, F.; Saha, P.; Islam, M.R.; Nguyen, N.
GJR-GARCH Volatility Modeling under NIG and ANN for Predicting Top Cryptocurrencies. *J. Risk Financial Manag.* **2021**, *14*, 421.
https://doi.org/10.3390/jrfm14090421

**AMA Style**

Mostafa F, Saha P, Islam MR, Nguyen N.
GJR-GARCH Volatility Modeling under NIG and ANN for Predicting Top Cryptocurrencies. *Journal of Risk and Financial Management*. 2021; 14(9):421.
https://doi.org/10.3390/jrfm14090421

**Chicago/Turabian Style**

Mostafa, Fahad, Pritam Saha, Mohammad Rafiqul Islam, and Nguyet Nguyen.
2021. "GJR-GARCH Volatility Modeling under NIG and ANN for Predicting Top Cryptocurrencies" *Journal of Risk and Financial Management* 14, no. 9: 421.
https://doi.org/10.3390/jrfm14090421