3,604
Views
2
CrossRef citations to date
0
Altmetric
Research Article

Forecasting cryptocurrencies’ price with the financial stress index: a graph neural network prediction strategy

, , &

ABSTRACT

This article proposes a graph neural network strategy (GNN), in which the long short-term memory (LSTM) and graph convolution network (GCN) are applied to capture both temporal and spatial features to forecast the price of Bitcoin, Litecoin, Ethereum, and Dash Coin with the ‘stable-coin’ Tether (USDT) and financial stress index (FSI). The main results show that the GNN strategy has better performance than univariate LSTM and multivariate LSTM in all of the seven steps forward forecasting. A sensitivity check shows that USDT and FSI/sub-FSI are important factors in the construction of the graphs and they verify the validity of the results.

JEL CLASSIFICATION:

I. Introduction

Cryptocurrencies have graduated from being a niche investment to a major global investment asset. This development has seen an increasing interaction with the global ‘traditional’ financial market. The key factor that links the financial market to the cryptocurrency market is the flow of liquidity, which is driven by the activity of investors, traders, hedgers, and speculators as they move in and out of cryptocurrencies. Recently, major economies have issued strict regulations on cryptocurrency trading in an attempt to obstruct the shocks from cryptocurrencies impacting the financial system. The Tether (USDT) peg to the value of USD, which is called a ‘stable-coin’, serves as a bridge to facilitate the flow of money between the two sides. An increasingly complex connection has been observed between financial market and crypto-asset market through price volatility (Giudici and Abu-Hashish Citation2019; Giudici and Polinesi Citation2021). Therefore, network structure analysis is increasingly being used by researchers. Based on previous studies, this article proposes a graph network prediction strategy to forecast the price of Bitcoin, Litecoin, Ethereum, and Dash Coin simultaneously, while combining time-series and network dimensions.

Bitcoin returns have a complex relationship with the investors’ risk revision level (Bouri et al. Citation2021). The connectedness of Bitcoin exchange platforms varies over time. For instance, a leading exchange such as Bitfinex has a spillover effect on other exchanges (Giudici and Pagnottoni Citation2019, Citation2020). Similar to financial markets, the prediction model is based on intraday momentum and reversal can be applied in cryptocurrencies trading market (Wen et al. Citation2022). On the macro-level, Bitcoin has been found to be a safe haven against global financial stress based on quantile dependence analysis (Bouri et al. Citation2018). Moreover, Wang, Sarker, and Bouri (Citation2022) employ several wavelet-related methods with US data and find that the impact of Bitcoin price on money supply is significant.

Beyond dealing with time-series data itself, research has recently moved towards graph prediction. Kim and Kim (Citation2019) propose a fusion LSTM convolutional neural network (LSTM-CNN) model, which simultaneously captures the temporal and image features of stock data. The results show that the prediction method with image performance is better than only using the same time-series data. To solve the problems of noisy signals and missing data, Lewenfus et al. (Citation2020) propose a combination of graph signal process with deep learning in multivariate time-series prediction. Liu et al. (Citation2021) convert stock price into chart images and then use deep learning neural networks (DLNNs) to perform the forecasting. Their model obtains an average accuracy rate of 55.46% when applying Chinese stock data from 2009 to 2020. Cheng et al. (Citation2022) designed a multi-dimensional GNN prediction framework together with several algorithms. Their test results show that the GNN performs well when applying financial time series. In addition to forecasting price changes, Wei, Zhang, and Liu (Citation2021) set graphs to capture different types of spatial-temporal Bitcoin transaction patterns and forecast the transaction behaviour.

Based on these previous studies, this article contributes to the limited existing literature on cryptocurrency price predation in four ways. First, this article forecasts the price of four main cryptocurrencies instead of only focusing on Bitcoin to capture the intrinsic interactions among cryptocurrencies. Second, this article includes the financial stress index (FSI) in the graph to make the prediction, which is able to capture the bilateral spillover effect between the cryptocurrency market and the traditional financial market. Third, considering the important role of USDT for money flowing in the financial system, this article embeds USDT as a node into the graph. Finally, the method developed by Diebold and Yilmaz (Citation2009) is applied in this article to obtain the spillover index of the variables as the values of the boundaries between each node in the graph, which enables the application of the GNN strategy. The overall research framework is given in .

Figure 1. Framework of the model.

Note: the formulations of mathematical terms for GNN are given in the appendix.
Figure 1. Framework of the model.

II. Main results

The details of data and methodology are given in the appendix. We use max-min normalization to deal with the original data to eliminate dimensional differences. The sample data were linearly transformed into the range of [0, 1]. We then obtain the final results and transfer the prediction data back through the reverse process of the normalization. To test the GNN’s prediction performance, following the relevant previous studies (e.g. Kim and Kim Citation2019; Lewenfus et al. Citation2020), this article employs univariate and multivariate LSTM for comparison. The parameter settings of the deep learning methods are given in .

Table 1. Parameter settings of the deep learning methods.

Similar to previous studies, Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), and Root Mean Square Error (RMSE) are selected here as a performance assessment. The results of different prediction steps (from +1 day to +7 days) are given in .

Table 2. Comparing prediction errors of GNN using FSI with other models.

It can be observed that the GNN strategy gives a better prediction result than univariate and multivariate LSTM in each of the prediction steps. Specifically, the performance of GNN with FSI strategy is better in prediction step +4 days, +5 days, and +6 days, while GNN with sub-FSI strategy gives a better result in prediction +7 days. These results suggest that FSI has a significant relationship with cryptocurrencies, which is similar to the findings of Bouri et al. (Citation2018) showing bilateral effects between the global financial stress index and Bitcoin returns. However, it is difficult to clearly distinguish the performance between the two GNN methods in the prediction step of +1 day, +2 days, and +3 days. GNN with FSI method has lower MAPE but higher MAE and RMSE when comparing GNN with sub-FSI in the first four prediction steps.

In general, MAE, MAPE and RMSE become larger as the prediction steps increase from +1 day to +4 days, which shows that the accuracy and robustness of the long prediction is weaker than the short prediction. This result is consistent with the expectations of similar research. As shown in , the training loss of the GNN with FSI decreases quickly and becomes convergent after seven epochs. Meanwhile, the training loss of the GNN with sub-FSI has the same trend and becomes convergent after four epochs. Moreover, the training loss is more clustered in the GNN with sub-FSI, which shows that this method has better fitting in general.Footnote1 This article has checked for robustness by applying the Granger causality and Bayesian graphical to obtain correlation index of the variables. The results in confirm the stability of our GNN strategy. To verify the effectiveness of the strategy used in this article, a sensitivity analysis with GNN is provided in the appendix.

Figure 2. Training loss of the forecasting steps.

Figure 2. Training loss of the forecasting steps.

III. Conclusion

Based on the complex links between cryptocurrency market and trading financial markets through money flow, this article proposes a GNN strategy in which the LSTM and GCN are applied as temporal feature and spatial feature, respectively, to forecast the price of Bitcoin, Litecoin, Ethereum, and Dash Coin with USDT and FSI/sub-FSI. Compared with all seven forward steps of the forecasting results of the two popular machine-learning methods – univariate LSTM and multivariate LSTM –, the results of the GNN strategy show better performance with smaller MAE, MAPE, and RMSE. This shows that including the network effects of cryptocurrencies and financial markets in the prediction model can improve the prediction accuracy, which suggests the complex connectedness between the two. In addition, a comparison of the results between GNN with FSI and with sub-FSI gives a hint that a better performance in predicting the whole graph cannot guarantee a higher forecasting accuracy for all of the variables. The heterogeneity among the forecasting accuracy of the cryptocurrencies reveals the market’s efficiency. Furthermore, investor behaviours tend to be the key factors that deter the price of cryptocurrencies. Another sensitivity check shows that the GNN strategy without FSI/sub-FSI or USDT performance was worse than the original, which gives evidence for the validity of forming graph with FSI/sub-FSI and USDT.

Our findings show the power of the GNN strategy in forecasting the price of cryptocurrencies, which provide a new way for investors to predict and set their investment portfolios. For governments and regulators, it is clear that cryptocurrency market cannot be isolated from the financial system.

Disclosure statement

No potential conflict of interest was reported by the author(s).

Additional information

Funding

This work was supported by the National High Technology Research and Development Program of China [2021QY2100].

Notes

1 A further check of the performance of the GNN with FSI and with sub-FSI is given in appendix.

2 Litecoin, Ethereum, and Dash coin are technically highly correlated to Bitcoin, and have comparatively high market value.

3 The sample starts from 10 August 2015. The reason is that firstly, the trading data of Ethereum started from August 2015. Secondly, the People’s Bank of China reformed RMB exchange rate on 11 August 2015, which was a significant issue for global financial market.

4 Granger causality (Billio et al. Citation2012) and Bayesian graphical (Ahelegbey, Billio, and Casarin Citation2016) methods are applied to get the matrix here to use as robustness check. The results are given in in the appendix.

5 VAR model with order 3. All of the data used in the VAR are stable. The test results are available upon request.

References

  • Ahelegbey, D. F., M. Billio, and R. Casarin. 2016. “Bayesian Graphical Models for Structural Vector Autoregressive Processes.” Journal of Applied Econometrics 31 (2): 357–386. doi:10.1002/jae.2443.
  • Ahelegbey, D. F., P. Giudici, and F. Mojtahedi. 2021. “Tail Risk Measurement in Crypto Assets Markets.” International Review of Financial Analysis 73: 101604. doi:10.1016/j.irfa.2020.101604.
  • Billio, M., M. Getmansky, A. W. Lo, and L. Pelizzon. 2012. “Econometric Measures of Connectedness and Systemic Risk in the Finance and Insurance Sectors.” Journal of Financial Economics 104 (3): 535–559. doi:10.1016/j.jfineco.2011.12.010.
  • Bouri, E., R. Gupta, C. K. M. Lau, and D. Roubaud. 2021. “Risk Aversion and Bitcoin Returns in Extreme Quantiles.” Economics Bulletin 41 (3): 1374–1386.
  • Bouri, E., R. Gupta, C. K. M. Lau, D. Roubaud, and S. Wang. 2018. “Bitcoin and Global Financial Stress: A Copula-Based Approach to Dependence and Causality in the Quantiles.” The Quarterly Review of Economics and Finance 69: 297–307. doi:10.1016/j.qref.2018.04.003.
  • Cheng, D. W., F. Z. Yang, S. Xiang, and J. Liu. 2022. “Financial Time Series Forecasting with Multi-Modality Graph Neural Network.” Pattern Recognition 121: 108218. doi:10.1016/j.patcog.2021.108218.
  • Diebold, F. X., and K. Yilmaz. 2009. “Measuring Financial Asset Return and Volatility Spillovers, with Application to Global Equity Markets.” The Economic Journal 119 (534): 158–171. doi:10.1111/j.1468-0297.2008.02208.x.
  • Giudici, P., and I. Abu-Hashish. 2019. “What Determines Bitcoin Exchange Prices? A Network VAR Approach.” Finance Research Letters 28: 309–318. doi:10.1016/j.frl.2018.05.013.
  • Giudici, P., and P. Pagnottoni. 2019. “High Frequency Price Change Spillovers in Bitcoin Exchange Markets.” Risks 7 (4): 111. doi:10.3390/risks7040111.
  • Giudici, P., and P. Pagnottoni. 2020. “Vector Error Correction Models to Measure Connectedness of Bitcoin Exchange Markets.” Applied Stochastic Models in Business and Industry 36 (1): 95–109. doi:10.1002/asmb.2478.
  • Giudici, P., and G. Polinesi. 2021. “Crypto Price Discovery Through Correlation Networks.” Annals of Operations Research 299 (1–2): 443–457. doi:10.1007/s10479-019-03282-3.
  • Kim, T., and H. Y. Kim. 2019. “Forecasting Stock Prices with a Feature Fusion LSTM-CNN Model Using Different Representations of the Same Data.” PLOS One 14 (2): e0212320. doi:10.1371/journal.pone.0212320.
  • Lewenfus, G., W. A. Martins, S. Chatzinotas, and B. Ottersten. 2020. “Joint Forecasting and Interpolation of Time-Varying Graph Signals Using Deep Learning.” IEEE Transactions on Signal and Information Processing Over Networks 6: 761–773. doi:10.1109/TSIPN.2020.3040042.
  • Liu, Q. F., Z. Y. Tao, Y. M. Tse, and C. J. Wang. 2021. “Stock Market Prediction with Deep Learning: The Case of China.” Financial Research Letters 46 (A): 102209. doi:10.1016/j.frl.2021.102209.
  • Lu, Z. L., W. F. Lv, Y. B. Cao, Z. P. Xie, H. Peng, and B. Du. 2020. “LSTM Variants Meet Graph Neural Networks for Road Speed Prediction.” Neurocomputing 400: 34–45. doi:10.1016/j.neucom.2020.03.031.
  • Naeem, M. A., E. Bouri, Z. Peng, S. J. H. Shahzad, and X. V. Vo. 2021. “Asymmetric Efficiency of Cryptocurrencies During COVID19.” Physica A: Statistical Mechanics and Its Applications 565: 125562. doi:10.1016/j.physa.2020.125562.
  • Smyl, S. 2020. “A Hybrid Method of Exponential Smoothing and Recurrent Neural Networks for Time Series Forecasting.” International Journal of Forecasting 36 (1): 75–85. doi:10.1016/j.ijforecast.2019.03.017.
  • Wang, L., P. K. Sarker, and E. Bouri. 2022. ”Short- and Long-Term Interactions Between Bitcoin and Economic Variables: Evidence from the US.” Computational Economics, forthcoming. doi:10.1007/s10614-022-10247-5.
  • Wei, W. Q., Q. Zhang, and L. Liu. 2021. “Bitcoin Transaction Forecasting with Deep Network Representation Learning.” IEEE Transactions on Emerging Topics in Computing 9 (3): 1359–1371. doi:10.1109/TETC.2020.3010464.
  • Wen, Z., E. Bouri, Y. Xu, and Y. Zhao. 2022. “Intraday Return Predictability in the Cryptocurrency Markets: Momentum, Reversal, or Both.” North American Journal of Economics and Finance 62: 101733. doi:10.1016/j.najef.2022.101733.
  • Yu, B., H. Yin, and Z. Zhang. 2018. ”Spatio-Temporal Graph Convolutional Networks: A Deep Learning Framework for Traffic Forecasting.” In: Twenty-Seventh International Joint Conference on Artificial Intelligence IJCAI-18. doi: 10.24963/ijcai.2018/505.

Appendix

1. The formulations in mathematical terms of GNN

Here we use the method in Yu et al. (Citation2018). Denote M as time steps. n is the total number of variables. Ci stands for ith observation’s feature vector length. Hence, the eigenvector of the graph can be written as XRM×n×Ci.

(1) Gated CNNs for Extracting Temporal Features

The temporal convolutional layer contains a 1-D causal convolution with a width-Kt kernel (t stands for time) followed by gated linear units (GLUs) as a non-linearity. For each node in graph G, the temporal convolution explores Kt neighbours of input elements without padding, leading to shorten the length of sequences by Kt1 each time. Thus, the input of temporal convolution for each node can be regarded as a length- M sequence with Ci channels as XRM×Ci. The convolution kernel ΓRKt×Ci×2Co is designed to map the input X to a single output element PQRMKt+1×2Co (P, Q is split in half with the same size of channels). As a result, the temporal gated convolution can be defined as,

(A1) ΓτX=PσQRMKt+1×Co(A1)

where P,Q are input of gates in GLU, respectively; denotes the element-wise Hadamard product. The sigmoid gate σQ controls the input P of the current states which are relevant for discovering compositional structure and dynamic variances in a time series.

(2) Graph CNNs for Extracting Spatial Features

The graph convolution operator G can be extended to multi-dimensional tensors. For a signal withCi channels XRn×Ci, the graph convolution can be generalized by,

(A2) yj=i=1CiΘi,jLxiRn,1jCo(A2)

with the Ci×Co vectors of Chebyshev coefficients Θi,jRK (Ci, Co are the size of input and output of the feature maps, respectively). The graph convolution for 2-D variables is denoted as ΘGX with ΘRK×Ci×Co. Specifically, the input of traffic prediction is composed of M frame of graphs. Each frame vt can be regarded as a matrix whose column i is the Ci-dimensional value of vt at the ith node in graph G, as XRn×Ci (in this case, Ci=1). For each time step t of M, the equal graph convolution operation with the same kernel Θ is imposed on XtRn×Ci in parallel. Thus, the graph convolution can be further generalized in 3D variables, which are noted as ΘGX with XRM×n×Ci.

(3) Spatio-temporal Convolutional Block

The input and output of ST-Conv blocks are all 3D tensors. For the input vlRM×n×Cl of block l, the output vl+1RM2Kt1×n×Cl+1 is computed by

vl+1=Γ1lTReLUΘlGΓ0lTvl,

where Γ0l, Γ1l are the upper and lower temporal kernel within block l, respectively; Θlis the spectral kernel of graph convolution; ReLU denotes the rectified linear units function. After stacking two ST-Conv blocks, we attach an extra temporal convolution layer with a fully connected layer as the output layer in the end. The temporal convolution layer maps the outputs of the last ST-Conv block to do a single-step prediction. We can then obtain a final output ZRn×c from the model and calculate the speed prediction for n nodes by applying a linear transformation across c-channels as vˆ=Zw+bwRc is the weight vector and b is the bias.

2. Data and Methodology

2.1. Data

The price data of the four main trading cryptocurrencies – Bitcoin, Litecoin, Ethereum, and Dash CoinFootnote2 – and the data of Tether priced by USD were collected from https://coinmarketcap.com/. We collected the Financial Stress Index together with three sub–Financial Stress Indices (FSI; financial stability index of USA, financial stability index of other advanced economies, financial stability index of emerging markets) from the US Office of Financial Research (https://www.financialresearch.gov/financial-stress-index/). Because the FSI and sub-FSI only record the daily data of working days, we match them to the corresponding working day’s cryptocurrency data. The total sample is from 10 August 2015 to 31 December 2021,Footnote3 including 1612 daily observations. We use the data from 10 August 2015 to 30 November 2021 to train and test the Graph Neural Network (GNN). The last month data of 2021 is used to make the forecast. The variable definition and summary statistics are given in .

Table A1. Variable definition and summary statistics.

2.2. Methodology

To indicate the impact of the connectedness between the cryptocurrencies and FSI/sub-FSI into the time series forecasting model and fully use the power of deep learning, this article proposes a GNN strategy with LSTM to predict the prices of the four cryptocurrencies with FSI/sub-FSI. GNN is a powerful tool to dig for correlation information of the variables in a network. Meanwhile, LSTM is a popular tool for time series prediction, which can solve the vanishing gradient problem to improve the forecasting accuracy.

With the daily data of the cryptocurrencies and FSI/sub-FSI, we set a six nodes graph and an eight nodes graph by using each variable as the node and the spillover index as the edge. We then apply the GNN strategy to forecast the final results. The temporal feature is LSTM, following the method of Lu et al. (Citation2020) and Smyl (Citation2020); while the graph convolution network (GCN) is applied as a spatial feature. The overall research framework is given in .

Cryptocurrency markets are linked to the traditional financial markets through money flow networks, such as the USDT channel. To set a spatial and time structural graph of cryptocurrencies, USDT and FSI, this article follows the method developed by Diebold and Yilmaz (Citation2009) to get the return spillover matrix of the variables to form the graph.Footnote4 The returns of the four cryptocurrencies and USDT are used to calculate the change in Ln price. FSI and sub-FSI are taken as the value of first difference. The variance decompositions are then obtained through a vector autoregressive model (VAR).Footnote5 The spillover index matrix with FSI for returns is given in .

Table A2. Spillover index matrix with FSI.

There are three key factors that can be noted in , which are the contribution to others, the contribution from others, and the contribution to own. The ijth entry of the table denotes the spillover from variable i to variable j. It can be observed that each variable has the highest spillover over to itself and it also gives an impact to others. The results show that there is a network bilateral effect among the variables and also a continuous effect coming from time series. The spillover index matrix with sub-FSI is reported in .

Table A3. Spillover index matrix with sub-FSI.

Every variable in the matrix represents a node in the prediction graph. Each node has two boundaries that link to others, which are the spillover effect to and from others, respectively. Every node has one edge to itself, which measures the spillover contribution from itself. The two prediction graphs and the embedded methods are shown in .

Figure A1. Structural of prediction graph with FSI and with sub-FSI.

Note: The one-way arrow shows time series effect and two-way arrow represents bilateral relationship between two variables.
Figure A1. Structural of prediction graph with FSI and with sub-FSI.

3. The definitions of MAE, MAPE, and RMSE

Table A4. The definitions of MAE, MAPE, and RMSE.

4. Robustness check of using the matrix obtained by Granger causality and Bayesian graphic

Table A5. Robustness check of using the matrix obtained by Granger causality and Bayesian graphic.

5. Further check of the performance of the GNN with FSI and with sub-FSI

This article conducts a further check of the performance of the GNN with FSI and with sub-FSI by comparing the forecast results of the two strategies among prediction steps of +1 day, +2 days, +3 days, and +4 days. The results are shown in . When focusing on the similarity, it is clear that GNN with sub-FSI provides better performance in forecasting BTC and LTC. Meanwhile, GNN with FSI gives better prediction to ETH and DASH. These results show that the GNN strategy with the lowest MAE and RMSE cannot guarantee the best forecasting in every node of the graph. This gives a hint that the whole graph prediction has this weakness. Each graph in our article has its own advantages. Viewing from finance theory, the prediction differences may reveal the heterogeneity in market efficiency among cryptocurrencies, which is consistent with the findings of Naeem et al. (Citation2021). Specifically, BTC was classified as ‘speculative’ and ‘diversification’ asset, while ETH was treated as ‘professional’ and ‘complementary’ based on the analysis of tail risk measurement (Ahelegbey, Giudici, and Mojtahedi Citation2021). Considering that BTC is the most important node with the highest price and trading volume in the graph, it can be seen that the GNN with sub-FSI method has overall better performance in the predictions of +1 day, +2 days, +3 days, and +4 days.

Figure A2: Comparison of the predicted prices of the cryptocurrencies between with FSI and sub-FSI.

Figure A2: Comparison of the predicted prices of the cryptocurrencies between with FSI and sub-FSI.

6. Sensitivity analysis with GNN

To verify the effectiveness of the strategy used in this article, provides a sensitivity analysis with GNN. It is clear that the prediction accuracy of the method drops significantly when FSI or sub-FSI are excluded from the embedding graph. These findings further show that the variable USDT should be included when forecasting the price of these four cryptocurrencies with GNN. It should also be noted that the GNN method gives much worse forecasting results when variables FSI/sub-FSI and USDT are excluded from the graph, especially when making long prediction steps.

Table A6. Sensitivity check of excluding the FSI and USDT.