ORIGINAL PAPER
DOI: 10.26794/2587-5671-2022-26-4-95-108 JEL C53, D53, E4
(CO ]
Application Deep Learning to Predict Crypto Currency Prices and their Relationship to Market Adequacy (Applied Research Bitcoin as an Example)
M. Kh. Abdalhammeda, A. M. Ghazalb, H. M. ibrahimc, A. Kh. Ahmedd
a' c' d Tikrit University - College of Administration and Economics, Tikrit, Iraq; b Damascus University, Damascus, Syrian
ABSTRACT
Predicting currency rates is important, for everyone who is trading and trying to build an investment portfolio from a range of crypto currencies. It is not subject to the same restrictions as fiat currencies. In this study, we seek to predict the exchange rate of BIT-COIN against the US dollar. The short-term data (365 observations) is processed using the LSTM model as one of the neural network models. Modeling is conducted by training a sample size of 67%, taking into account sharp fluctuations in the price of trade and a certain level of market efficiency. The GARCH model is used to select appropriate historical periods for how the LSTM model works and to test proficiency at the weak, semi-strong, and strong levels. The data series obtained from the website (Investing.com) have been processed. The researchers have found that the performance of the neural network improves as the EPOCH value increases with a training (research) period of 50 days before, which is consistent with the results of the proficiency test at the weak level. It agrees with the results of the sufficiency test at the weak level, which indicates that in the case under study (the Bitcoin market is effective at the weak level). It is advised that crypto-currency investors rely more on the historical trend of the price of the currency than on its current price, taking advantage of the artificial neural network model (LSTM) in dealing with little data of high volatility.
Keywords: cryptocurrency; GARCH model; deep learning; artificial neural networks; LSTM model
BY 4.0
For citation: Abdalhammed M. Kh., Ghazal A. M., ibrahim H. M., Ahmed A. Kh. Application deep learning to predict crypto currency prices and their relationship to market adequacy (applied research bitcoin as an example). Finance: Theory and Practice. 2022;26(4):95-108. DOi: 10.26794/2587-5671-2022-26-4-95-108
ОРИГИНАЛЬНАЯ СТАТЬЯ
Применение глубокого обучения для прогнозирования цен на криптовалюты и их взаимосвязь с адекватностью рынка (прикладное исследование на примере биткоина)
М. Х. Абдалхаммед3, А. М. Газаль", Х. М. Ибрагимс, А. Х. Ахмед11
a' c' d Тикритский университет - Колледж администрации и экономики, Тикрит, Ирак; b Дамасский университет,
Дамаск, Сирия
АННОТАЦИЯ
Прогнозирование курсов валют важно для всех, кто занимается трейдингом и пытается построить инвестиционный портфель из ряда криптовалют. На них не распространяются те же ограничения, что и на фиатные валюты. Цель исследования - спрогнозировать курс BITCOIN по отношению к доллару США. Краткосрочные данные (365 наблюдений) обработаны с помощью модели LSTM как одной из нейросетевых моделей. Моделирование проведено путем обучения выборки объемом 67% с учетом резких колебаний цены торгов и определенного уровня эффективности рынка. Модель GARCH использована для выбора подходящих исторических периодов для определения того, как работает модель LSTM, и для проверки эффективности на слабом, полусильном и сильном уровнях. Обработаны ряды данных, полученных с веб-сайта (Investing.com). Авторы обнаружили, что производительность нейронной сети улучшается по мере увеличения значения EPOCH при периоде обучения (исследования) в 50 дней, что согласуется с результатами проверки мастерства на слабом уровне. Это согласуется с результатами теста на достаточность на слабом уровне, что свидетельствует о том, что в исследуемом случае рынок биткоина эффективен на слабом уровне. Сделан вывод, что криптовалютным
© Abdalhammed M. Kh., Ghazal A. M., Ibrahim H. М., Ahmed A. Kh., 2022
инвесторам лучше больше полагаться на исторический тренд цены валюты, чем на ее текущую цену, используя преимущества модели искусственной нейронной сети (LSTM) при работе с небольшими данными высокой волатильности.
Ключевые слова: криптовалюта; модель GARCH; глубокое обучение; искусственные нейронные сети; модель LSTM
Для цитирования: Abdalhammed M. K., Ghazal A. M., ibrahim H. М., Ahmed A. K. Employing deep learning to predict crypto currency prices and their relationship to market adequacy (an applied study on bitcoin). Финансы: теория и практика. 2022;26(4):95-108. DOi: 10.26794/2587-5671-2022-26-4-95-108
INTRODUCTION
In a world characterized by rapid digital growth, the encrypted (digital) currency is one of the worthy investment opportunities for many people in different parts of the world, as it can be considered a new type of financial asset. It needs a careful study, as it has restrictions that differ from the restrictions imposed on traditional currency. Investors in this type of asset (cryptocurrency) must understand the market, learn to deal with its volatility and take into account modern forecasting methods that can align with some type of value chain for these assets over time. Money experts believe that Bitcoin can be considered the first digital currency in the world, as it has taken the lead since the inception of cryptocurrency trading as the highest value among its cryptocurrency competitors when comparing its declared values on trading platforms. The options available to investors to build their investment portfolios should not be overlooked, such as the inclusion of many other cryptocurrencies, which seems interesting, even if its values are somewhat low or not highlighted with interest such as Bitcoin. However, it can share the latter with competition as promising investment opportunities, with positive guidance by investors, and to be taken into account, such as Ripple, Ethereum and Bitcoin Cash. The shortcomings of most view investors are the primary means of investing in the cryptocurrency market. It is manifested in the fact that it does not exceed the purchase of these currencies, keeping them, or storing a percentage of them until a later trading date. To surprise them with the rapid development of its digital confidence (the inability to break its code or the development of generations of quantum computers) and the increase in the demand for investment in it, it is made clear to them that the aforementioned investment methods are not the only ways in front of them, and it becomes clear to them that investing in contracts for differences for encrypted currencies is one of the most promising ways that is possible to invest in this type of assets. It summarizes that the value of the mark can be considered a commodity, and
here comes the role of predicting its fluctuations, meaning predicting the differences in its previous values from the current ones. Gains in common with other methods allow the investor to trade over time, with the added advantage that they do not allow for losses (going down on the value of the underlying commodity). It gives forecast a major role in dealing with currency fluctuations and gives it an exceptional advantage that may outweigh the importance of the decision to invest in this type of assets, especially if it departs a little from traditional methods, and models that often need assumptions that may not be achievable. This leads to treating them in ways that may lose credibility, so to speak, in reference to simulating machine learning of the series of fluctuations of those currencies over time, with a special reference to their digital dealing with both the prediction method and the origin of the currency code. It is worth noting, that there are many reasons that have led to an increase in investor options, such as the expansion of the currency market as a result of the multiplicity of alternative cryptocurrencies, which has fueled competition in terms of the large number of traders or the increase in their value on the one hand, and the increase in the desire of countries trying to lead the world as governments or banks supported by them (such as China) which is looking forward or initiating the issuance of its own cryptocurrency, similar to its global counterparts. The value of Bitcoin has reached about $ 20 thousand (a boom in late 2017), with investors cautiously anticipating such kind of booms that they hope to happen again, and they want them to be the result of an interaction of natural factors, to bring their confidence down to its lowest levels as a result of the sudden collapse shortly after the boom time. Most of the investors have found that their intuition is true when they expected that the process is nothing more than a misleading manipulation, and some others guessed, that unsystematic manipulation in the market could be considered a possible cause of the market crash. A few of them saw that the occurrence
of the boom in any form or time is the result of coordinated manipulation currency rates. The vast majority of them are assured that the occurrence of a negative boom over time is a natural thing, and that the dwindling of opportunities does not mean that there is no possibility of profit. In the event that things proceed normally for those investors who do not prefer to risk, bearing in mind not to expect a repeat of the boom (2017), and we should not fail to mention, in addition to the importance of predicting currency fluctuations, and ensuring the success of the investment process in crypto currencies (encrypted) must be noted. Taking note of the most important matters related to the market before the intention to invest in the currency, as well as the assets with few fluctuations over time, which the investor thinks of acquiring in his investment portfolio by increasing diversification to reduce risks, especially with a modern type in the world of investment based on rapidly developing technology and a world that abandoned barter long ago and wants by giving up tangible currency.
RESEARCH PROBLEM
Deep learning models have proven their ability to make predictions much better than traditional standard models, but this is closely related to the number of observations. Better prediction, as the artificial neural network model is used in many areas, the most important of which is the prediction of cryptocurrency prices. Researchers use daily data, and over a large period, these models have proved the ability to perform the task of forecasting accurately. Their superiority over the classical models is witnessed. The difficulty of our task is ability of neural networks models to deal with short data to get the best prediction, taking into account the type of neural network used and previous periods, depending on an economic point of view. The research problem can be posed through the following questions:
1. Can Vanilla LSTM Simple Deep Learning Model give accurate Bitcoin price predictions?
2. Does the prediction performance of artificial neural network change model improve?
3. Does a change in the LOOK UP period change the predictive accuracy of the model?
4. Does increasing Epochs improve the predictive ability of the model?
RESEARCH HYPOTHESES
Based on the research problem, the following hypotheses can be formulated:
1. The VANILA LSTM simple deep learning model does not give accurate Bitcoin price predictions.
2. Does the prediction performance of artificial neural network change model improve?
3. A change in the LOOK UP period does not change the model's predictive accuracy.
4. Increasing EPOCHES does not improve the predictive ability of the model.
SiGNiFiCANCE OF RESEARCH
The importance of the research stems from attempting to find a way to process little data in the field of financial markets using neural networks, to maximize the performance of the model, when there is not enough data, or to limit the knowledge of the beneficiary to part of the data. This opens a horizon to help future researchers and beneficiaries to choose the appropriate model with Parameters that can improve the model's predictive accuracy, in particular the network type, size of EPOCHES and LOOK UP periods. It is also a review of previous studies in this context, and an addition to our Arab library with a kind of dealing with this type of technology in the field of encrypted digital currencies, and encouraging researchers to probe the depths of such complex problems in a modern scientific and technical manner.
LiTERATURE REViEW
Neural network technology is a relatively new field, where investors pin their hopes on it in the field of trading in the electronic markets. It has attracted increasing attention from researchers, where J. Brownlee [1], and (S. Galeshchuk and S. Mukherjee 2017 [2] presented a study in the field of Neural Network to address the problem of traders' dependence on this technology, and the result was always positive? The study aims to demonstrate the correct understanding of neural network technology, and considering it vital in order to apply it correctly as a new approach and method for technical analysis and opportunity detection by analyzing price data to make profit using this network. It can provide more accuracy and reliable information about the trading idea, and concludes that neural networks can rival the classic methods according to the preferences of the trader and encourage the development of the idea to use with money management rules to succeed as a profitable strategy. The positive results indicate that the neural network supports the idea of the trading strategy without over-fitting the strategy of the market. It is possible to develop strategies similar to
the euro against the US dollar and develop according to historical and accurate data. The researchers see the possibility of generalizing the prediction of neural networks on crypto currencies to predict their fluctuations, because forex is a trading platform whose trades fluctuate faster than digital currencies. However, in most cases, it stands unable to play its role when one of its assumptions is violated, to give results that do not suit the investors' orientations despite the accuracy of most of them when the rationale of the model is integrated in terms of mathematical and temporal terms. In 2019, the researchers Ionela and Alina [3] conducted a study to emphasize the importance of forecasting the exchange rate using Box-Jenkins time series models (Automatic Regression Moving Average Models (ARIMA). They applied the classic and modern methods that depend on advanced tools in forecasting for the purpose of analyzing the exchange rate. EUR/RON exchange and forecast. They employed several candidate processes (AR, MA, and ARMA) to select the best model based on a strategy summarized using an initial time series. To test the specifications of the models that were employed to determine the best ones, to detect the quality of performance and prediction of the EUR / RON exchange rate and then compare the accuracy of this prediction with the real level recorded by the real exchange rate. The empirical results of the fitness tests have shown good predictive power, which is very close to the expectations of financial analysts in the financial market. In 2019, Derbentsev et al., [4] employed machine learning approaches such as classical classification algorithms, regression trees (C&RT) and ARIMA autoregressive models, to build a short-term (5-30 day) prediction model for the prices of certain cryptocurrencies (Bitcoin, Ethereum, and Ripple). The researchers have found that the proposed approach is more accurate than the ARIMA-ARFIMA models in predicting the prices of these currencies within periods of slow rise (fall) and also within periods of transitional dynamics, i.e. changing the trend from decline to rise. Lu et. al. [5] (2020) proposed a method for forecasting the stock price for the next day by employing neural network techniques such as CNN-LSTM by closing the stock price. The researchers have relied on the advantage of combining the advantages of a convolutional neural network (CNN) for its ability to extract efficient features from the data used, and long-term memory (LSTM) for its ability to automatically detect the best fit for the relevant situation related to the data,
thus improving the accuracy of the stock price prediction accurately. In fact, the CNN-LSTM model uses CNN to extract the features of the input time data and uses the LSTM to predict the closing price of a stock on the next day. To show the effectiveness of the model, daily transaction data for 7,127 trading days are adopted. In the same year, Xue et al. [6] (2020) presented a financial forecasting model based on the deep LSTM network. It is compared with the traditional RNN and the BP neural network. The results of the proposed model (LSTM deep neural) have demonstrated a high quality of effective prediction for high-resolution stock market time-series forecast. Chaudhari et al. [7])2020) presented their study entitled "Forecasting cryptocurrency exchange rates using machine learning", as a model of cryptocurrency prices, especially currencies (Bitcoin, Ethereum and Litecoin) by employing traditional models to predict the future of time series such as ARIMA model, and machine learning models such as LSTM deep learning algorithm. When testing the models on the data series based on the historical price of the aforementioned currencies, it is found that the LSTM model has a clear superiority over the models under study. Machine learning models have achieved substantial results that have proven their ability to perform well for various forecasts and other predictions, and can be employed in various other sectors such as forecasting stock prices or financial markets. Maleki et. al. [8] (2020) presented a paper aimed at predicting the price of Bitcoin based on analysis of price data for four different cryptocurrencies in order to understand the main trends and see if their chain is stable. Practically, the price behavior of each digital currency follows a random walk process, which makes it difficult to predict. Because it is an unstable behavior, researchers have overcome this obstacle by using many different ways to create a stable time series, through many statistical tests such as the Dickey test Fuller (DF), DF-GLS test, Augment Dickey-Fuller test (ADF), ERS-point primal test and Ng-Peron test, Phillips-Perron test on equations to test their related hypotheses. In an effort to make the Bitcoin daily price data series constant, the cross-integration is examined to enable the use of different models. Their approach ensures co-integration by returning the first variable (Y) to the second variable to obtain the equation Y-bX. They employed the enhanced Dickey-Fuller test to check whether the random behavior is sustainable or not. The best delay in the model is found based on several different
Fig. 1. LsTM network redundancy module has four interacting layers
Source: Yu Y. et al. [11]. URL: https://arabicprogrammer.com/article/4117317328/ (accessed on 19.07.2022).
achievement criteria. They have found from analysis with statistical models such as AR, MA, ARIMA and ANFIS which have been applied as smart methods that combine fuzzy and artificial neural networks that Z-cash has the best bitcoin price prediction compared to bitcoin price prediction with Ethereum and Litecoin. The current study is distinguished from previous studies in that it deals with few views, as the number of views reached (365) observations. It attempts to take advantage of the investment and economic point of view in determining the value of a key parameter, which is LOOK UP or the number of previous observations. This is not dealt in the previous studies mentioned. In 2021 Derbentsev et. al. [9], studied the short-term prediction problems of the time-series of cryptocurrencies (Bitcoin (BTC), Ethereum (ETH) and Ripple (XRP)) by using a Supervised Machine Learning (ML) approach. They focused in their quest on the best methods of clustering as a stochastic gradient boosting machine, (SGBM) and random forests (RF). The expected price accuracy rate is calculated using RF and GBM. The results validate the applicability of the ML clusters approach to cryptocurrency price prediction. They have concluded that the short-term forecast obtained by SGBM and RF is the best in terms of absolute average, with the MAPE for currencies (BTC, ETH and XRP) being within 0.92-2.61%. In this paper, we propose a model based on machine learning, to address the shortcomings of neural network models in dealing with short data strings. The model depends on the study of the fluctuations of short-term time series data (365) observed by the
GARCH model. The LSTM model is used as one of the neural network models, with a training sample size of 67%, taking into account the sharp fluctuations in the prices of the cryptocurrencies under study and a certain level of market efficiency. Our paper is organized as follows; first section relates to an introduction that deals with the importance of cryptocurrencies as an option to show the investment portfolio for investors. The second section includes a brief literature review, as the efforts have made by researchers in building cryptocurrency price prediction models. The third section includes an explanation of the long-term memory network of neural networks (multiple layers), especially the LSTM model, to process the information received for the proposed model. The fourth section consists of the practical application of the proposed model. Finally, in the fifth section, the researchers have come out with a set of conclusions, and several recommendations based on the results they reached from the application of their model.
lstm. network
A Long Short-Term Memory (LSTM) refers to the long memory networks, which were introduced by Hochreiter and Schmidhuber [10]. It is considered as a special type of motor neural network capable of learning in long term sequences. The goal is to design it as a special kind of motor neural network. It is the ability to learn in long-range sequences and to overcome gradient latency as the most important technical problem for training a neural network
(RNN). This enables it to deal with a wide range of practical problems, due to its ability to avoid the long-term dependency problem, i.e. it has a memory that can overcome long-term time dependency and input sequence problems, with a good advantage. It has the ability to process the input sequence and the output sequence in reasonable steps and time. Figure 1 illustrates the structure of LSTM to find a clear difference with standard RNNs, which consist of repetitive units with a very simple structure meaning that they have a single) (tanh) layer.
Obviously, LSTM has the same architecture as a chain, with a repeating module having a different architecture, i. e. with four layers operating in a rather special way, rather than a single (neural network) layer. As shown in Fig. 1, each line is a complete vector, which comes as an output from one node to the input of the other nodes. The yellow circles are point operations, and function as a mechanism for adding vectors, while the red squares are layers of a neural network, which have taken the information from the previous ones (i.e., ... It learned). As for the merged lines, they refer to the sequence, while the branching lines indicate the transcription and movement to different locations in the same stage.
WORKiNG PRiNCiPLE OF LSTMS
The operation of a network for LSTM is illustrated by Fig. 1. LSTMs have a key that represents the state of the cell, i.e. the state of the information reaching it represented by the horizontal line that passes through the upper part as in Fig. 2. That state (the state of the cell) is more like a conveyor belt to pass the information to a later stage. It reaches directly to the end of the entire chain with only simple linear interactions, indicating that information can flow along the chain unchanged.
The second part is shown in Fig. 3. It refers to organizing information carefully as a new addition or removal in order of precedence by structures called logic gates, which are a means of allowing the passage of optional information. The LSTM consists of a neural network layer and an inside point-multiplying process to process the incoming information. The output of the neural network layer is numbers between zero and one that describe how much to pass each component. The zero value is the instructing of not to allow any information to pass through, while the value of one is to allow every process able to the information to pass through. The LSTM network includes three gates, which protect the state of the cell and control information when performing its work.
LSTM NETWORK WORK STEPS
To clarify the working mechanism of the LSTM network, it is necessary to start with the very normal version of the LSTM, where the information that is thrown away from the state of the cell is determined. This process is a decision made through the neural network layer, which is called the forgetting gate layer. The task is to search in ht _ 1 and x,, extracting a number between 0 and 1 that is the induction of a number in the case of the cell Ct _ p the number 1 indicates to keep this information completely, while the 0 indicates to get rid of this information completely as shown in Fig. 4.
Then comes the role of defining the new information that must be stored in the cell state to deal with later, and this is conducted by defining the neural network layer called the input gate layer, which contains the information values that are to be updated. In the meantime, a (tan h) layer is created, as in Fig. 5, which gives a vector of new candidate values for the C_t cell where they can be added to the cell's state, and these parts are then combined to do a state update.
The state of the old cell C, — 1 is updated to the state of its cell C,. In the previous step, what needs to be done and all that is done, after restoring the old state by qualifying it as a candidate value and adding it to * C ~ t which is the forgotten value as in Fig. 6.
Afterwards, the output has to be defined (what we produce), as shown in Fig. 7, and this depends on the state of the special cell in the LSTM network, which is a filtered version. Here, the neural network layer is started by defining the parts of the state of that cell that we will output, by placing the state of the cell through tanh whose role is to push the values to be between (1 — and 1), and multiplying them by the neural network gate. Here, we have decided what we get out, meaning the parts that we just decided.
Several improvements have been made to the structure of the LSTM network, most notably Cho et al. (2014) [12], who present the LSTM network as a Gated Recurrent Unit (GRU). It is a single update portal that brings the forgetting and input portals together. Its role is to merge the cell state and its previous hidden state, while making some other changes to produce a model that is simpler than the standard LSTM models. It is worth noting that what has been mentioned is only a few of the most common LSTM variants, as there are many of these variants to distinguish the best, by revealing important differences. Greff et al. (2015) [13] have conducted a good comparison of common variants,
Fig. 2. The first part represents the LsTM network case model
Source: Yu Y. et al. [11]. URL: https://arabicprogrammer.com/article/4117317328/ (accessed on 19.07.2022).
Fig. 3. The second part is a mechanism for organizing information in the LsTM network
Source: URL: https://arabicprogrammer.com/article/4117317328/ (accessed on 19.07.2022).
Fig. 4. The information processing mechanism in the LsTM network
Source: URL: https://arabicprogrammer.com/article/4117317328/ (accessed on 19.07.2022).
and come to the conclusion that they are quite similar. Jozefowicz et al. (2015) [14] tested different architectures up to more than ten thousand RNN architectures, where many are found to perform better than LSTMs in certain tasks, while LSTMs outperform others based on their flexible architecture.
vanlila lstm model
According to the architecture of this model in its original 1997 release, a simple LSTM network consists of a cell, an input gate, and an output gate. Initially, a forgotten gate is not part of the LSTM network, until it was proposed by Gers and Schmidhuber (2000) [15] allowing the resetting of
Fig. 5. The mechanism for storing information in the LSTM network
Source: URL: https://arabicprogrammer.com/article/4117317328/ (accessed on 19.07.2022).
Ct =ft * Ot-i + it * ct
Fig. 6. Updating the information in the LSTM network
Source: URL: https://arabicprogrammer.com/article/4117317328/ (accessed on 19.07.2022).
Fig. 7 The output of the LSTM network
Source: URL: https://arabicprogrammer.com/article/4117317328/ (accessed on 19.07.2022).
the network state of the simple vanilla LSTM model, and have taken the name vanilla to distinguish it from the more powerful LSTM model (See Van et al., 2020) [16]. It has a large set of details and configurations, in order to reduce sequence prediction problems, as the vanilla LSTM model has:
1. Input layer.
2. The LSTM hidden layer is the input layer.
3. Result layer with the hidden layer.
THE GARCH MODEL AND ITs relationship TO THE IDENTIFICATION of previous periods
In traditional standard analysis, the variance stability hypothesis states that the variance of the random bound must be constant over time. In fact, the chain of any stock in the financial markets, as an example of financial chains, is described according to volatility, with high volatility, or low volatility. This means, in financial terms, that the expected value and periods of volatility are at the point of random error. It is also volatile (greater or less) across different time periods as a description of the variation in risks or uncertainty. We should not fail to mention, that what is known as data accumulation in the analysis of financial markets, refers to the periods of risk that are represented by great volatility or great variance centered in certain time periods, followed by periods of less volatility (less variance) concentrated in other periods of time. Here, it is better to test the variance pattern, to show the variance of the stock's value depending on its temporal behavior, and more precisely the conditional variance test for the model under study. For more information on the GARCH model and neural networks (see Shen et al., 2021) [17].
The researchers believe that there is a possibility to use the GARCH model to test the efficiency at the weak level, for its ability to detect any concentration in the fluctuation of the data. The idea of the model is that any increase or decrease in the price of the currency today leads to an increase in its price fluctuations in the future, and accordingly the model determines the efficiency at the weak level when the sum (a + p) is less than 1, indicating continued volatility. The market is described as inefficient if the result is close to or greater than one. In order to explain the achievement of efficiency at the weak level in economic terms, it is found that the shocks occurring in the price of the security disappear quickly if the sum of the transactions (a + p) of the exchange rate of one currency against another
currency is less than 1, indicating that the efficiency is achieved at that level. On the other hand, when it is close to 1, this refers to the fact that the price of the security continues to fluctuate, and accordingly, the market is described as inefficient. In the case under study (the Bitcoin currency), the financial market is affected by current values more than by the previous values of that currency when there is efficiency at the average level. This requires giving less prior periods in the LSTM model, while providing efficiency at the weak level and lacking it at the average level which necessitates an increase in the number of previous periods as the investor relies more on previous prices than on current prices.
PRACTICAL FRAMEWORK
The research is conducted in several steps and mechanisms in order to answer the research questions as follows: -
1. Collecting data on the price of Bitcoin against the US dollar during a full year.
2. Conducting a statistical description of the data, including the arithmetic mean and standard deviation, which explains the nature of the data in terms of its dispersion.
3. Proficiency test at all levels (weak, medium and strong) in order to choose the appropriate number of previous periods (choosing LOOK UP or previous periods). Where the test was done according to three values: (one day) that is, the model (it will look at the price on the previous day to predict the price on the current day), and five days, that is, the model (it will look at prices during the previous five days to predict the price on the current day). This is the case with the value (50.), which is set depending on the behavior of some investors. Some of them see the price in the previous day as important to anticipate its direction in the future, while some of them tend to evaluate the direction of the currency price within a short period, let it be five days. Others characterized by their patience, evaluate this trend by looking at the price of the currency for a relatively long period.
4. CNN Model Test.
5. Choosing the LSTM model, due to its proven ability and flexibility in dealing with time-series data, as it takes into account the previous values of the observations. This is consistent with those data, and the researchers have justified the use of the simple model (VANILA LSTM), due to the small number of observations. This type of artificial neural network has some hidden layers, which, from
120
100
80
60
40
20
10000
20000
30000
40000
50000
Fig. 8. Statistical description of the data
Source: prepared by researchers based on the outputs of the E_VEIWES-10 program.
Series: CLOSE
Sample 1 365
Observations 365
Mean 16165.02
Median 10941.30
Maximum 57433.80
Minimum 4826.000
Std. Dev. 11768.13
Skewness 1.686400
Kurtosis 4.864141
Jarque-Bera 225.8560
Probability 0.000000
the point of view of the researchers, may suit the few observations.
6. Integration of CNN with LSTM.
7. Using the MIN MAX SCALER method to make the data confined between (0-1) in order to facilitate the processing process by the artificial neural network.
8. The study sample is divided into a training sample of 67%, amounting to (244) observations, and the sample of the Buaqy test, which amounts to (121) observations, noting that the control sample is not taken into account due to the small number of observations.
9. RMSE is chosen to assess the accuracy of the predictive model and is used in many studies.
STATISTICAL DESCRIPTION OF THE DATA
The statistical description of the data is performed to clarify the behavior of the data in terms of its distribution and spread, as shown in Fig. 8. The currency price ranges between the lowest value and amounts to (4,826 $), while the highest value reaches (57,433 $), and this indicates the great development taking place in currency rate. The arithmetic average amounts to 16,165 $, with a standard deviation of approximately (11,768 $), which indicates a large dispersion in the data, indicating the extensive cases of speculation on the currency. The skew coefficient of (1.69) indicates that most prices are greater than the arithmetic average, which amount to (16,165 $), and this reflects the state of speculative interest in the currency. The probability value corresponding to the Jarque-Bera test is (0.00) which is less than (0.05), and this means that there is no normal distribution for the variable.
The researchers believe that the absence of a normal distribution of the variable and the presence of a large dispersion in the currency price, in addition to the shortness of the sample, leads to great difficulties in forecasting. Financial Market Efficiency Test: The following Table 1 shows the results of the aptitude test.
It is clear from the previous table that the level of efficiency is weak, as it is a group of alpha (RESID (-1)) A2 and beta (GARCH (-1)) 1. This refers to the fact that there are large fluctuations in the data, meaning that the impact of the shock continues.
PREDICTION USING ARTIFICIAL NEURAL NETWORK MODELS
Models are estimated using Vanilla LSTM, CNN+LSTM and CNN with a change in the basic data of the model (look up, epoch). Table 1 shows the results of the LSTM model with the number of previous periods (1). It is clear from Table 2 that the best model has largest number of previous periods used (50 views). This means that the model used (50) previous days to predict the current price so as to help investors evaluate the price movement of the currency under study for a relatively long period.
In fact, periods (1) and (5) do not constitute a good basis for forecasting; therefore, this result helps to warn investors not to speculate by relying on the currency price movement for a relatively short period, especially when there is a large volatility in its price. Forecasting based on long previous periods gives good results. In principle, the best model is the model with previous periods estimated at (50) days, and to improve the results, the value of the EPOCH is improved from (100) to (150).
0
Table 1
An efficiency Test
Variable Coefficient std. Error z-statistic Prob.
PRICE(-1) 1.011791 0.005665 178.6082 0.0000
C -84.72958 74.74266 -1.133617 0.2570
Variance Equation
C 3290.836 835.7257 3.937698 0.0001
RESID(-1)A2 ... (a) 0.106643 0.021111 5.051449 0.0000
GARCH(-1)...(P) 0.907800 0.016699 54.36159 0.0000
R-squared 0.993378 Mean dependent var 16185.96
Adjusted R-squared 0.993359 S.D. dependent var 11777.51
S.E. of regression 959.7599 Akaike info criterion 15.49140
Sum squared resid. 3.33E+08 Schwarz criterion 15.54493
Log likelihood -2814.435 Hannan-Ouinn criter. 15.51268
Durbin-Watson stat 1.957392
Source: prepared by researchers based on the outputs of the E_VEIWES-10 program.
Table 2
Forecasting at different previous periods according to LsTM model
Period RMsE standard for training sample RMsE standard for test sample
1 1162.19 475.67
LSTM 5 1153 610.13
50 773.39 819.63
1 1200 900.29
CNN 5 1116.42 981.67
50 1000.24 988.54
1 950.27 1100.12
CNN+LSTM 5 890.29 985.01
50 900.22 968
Source: Table and figure prepared by researchers based on the outputs of the E_VEIWES-10 program. Note: We choose the best model through RMSE for training and testing data.
Table 3
Forecasting at 50 preceding periods and EPOCH according to LsTM model
Period at EPOCH 100 RMsE at EPOCH 150 RMsE
50 747.80 707.84
Source: Table and figure prepared by researchers based on the outputs of the E_VEIWES-10 program.
Table 3 shows the prediction results. From this table we find that increasing the number of EPOCHES leads to greater convergence between the sample training and test sample. Based on the above, it can be said that the best model is the model with lag periods (50) and EPOCH (150).
HYPOTHESES TESTING
The hypotheses of the model are tested through the practical side on an electronic computer of the type Acer (core i5-6200u, with 4GB DR 4 memory and 500 GB HDD). The mechanism of the model is applied and computerized to process a data series of cryptocurrencies compared to dollar prices, on the first premise that: "The prediction of the simple deep learning model VANILA LSTM does not give accurate predictions of the price of Bitcoin". Here, it is clear by reviewing Table 2 that the ability of the simple model is to give accurate results compared to the nature of the data on the price of the currency (Bitcoin), such as the dispersion of the data and the lack of a normal distribution of the variable. The second hypothesis states that: "The change of the previous period does not LOOK UP leads to a change in the model's predictive accuracy." In fact, when following up on the results obtained from the practical part, it is found that the model's predictive ability has improved from (1,162.19, 475.67) for the training and testing sample, to (773.39, 819.63) for the training and testing sample, respectively. The practical results have proved the practical path to test the third hypothesis which states that: "Increasing EPOCHES does not lead to an improvement in the model's predictive ability". It is concluded that increasing from 100 to 150 has led to a convergence in the accuracy results between the two samples of training and testing, which in turn is a positive aspect in achieving the hypotheses and objectives of the research. The researchers believe that the model has been able to deal with
the data in the volume that the researchers have by dealing carefully with the data series that enables the model to find the results that have led to obtaining fair predictions that are very close to reality depending on the error criterion mentioned. In fact, it is a positive aspect in achieving the hypothesis and objectives of the research.
CONCLUSIONS
After obtaining the results using the VANILLA LSTM model, it is confirmed that the hypotheses of the model are verified and discussed. The researchers have come up with a number of conclusions, the most important of which are: The ability of the simple model to give accurate results compared to the nature of the data on the price of the currency (Bitcoin), such as the dispersion of data and the lack of a normal distribution of the variable. Thus, an increase in the preceding data period leads to an improvement in the predictive ability of the model for the training and testing sample, respectively. Also, the increase of EPOCHES 1.5 times leads to a convergence in the accuracy results between the training and testing samples, which helps investors evaluate the investment movement for a relatively long period to know the current price trend in the later stages.
RECOMMENDATIONS
Based on the foregoing from the theoretical and practical sides, the researchers recommend the adoption of the VANILLA LSTM model by increasing the previous and somewhat short periods (50 previous views) for prediction, and adhering to its parameters that are installed in practical application, to deal with Bitcoin data, which directs investors to rely on relatively long time periods to assess the direction of the price of the currency and its future, and to emphasize the increase in the number of EPOCHES to obtain more predictive accuracy.
REFERENCES
1. Brownlee J. Long short-term memory networks with Python: Develop sequence prediction models with deep learning. San Juan, PR: Machine Learning Mastery; 2017. 246 p. URL: https://books.google.iq/ books?hl=ar&lr=&id=m7SoDwAA0BAJ&oi=fnd&pg=PP1&dq=%5B1%5D%09Brownlee,+J.+(2017).+Long +short-term+memory+networks+with+python:+develop+sequence+prediction+models+with+deep+learn ing.+Machine+Learning+Mastery.+%E 2%80%8Fp.83&ots=v0Iv60daIw&sig=Upu9D025Lq8TPf6x4xZi_-mTfKg&redir_esc=y#v=onepage&q&f=false
2. Galeshchuk S., Mukherjee S. Deep networks for predicting direction of change in foreign exchange rates. Intelligent Systems in Accounting, Finance and Management. 2017;24(4):100-110. DOI: 10.1002/isaf.1404
3. Ionela C., Alina B. I. Eur/ron exchange rate prediction based on box-jenkins technique. SWS Journal of Social Sciences and Art. 2019;1(2):31-41. DOI: 10.35603/ssa2019/issue2.03
4. Derbentsev V., Datsenko N., Stepanenko O., Bezkorovainyi V. Forecasting cryptocurrency prices time series using machine learning approach. SHS Web of Conferences. 2019;65:02001. DOI: 10.1051/ shsconf/20196502001
5. Lu W., Li J., Li Y., Sun A., Wang J. A CNN-LSTM-based model to forecast stock prices. Complexity. 2020;2020:6622927. DOI: 10.1155/2020/6622927
6. Xue F., Sun A., Zhang H., Chng E. S. An embarrassingly simple model for dialogue relation extraction. 2020. URL: https://www.researchgate.net/publication/347966196_An_Embarrassingly_Simple_Model_for_ Dialogue_Relation_Extraction
7. Chaudhari A. Forecasting cryptocurrency prices using machine learning. Dublin: School of Computing, National College of Ireland; 2020. 22 p. URL: http://norma.ncirl.ie/4272/1/ashwinichaudhari.pdf
8. Maleki N., Nikoubin A., Rabbani M., Zeinali Y. Bitcoin price prediction based on other cryptocurrencies using machine learning and time series analysis. ScientiaIranica. 2020. DOI: 10.24200/SCI.2020.55034.4040
9. Derbentsev V., Babenko V., Khrustalev K., Obruch H., Khrustalova S. Comparative performance of machine learning ensemble algorithms for forecasting cryptocurrency prices. International Journal of Engineering. 2021;34(1):140-148. DOI: 10.5829/IJE.2021.34.01A.16
10. Hochreiter J. S., Schmidhuber J. Long short-term memory. Neural Computation. 1997;9(8):1735-1780. DOI: 10.1162/neco.1997.9.8.1735
11. Yu Y., Si X., Hu C., Zhang J. A review of recurrent neural networks: LSTM cells and network architectures. Neural Computation. 2019;31(7):1235-1270. DOI: 10.1162/neco_a_01199
12. Cho K., Van Merrienboer B., Gulcehre C., Bahdanau D., Bougares F., Schwenk H., Bengio Y. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In: Proc. 2014 conf. on empirical methods in natural language processing (EMNLP). Stroudsburg, PA: Association for Computational Linguistics; 2014:1724-1734.
13. Greff K., Srivastava R. K., Koutník J., Steunebrink B. R., Schmidhuber J. LSTM: A search space odyssey. IEEE Transactions on Neural Networks and Learning Systems. 2017;28(10):2222-2232. DOI: 10.1109/ TNNLS.2016.2582924
14. Jozefowicz R., Zaremba W., Sutskever I. An empirical exploration of recurrent network architectures. In: Proc. 32nd Int. conf. on machine learning (ICML'15). 2015. (Proceedings of Machine Learning Research. Vol. 37). URL: http://proceedings.mlr.press/v37/jozefowicz15.pdf
15. Gers F. A., Schmidhuber J. Recurrent nets that time and count. In: Proc. IEEE-INNS-ENNS Int. joint conf. on neural networks (IJCNN 2000). Neural computing: New challenges and perspectives for the new millennium. Piscataway, NJ: IEEE; 2000:189-194. DOI: 10.1109/IJCNN.2000.861302
16. Van Houdt G., Mosquera C., Nápoles G. A review on the long short-term memory model. Artificial Intelligence Review. 2000;53(8):5929-5955. DOI: 10.1007/s10462-020-09838-1
17. Shen Z., Wan O., Leatham D. J. Bitcoin return volatility forecasting: A comparative study between GARCH and RNN. Journal of Risk and Financial Management. 2021;14(7):337. DOI: 10.3390/jrfm14070337
ABOUT THE AUTHORs / ИНФОРМАЦИЯ ОБ АВТОРАХ
Moudher Kh. Abdalhammed — Ph.D., Prof., Department of Management and Economics,
Tikrit University — College of Administration and Economics, Tikrit, Iraq
Мудхер Халид Абдалхаммед — Ph.D, профессор, факультет управления и экономики,
Тикритский университет — Колледж администрации и экономики, Тикрит, Ирак
https://orcid.org/0000-0001-8295-3937
Ahmad M. Ghazal — Assistant Prof., Faculty of Economics, Department of banking and insurance, Damascus University, Damascus, Syrian
Ахмад Мохаммад Газаль — доцент, факультет экономики, отделение банковского дела и страхования, Дамасский университет, Дамаск, Сирия https://orcid.org/0000-0002-5760-3609 [email protected]
Hanan M. Ibrahim — Master's in Business Administration/Financial Management, Faculty of Business Administration, Tikrit University — College of Administration and Economics, Tikrit, Iraq
Ханан Мохамед Ибрагим — магистр в области делового администрирования / финансового менеджмента, факультет делового администрирования, Тикритский университет — Колледж администрации и экономики, Тикрит, Ирак https://orcid.org/0000-0001-9182-0087 [email protected]
Ahmed Kh. Ahmed — Assistant Prof., Master's in Business Administration/Financial Management, Faculty of Management and Economics, Department of Public Administration/ Faculty of Business Administration, Tikrit University — College of Administration and Economics, Tikrit, Iraq
Ахмед Худхаир Ахмед — магистр в области делового администрирования / финансового менеджмента, ассистент профессора, факультет управления и экономики, кафедра государственного управления, факультет делового администрирования, Тикритский университет — Колледж администрации и экономики, Тикрит, Ирак https://orcid.org/0000-0003-2849-026X [email protected]
Author's declared contribution:
M. Kh. Abdalhammed — Methodology and Statistical Analysis. A. M. Ghazal — Data collection.
H. M. Ibrahim — Theoretical aspect and analysis of price ratios. A. Kh. Ahmed — Financial statements and oversight.
Заявленный вклад авторов:
М. Х. Абдалхаммед — методология и статистический анализ. А. М. Газаль — сбор данных.
Х. М. Ибрагим — теоретический аспект и анализ ценовых соотношений. А. Х. Ахмед — финансовая отчетность и надзор.
Conflicts of Interest Statement: The authors have no conflicts of interest to declare. Конфликт интересов: авторы заявляют об отсутствии конфликта интересов.
The article was submitted on 17.11.2021; revised on 01.12.2021 and accepted for publication on 17.05.2022. The authors read and approved the final version of the manuscript.
Статья поступила в редакцию 17.11.2021; после рецензирования 01.12.2021; принята к публикации 17.05.2022.
Авторы прочитали и одобрили окончательный вариант рукописи.