## 3 Machine Learning Models
### Deep Learning Models
#### 3.3.3 Long-Short Term Memory Networks (LSTM)
Moving on to one of the most popular forecasting tasks in the financial sector, predicting the extremely volatile price of bitcoin is an investment, and as a result, there is an ever-increasing interest in materializing this kind of forecasting study. There are two main methods of predicting the price of bitcoin. The first method is based on bitcoin price time series, while the second exploits the relationship between the bitcoin price and other indicators such as the stock price, oil price, gold price, etc. The work of [PERSON] et al. [44] focuses on bitcoin price prediction through the first method, which is based on time series. The ARIMA model and machine learning algorithms such as Feedforward Neural Networks (FFNN), Convolutional Neural Networks (CNN), LSTM, and Support Vector Regression (SVR) are used comparatively in terms of the predictability of bitcoin time series. Furthermore, hybrid models are proposed to improve the prediction, which we will refer to in the rest of our work. ARIMA (6, 1, 5) model is selected to predict bitcoin price, while neural networks are trained with sampling every 1 to 14 samples, and a variable number of training epochs from 100, 200, and 500. After the computational experiment, an FFNN model is used with a sampling per 5 time-steps, 9 hidden nodes, and 100 training epochs. Also selected is the CNN model, with its characteristics being a sampling step equal to 5, 6 hidden nodes, and 200 epochs. An LSTM model with a sampling step equal to 5, 100 hidden units, and 100 training epochs is also used. SVR uses an \"rbf\" kernel and a sampling step equal to 4. The results of the RMSE and MAPE metrics showed that ARIMA had the lowest prediction error of the \"short-term\" bitcoin price, the LSTM network gave an equally good result, and among the rest, the worst-performing network was CNN. The work of [PERSON] et al. [6] uses the time series bitcoin price dataset to make predictions and compare ARIMA, LSTM, and GRU models. Specifically, the GRU (Gated Recurrent Unit) network, such as the LSTM, belongs to the category of recurrent neural networks (RNNs). Unlike LSTM, however, it has a simpler structure as it does not use an output gate but an update gate and a reset gate. These gates are vectors that \"decide\" what information will appear in the output. The results of the work show that the ARIMA model gives better results than the deep learning models for both the prediction error and the balancing time of the algorithms. ARIMA gives values of 2.76% and 302.53 for MAPE and RMSE, respectively. However, GRU performs better than LSTM, with 3.97% and 381.34 MAPE and RMSE, respectively. In a similar direction to [PERSON] et al. 's work moves [PERSON] [45]'s work on bitcoin price prediction using ARIMA and LSTM algorithms. This paper concludes that both methods can give good prediction results, while after the training period, the LSTM network shows higher prediction efficiency and accuracy. In general, using a smaller amount of past data for forecasting, LSTM can lead to better results than ARIMA, which is quite efficient in making predictions in the short term, but as the forecasting interval increases, it shows a decrease in the accuracy rate. Bitcoin price prediction through ARIMA and LSTM algorithms is also carried out in the work of [PERSON] et al. [46] where the forecast is made for the next day using the static forecast method, with or without re-estimating the forecast model at each step. Two training and test sets are considered to evaluate the predictions: In the first training set, ARIMA outperformed LSTM, but in the second training sample, LSTM outperformed ARIMA. Furthermore, in the two control set forecasting periods, LSTM with model re-estimation at each step outperformed ARIMA. The LSTM can produce forecasts closer to actual historical values than the ARIMA model. LSTM can predict the direction as well as the price of the time series at the given time period, while ARIMA only follows the trend of bitcoin prices and is unable to predict the actual prices very accurately.