# Ensemble Deep Learning Models for Forecasting Cryptocurrency Time-Series
## 5 Numerical Experiments  
In this section, we evaluate the performance of the three presented ensemble strategies which utilize advanced deep learning models as component learners. The implementation code was written in Python 3.4 while for all deep learning models Keras library [40] was utilized and Theano as back-end. For the purpose of this research, we utilized data from 1 January 2018 to 31 August 2019 from the hourly price of the cryptocurrencies BTC, ETH and XRP. For evaluation purposes, the data were divided in training set and in testing set as in [7,11]. More specifically, the training set comprised data from 1 January 2018 to 28 February 2019 (10,177 datapoints), covering a wide range of long and short term trends while the testing set consisted of data from 1 March 2019 to 31 August 2019 (4415 datapoints) which ensured a substantial amount of unseen out-of-sample prices for testing. Next, we concentrated on the experimental analysis to evaluate the presented ensemble strategies using the advanced deep learning models CNN-LSTM and CNN-BiLSTM as base learners. A detailed description of both component models is presented in Table 1. These models and their  
Figure 3: Stacking ensemble of deep learning models. hyper-parameters were selected in previous research [7] after extensive experimentation, in which they exhibited the best performance on the utilized datasets. Both component models were trained for 50 epochs with Adaptive Moment Estimation (ADAM) algorithm [41] with a batch size equal to 512, using a mean-squared loss function. ADAM algorithm ensures that the learning steps, during the training process, are scale invariant relative to the parameter gradients. The performance of all ensemble models was evaluated utilizing the performance metric: Root Mean Square Error (RMSE). Additionally, the classification accuracy of all ensemble deep models was measured, relative to the problem of predicting whether the cryptocurrency price would increase or decrease on the next day. More analytically, by analyzing a number of previous hourly prices, the model predicts the price on the following hour and also predicts if the price will increase or decrease, with respect to current cryptocurrency price. For this binary classification problem, three performance metrics were used: Accuracy (Acc), Area Under Curve (AUC) and \(F_{1}\)-score (\(F_{1}\)). All ensemble models were evaluated using 7 and 11 component learners which reported the best overall performance. Notice that any attempt to increase the number of classifiers resulted to no improvement to the performance of each model. Moreover, stacking was evaluated using the most widely used state-of-the-art algorithms [42] as meta-learners: Support Vector Regression (SVR) [43], Linear Regression (LR) [44], \(k\)-Nearest Neighbor (\(k\)NN) [45] and Decision Tree Regression (DTR) [46]. For fairness and for performing an objective comparison, the hyper-parameters of all meta-learners were selected in order to maximize their experimental performance and are briefly presented in Table 2. \begin{table}
\begin{tabular}{c l} \hline \hline
**Model** & \multicolumn{2}{c}{**Description**} \\ \hline CNN-LSTM & Convolutional layer with 32 filters of size (2, ) and padding = “same”. \\  & Convolutional layer with 64 filters of size (2, ) and padding = “same”. \\  & Max pooling layer with size (2, ) \\  & LSTM layer with 70 units. \\  & Fully connected layer with 16 neurons. \\  & Output layer with 1 neuron. \\ \hline CNN-BiLSTM & Convolutional layer with 64 filters of size (2, ) and padding = “same”. \\  & Convolutional layer with 128 filters of size (2, ) and padding = “same”. \\  & Max pooling layer with size (2, ). \\  & BiLSTM layer with 2 × 70 units. \\  & Fully connected layer with 16 neurons. \\  & Output layer with 1 neuron. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameter specification of two base learners.