Hybrid Data Decomposition-Based Deep Learning for Bitcoin Prediction and Algorithm Trading
Hybrid Data Decomposition-Based Deep Learning for Bitcoin Prediction and Algorithm Trading
11 Abstract
12 Although Bitcoin has attracted significant attention from investors and policy makers, the
13 empirical works in the Bitcoin forecasting and trading support systems are still at an early stage.
14 This study proposes a novel data decomposition based hybrid bidirectional deep learning model,
15 namely VMD-LMH-BiGRU, in forecasting the daily price change in the Bitcoin market and
16 conducting algorithmic trading on the market. Two main steps are involved in our methodology
17 framework, i.e., data-decomposition for inner factors extraction, and bidirectional deep learning
18 for forecasting the Bitcoin price. The results demonstrate that the proposed model outperforms
19 four other benchmark models, including econometric models, machine learning models and deep
20 learning models. Furthermore, the proposed model achieved higher investment returns than all
21 benchmark models and the buy-and-hold strategy in the trading simulation. The robustness of the
22 model is verified through multiple forecasting periods and testing intervals.
23
24 Keywords: Bitcoin price, Variational mode decomposition, Deep learning, Price forecasting,
25 Algorithmic trading
26
27
28
202
203 where {𝑢) } and {𝜔) } are the modes and their respective center frequencies, 𝐾 denotes the
204 number of decomposed sub-signals 𝛿(𝑡) denotes the Dirac delta function, ⨂ denotes the
205 convolution operator and 𝑓(𝑡) represents the original input signal.
206
207 To obtain the optimal solution of the constrained optimization problem in Equation (5), a
208 quadratic penalty function 𝛼 and a Lagrangian multiplier 𝜆 are introduced for finite
209 convergence and constraints enforcement purposes. Thus, the augmented Lagragian multiplier
210 function 𝐿 can be obtained as follows:
215
216 The Lagrangian functions are shifted from a time domain to a frequency domain and the
217 corresponding extreme values are calculated. The modes 𝑢) and their respective central
218 frequency 𝜔) are calculated as follows:
\
VW, 𝑓X(𝜔) − ∑Z^) 𝑢UZ (𝜔 ) + [(6)
]
219 𝑢U) (𝜔) = (6)
1 + 2𝛼(𝜔 − 𝜔) )]
220
c
VW, (𝜔)
∫d 𝜔|𝑢U) (𝜔)|] 𝑑𝜔
221 𝜔) = c (7)
∫d |𝑢U) (𝜔)|] 𝑑𝜔
222
223 The optimal solution is then obtained using the alternative direction method of multipliers
224 (ADMM), and the original input signal 𝑓(𝑡) is decomposed into 𝐾 sub-signal modes.
225
226 2.2 Bidirectional GRU
227
228 Proposed by Schuster and Paliwal (1997), the bidirectional recurrent neural network
229 (BiRNN) is a recurrent neural network (RNN) that utilizes both forward and backward
230 information in the data. In this paper, the traditional RNN cells are replaced by gated recurrent
231 unit (GRU) cells. A GRU cell consists of two gates: an update gate 𝑧" and a reset gate 𝑟" . The
232 update gate 𝑧" controls the amount of new input information that enters the current state.; the
233 larger the value 𝑧" , the more the input information is updated in the cell. The reset gate 𝑟"
234 controls the amount of information from the past state that are retained in the current state; the
235 smaller the value 𝑟" , the less the historical information is kept. At time 𝑡, the cell calculations
236 are as follows:
237
250 ℎy" represents the candidate vector that controls the degree to which new input information is
251 received in the current state.
252
253 Fig. 2. Structure of the bidirectional GRU neural network
287
288 Fig. 3. Daily Bitcoin closing price
289
290 Table 1. Common descriptive statistics of Bitcoin price
Bitcoin price 2542 3056.12 3774.35 68.43 19497.4 1.3192 4.004 -1.05
291
292 The data are divided into two sets: a training set and a testing set. The preceding 90 percent
293 of the data is used to train the prediction model and the remaining 10 percent is used to evaluate
294 the model performance. Overall, the training set consists of 2290 observations from January 1,
295 2013 to April 9, 2019. The testing set contains 252 observations from April 10, 2019 to
296 December 17, 2019.
297
298 To eliminate the differences in variable dimensions, the data is adjusted and normalized
299 using the 0 − 1 normalization as shown below:
𝑥" − min 𝑥"
300 𝑥€" = (13)
max 𝑥" − min 𝑥"
301
302 where 𝑥" denotes the true value of the time series at time 𝑡, max 𝑥" and min 𝑥" are the
303 maximum and the minimum true value of the time series, respectively.
324
325 Fig. 4. Rolling Forecast Process
326
327
328 3.1.2. Forecasting performance measures
329
335
‰
1
336 𝑅𝑀𝑆𝐸 = Œ 8(𝑥U" − 𝑥" )] (15)
𝑁
"Š,
337
‰
1 𝑥U" − 𝑥"
338 𝑀𝐴𝑃𝐸 = 8 • • (16)
𝑁 𝑥"
"Š,
339
‰
1
340 𝑀𝐴𝐸 = 8|𝑥U" − 𝑥" | (17)
𝑁
"Š,
341
342 where 𝑥€" and 𝑥" , (𝑡 = 1, 2, … , 𝑁) is the predicted value and the actual value at time 𝑡, and 𝑁
343 represents the total number of data points in the testing set.
344
345 Moreover, directional accuracy (DA) is introduced to assess the market trend predictive
346 ability of the model (Yu, Wang & Lai, 2008). The larger the DA, the better the model market
347 trend predictive ability:
348
‰
1
349 𝐷𝐴 = 8 𝑎" (18)
𝑁
"Š,
350
351 where
1, (𝑥" − 𝑥"E, )(𝑥U" − 𝑥"E, ) ≥ 0
352 𝑎" = ’
0, (𝑥" − 𝑥"E, )(𝑥U" − 𝑥"E, ) < 0
397
398 Fig. 5. VMD decomposition results for the Bitcoin market price
399
419
477
478 Fig. 9. Prediction results comparison for proposed model and hybrid two-characteristics
479 models
587
588 The out-of-sample testing interval consists of 252 trading days from April 10, 2019 to
589 December 17, 2019. As illustrated in Figure 3, the Bitcoin market price experienced significant
590 fluctuations during the testing interval. From April 10, 2019 to July 11, 2019, the Bitcoin price
591 rose from $5197.75 to its highest point of $12668.62. From July 12, 2019 to December 17, 2019,
592 the price fell back down from the peak to $7046.69. Taking this into consideration, the
593 out-of-sample testing period is split into two different intervals – the “Up” interval consist of 93
594 days from April 10, 2019 to July 11, 2019. The “Down” interval consist of 159 days from July
595 12, 2019 to December 17, 2019.
596
620 4. Conclusion
621
622 Although Bitcoin has attracted significant attention from investors and policy makers, the
623 empirical works in the Bitcoin pricing forecasting models are at an early stage. This paper fills
624 the gap by proposing the VMD-LMH-BiGRU model, a novel bidirectional deep learning model
625 combined with data-decomposition techniques, to forecast the Bitcoin market price. The
626 prediction performance of the proposed model is assessed against several benchmark models,
627 including the single models, hybrid one-characteristic models and the hybrid two-characteristics
628 models.
629
630 In our study, by decomposing the original Bitcoin price time series into different inner
631 factors, the proposed model is able to effectively capture the hidden patterns of different
632 frequencies that exist in the time series. In addition, by adopting a bidirectional neural networks
633 structure, the proposed model is able to effectively capture the two-way sequential relationship
634 within the time series.
635
636 According to our empirical results, the proposed VMD-LMH-BiGRU model outperformed
637 all the benchmark models in terms of prediction accuracy across multiple forecasting periods.