# Cryptocurrency Financial Risk Analysis Based on Deep Machine Learning

Authors: Si Chen
Journal: Complexity
 (2022)

---

## Abstract

Digital currency is considered a form of currency which is used in the digital world such as digital forms or electronic devices. Several terms are synonyms for digital currency like digital money, electronic money, and cyber cash. Accurate prediction of the digital currency is an urgent necessity due to its impacts on the economic community. The electronic economy is very dangerous and must be approached with great caution, so as to avoid or minimize the risks that occur in such cases. Deep neural network (DNN) algorithm was improved to predict the Bitcoin price and then achieve the main goal of reducing financial risks to proceed with electronic business, and good estimation was achieved by using informative data such as transactions and currency return. The proposed method extracted features of related Bitcoin and used the informative ones. Transaction plan considered building nodes in terms of network. Development of deep learning algorithms opens the horizons for the development of electronic businesses that use digital currency. The proposed method achieved worthy results in terms of accuracy (53.4%) and correct prediction (MSE 1.02) and offers the prospect of other research in this area.


---

## Body

## 1. Introduction

Day by day, digital currency significance increases rapidly due to its importance in the field of electronic trading which is essential in new financial system [1]. Despite the fact that the digital currency concepts are not new, the use of this kind of currency has grown up remarkably [2]. Money is not set in banks or safe boxes, but it is available in processors and storage of the cyber world, and it is traded in the form of information. The main purpose of such technology is to increase the payment efficiency [3]. Till now, the standards for digital currency mechanism are not clear, and therefore its boundaries are not set yet, so the customers communicate together with the absence of regulators. However, the public acceptance of digital bank transactions allow alternative types of money to be developed; these new types are not related to traditional bank accounts and are fully based on digital environment; therefore, it is called digital currency [4, 5].Prespecified range of supply should be guaranteed for virtual currency, and Bitcoin is an obvious example for this limitation (21 million of Bitcoins is the whole amount issued) [6]. Virtual currency and cryptocurrency are sorts of the digital currency. Bitcoin is now leading the new form of currency (virtual currency), and it forms about 93% of the market of cryptocurrency [7]. There was an extreme fluctuation of Bitcoin exchange rate; on January 1st, 2013, the rate was 13.30$ for each one Bitcoin, but this rate was increased dramatically to be $1.147.25 in December 4th, 2013; however, on March 1st, 2015, the price went down to be $258.97. The strong fluctuation in Bitcoin exchange rate made big opportunity and high risk at the same time to the investors [8]. In addition to the huge fluctuation, there are other issues in the risk field. Theft risk exists; in 2014 this type of risk was highlighted by Mt. Gox Bitcoin exchange. Bitcoin dealers, especially buyers, also face risks of fraud from some fraudulent sellers, which was confirmed by the US Securities and Exchange Commission.The pricing of digital currency is based on traditional pricing perspective [9]. However, the main risk in dealing with digital currency is the systematic and fluctuation risk in pricing process; thus, this study will attempt to analyze these two types of risks, while theft and fraud risks will be set aside. From the perspective of nonprofessional investors, the extreme fluctuation in digital currency price will lead to a risky investment [10], but those who are professional in the investment field would not put all their eggs in one basket. Therefore, they will try to make diverse purse as much as possible to avoid or at least to minimize risk; they prefer to deal with assets not affected by the market fluctuation to avoid the asset risk called systematic risk assets [11]; otherwise, they should be called nonsystematic risk assets which are related to the whole marketing process. Bitcoin is considered as a nonsystematic risk asset, and the sophisticated investors prefer to deal with this type of business [12].The popular digital currency is Bitcoin, and it is considered a target for theft or sometimes illegal activities. This problem cannot be solved only when the transaction address is fixed [13]. More challenges regarding Bitcoins [14] came from rampant hacking attacks and thefts, so security control of digital wallet is necessary. Making Bitcoin stand against any hacks, thefts, and frauds needs big secure system and process with cryptocurrency in addition to assets sharing some characteristics according to transition [15].Is Bitcoin a currency or not? This is a big question for which people are looking for an answer. Chen and Pandey 2014 [16] make study on Bitcoin to determine whether there is a match between roles of currency and Bitcoin and whether it is possible to invest in it as safely as assets; the correlation between Bitcoin and the major currencies of the world was also examined. The results of their study show that the major currencies of the world were correlated significantly, but the correlation between these currencies and Bitcoin was insignificant. In addition, they found that there is insignificant correlation between the benefit of investment in gold and the benefit of investment in Bitcoin [17]. Because the behavior of Bitcoin is different from the behavior of both of the major currencies of the world and the gold, researchers claim that Bitcoin can be less used as useful currency [18].Bitcoin sustainability will encounter significant risk. Bitcoin users are now enjoying the low transaction fees, and transaction companies and individuals apply very small rates on each transaction to encourage people to buy Bitcoin and increase the price as a result of demand increasing. However, the same companies plan to increase their future profits by increasing the transaction amounts due to increasing the value of each Bitcoin in addition to increasing the exchange rate [19]. Since all Bitcoins have been already created, and there are no longer any more Bitcoins, the marginal benefits that will result from owning currency will disappear. On the other hand, the cost of marginal transactions will increase, so the benefit of Bitcoin business will decrease compared with the fiat currency.Recent development in deep learning may support efforts for solving these challenges [20], as it is known that deep learning and neural network can solve issues in divers fields such as pattern recognition, education, healthcare, and industry. Deep learning approach shows high performance compared to machine learning approaches; therefore, it proved useful in many research fields, and it can handle data that tend to be messy, even if data includes many variables and includes labeling errors. As is known clearly, neural network aims to mimic the human brain, and deep learning is an advanced form of neural network which mimics the human brain more efficiently [21]. Explicitly programing everything is not needed to achieve better results.


## 2. Literature Review

Many researches consider digital currency in terms of prediction and risk management. In this section, we present the most important studies that left impression in this topic. LSTM system of deep learning was used to learn the chaotic behavior of three cryptocurrencies evidently, achieving better prediction in digital currency market [22]. Prediction of digital currency price by using decomposition method and optimization algorithm combined with deep learning was done by [23]. A different model was suggested by [24] to predict Bitcoin based on huge dataset to improve the performance, and stochastic gradient descent was applied for deep learning techniques to learn the parameters used. Bitcoin price prediction using scikit-learn library as dataset for training method was presented by [25] via new strategy based on genetic algorithm with three chosen parameters that directly affect the digital market. Large vector of features was provided by to design neural network system for learning the machine in minimum time period due to system using to predict the price online system in real time issue. However, due to many features, they achieved better results in online prediction [26]. All existing methods seek accurate prediction to avoid the risk of financial issue.


### 2.1. Concept of Digital Currency

Digital currency, also named as cryptocurrency or crypto asset, aims to reverse some or all of the traditional uses of money—payment manners, value store, and unit account [5]. The terminology used to describe it is often misleading and confusing, changing a high range of financial statements with verifying technical, practical, and legal characteristics, ranging from decentralized digital tokens like Bitcoin at one end of the domain to official and sovereign digital currencies supported by central banks in other end. Bitcoin and many of their similar things, sometimes known as crypto assets, are viewed like a volatile speculative assets. Some people accept it as a method of payment [27]. This is partly due their security that depends on cryptographic combination and no central “blockchain” technology that keeps the holder identity out of danger; governments consider deeply the use of illegal activities like money laundering, tax evasion, and terrorist financing.The term of digital currency has been given more attention by both by the companies testing the use of the digital money and the governments that insist on applying rules and regulations to stablecoins.


### 2.2. The Reason of Central Bank Owning Digital Currency

The main reason may be that the system can pay efficiently but that is not always the case. An example is that commercial operations and currency trading have a second aspect [4]. Many products depend exclusively on the Chinese currency in order to revive the national economy, but in fact it is the promotion of the Chinese currency over the US dollar.One of the reasons is the emergence of hidden companies that are a repository for commercial funds that are held on social media platforms due to transactions between millions of users such as Facebook, as well as some of the bonds traded for major companies that develop the idea of electronic currency to evade tax and exploit the reputation of some international brands in order to collect overlapping funds [28].


### 2.3. Feature Extraction

Trading and dealing with digital currency are fraught with a lot of dangers, so it is necessary to know the components and data of the digital currency and how to deal with it so that we can make simulations to avoid the risk arising from dealing with it. Items of digital currency can be classified into three main categories: Bitcoin feeding, transaction, and return [29]. With Bitcoin being the basis of the currency and due to the technological development, it attracted attention and became popular in investing. Some traders and investors consider it free money that is easy to obtain, while others consider it as gold prospecting. Mining of Bitcoin refers to the digital process of adding transaction records to blockchain, a publicly distributed ledger which is holding the history of each transaction of Bitcoin [30].Transaction refers to sending Bitcoin through any path and anywhere, and these transactions clump together in new term called blockchain which is serial of transaction blocks, recording the history of transactions.Returns of Bitcoin are the interest on cryptocurrency when Bitcoin increases during investing after a period of time; mining of Bitcoin for some time can be returned to end user with transaction history record to value this Bitcoin.For this purpose, we can extract the features from digital currency to develop supervised machine learning technique through its network for prediction and reduce the risk association with it. Features improved the time frame within hour, day, week, and month prior prediction. The main goal of using deep learning to forecast digital currency is to predict Bitcoin price of USD at least one hour in advance [31]. All the information will be gathered in advance and used for processing and computing, considering the transaction path and nodes for Bitcoin in addition to the features extracted such as the following:(i)
Current Bitcoin price(ii)
Flow of the path per hour(iii)
Number of transactions per hour(iv)
Mean value of the transaction(v)
In\out degree of averaging node(vi)
Transaction median value(vii)
Median degree of the node(viii)
Number of mined Bitcoins.(ix)
Source and destination address.(x)
Number of transactions per node.Some of these features are directly related to the price of Bitcoin and others are indirectly related [32]. For each node, we can collect some extra features such as the following:(i)
Bitcoin passing through the node(ii)
Weight of flow Bitcoin(iii)
Transaction number(iv)
Nearest centrality to the nodeThe purpose of getting these features is not only to classify or cluster certain Bitcoin and its flow, but also to get general idea regarding how the important players in the market of Bitcoin affect the valuation and how they control the market.One of the best information items gained from features is the activity of different addressing and balancing of the net, as shown in Figure1.Figure 1
Overview of Bitcoin behavior.


### 2.4. Selection of Features

An important part of feature extraction is to first choose which one should be used during classification or regression. Reducing features in calculation process that take the mutual data among the features and output results will be the pure features that illuminated or pruned insignificant features. Mutual information is produced by the following equation:(1)IA;B=∑b∈B∑a∈Apa⋅b×logpa⋅bpapb,where A is extracted feature, B output data, and I mutual function.Through this equation, we can put the rule of given information, that is, which feature is informative and which is uninformative and can be normally discarded. For such research informative features can be changed within the time but still filtered according to their importance; however, some features are still informative in a specific process, such as the following:(i)
Mined Bitcoin for the last hour(ii)
Transaction number through new addresses for the last hour(iii)
Mean of the node degree for the last hour(iv)
The net flow for the last hourInformative features help to predict the right current price then can avoid the risk of digital currency issue.Another important process for the features is Union Find which is the algorithm of determining the contiguous subnets through the network. It is preprocessing technique to find the relation of multiple accounts belonging to a single owner. This algorithm carries out many iterations to find out the union and finding function.First, union function merges two disjoint subnets to produce their union.Second, find the function by checking other parts and find out whether the subnet belongs to the same merged subnet.


### 2.5. Deep Learning

Current studies focus on automation and prediction of Bitcoin behavior to avoid digital currency risk in the market. Making the machine touchable is not easy and requires powerful processors and high-performance computers. The development in data science and modern technology, such as big data and high-performance computers, provided an opportunity for machine learning to understand data and its behavior through complex systems. Machine learning gives the machine ability to learn different algorithms without strict orders from certain programs or limited instructions [33].Deep learning can be defined as technique of machine learning used to learn useful features directly from given Bitcoin transaction, paths, and subnet domain. Many layers are exploited by deep learning for nonlinear data processing of unsupervised or supervise feature extraction for classification and pattern recognition [34]. Deep learning motivation is greatly reduced by Artificial Intelligence (AI) area, which simulates the human brain ability to analyze data, make decision, and learn. Deep learning goal is to emulate the approach of hierarchical learning of extracting features by human brain directly from unsupervised data.The core of deep learning is the hierarchical computation of features and representation of information, such as defining features starting form low level to high level. With cryptocurrency, the standard techniques of machine learning do not work well when running directly due to ignoring nature of blockchain. In deep learning, features are extracted automatically from Bitcoin transaction. One of the characteristics of these feature methods is considered to be learning in the system [35].The character of Bitcoin transactions as a function is a key issue for the processing or success of the digital currency. Features extracted in Bitcoin have some limitations [36]. For this reason, we can use deep learning with its feature extraction to solve risk issues in digital currency.The main difference between machine learning and deep learning is feature selection method, as shown in Figure2.Figure 2
Difference of normal neural network and deep learning in feature analysis techniques.Features in deep learning will be generated automatically to simulate the appropriate results [37]. Different hidden layers participate in decision making by using the feedback from one next layer to previous one, or resulting layer will be fed into first layer [38]. DL enables computers to perform complex calculations by relying on simpler calculations to optimize computer efficiency. It is difficult for a computer to understand complex data such as transaction number and weights or subnet region of a complex nature, so we use deep learning algorithms instead of usual learning methods [39].Deep learning considers the nonlinear relation between blockchain and transaction determining the weight of Bitcoin reconstructed that depends on linear model since the variation of digital currency gets large. This is actually because linear model is similar to nonlinear behavior of the relationship between Bitcoin transactions and the data of the previous hour [37]. For this reason, DNN is used to solve the nonlinear model of improving quality of Bitcoin prediction. The second factor that deep learning takes into consideration is the speed. Real time is necessary in dealing with online currency during data acquisition and analysis prediction.


### 2.6. Blockchain of Finance

The blockchain starts when dealing with some anonymous fake online transactions. This dealing over the Internet is described as peer to peer payment through blockchain infrastructure. Payments are defined as Bitcoin, the first cryptocurrency and the largest currency, giving them hundreds of other currencies, that is digital cash. Technology of blockchain is established on the principles of gathering all the transactions data to be block of public ledger. They part and connect to previous block via a Merkle root, in form of fixed chain as shown in Figure3.Figure 3
Blockchain structure.Cryptocurrencies spread their transactions that take agreement from neighboring nodes to integrate together to achieve chain.This is known as the verification process of competitive entry. Therefore, the finance of blockchain is defined as decentralized process and the management as capability of self-management. Process of cryptography supports this technology and is known as proof-of-work. It is the algorithm fee reward that each node earns as part of contributing node power mathematically expressed as(2)PB−1=R2HH−1HR−1.PB−1 is the probability of parting node of block 1, R is hash rate to certain node, and H is hash rate of the network rate (competitors).The equation above illustrates that larger hashing power to user and probability of the node can reach the correct transaction; when it is confirmed, the reward will go into effect and it is found that the number of blocks per minute is actually a binary distribution. Proof of stake is known as the alternative cryptographic method for distribution achievements. It is an algorithm mainly based on process of leader selection and expressed by(3)pi=Si∑k=1nSk,where pi is the probability of the node leadership i and si is stakehold via stakeholder Ui while sk is stakehold via another stakeholder.


### 2.7. Proposed Method

In this study, we focus on the digital currency effectiveness and prediction. Then, we apply deep learning algorithm to increase the accuracy of prediction and reduce the statistical risk in cryptocurrency. Figure4 shows the general framework of the proposed method starting by collecting two categories of data firstly. The data provided in the last history are used in the training system.Figure 4
General flowchart for proposed method.Training mode is supposed to be labeled with known results in advance, and neural network has to put the result which is known in advance in order to build the system on this basis, in addition to the information gathered from previous months about transactions of digital currency. Features will be extracted in this stage to be processed according the weight supported.Predictive model called linear regression is used to formulate a line located at the best fit separating between dependent variable scalar and multiple variables. Mean square error is considered between actual and predicted output and minimized by the linear fit. Some calculation is needed such as parameterization (or factorized form), hypothesis, linear regression goal, and cost function, as follows:(4)hθx=θ0+θ1x,Jθ0⋅θ1=12m∑i=1mhθxi−yi2,minθ0.θ1Jθ0⋅θ1,where the hypothesis h is provided with parameters θ0.θ1 to satisfy the cost function J to find its minimum.Neural network considers the family of machine learning technique, derived from the biological nervous system via modeling interconnected neurons’ system that depends on iterative learning. Neural network system starts with feeding by connecting multidimensional input to the hidden layer neurons before predicting the right result. The entered data or features go through several shifts depending on the weight of the features and the neural network construction strategy. Each hidden layer produces data for any other layer, or its results go to the inputs of previous layers as feedback.Normally, nonlinear functions such ash function are used after each output layer, N × N dimensions’ matrix suggested for adjustment N is considered account numbers, nodes can be represented as rows and columns in a matrix matrix, connected nodes in a pattern use non-zero values to represent the relationship between nodes and their transactions. The process of neural network is shown in Figure 5.Figure 5
Depicting nodes and their transactions within proposed DNN.Depicting all the information collected from blockchain to form vector and matrix makes prediction easy, and neural network can determine root mean square error (RMSE) as in the following equation:(5)R2=1−∑i=1Nyprei−yexpi2∑i=1Nyprei−y¯2,RMSE=1N∑i=1Nyprei−yexpi2.ypre and yexp are experimental and predicted variables. y¯ is the average of dependent experimental variable, and N is the total iteration number of running the system; maximum R2 with minimum RMSE makes the best performance of DNN.This study used movements of Bitcoins in Europe, Canada, and USA trading company as data processing and datasets. Because these data have been marked and informationized, in addition to checking the accuracy of the proposed method, we can also understand the movements of large companies in the market.


## 2.1. Concept of Digital Currency

Digital currency, also named as cryptocurrency or crypto asset, aims to reverse some or all of the traditional uses of money—payment manners, value store, and unit account [5]. The terminology used to describe it is often misleading and confusing, changing a high range of financial statements with verifying technical, practical, and legal characteristics, ranging from decentralized digital tokens like Bitcoin at one end of the domain to official and sovereign digital currencies supported by central banks in other end. Bitcoin and many of their similar things, sometimes known as crypto assets, are viewed like a volatile speculative assets. Some people accept it as a method of payment [27]. This is partly due their security that depends on cryptographic combination and no central “blockchain” technology that keeps the holder identity out of danger; governments consider deeply the use of illegal activities like money laundering, tax evasion, and terrorist financing.The term of digital currency has been given more attention by both by the companies testing the use of the digital money and the governments that insist on applying rules and regulations to stablecoins.


## 2.2. The Reason of Central Bank Owning Digital Currency

The main reason may be that the system can pay efficiently but that is not always the case. An example is that commercial operations and currency trading have a second aspect [4]. Many products depend exclusively on the Chinese currency in order to revive the national economy, but in fact it is the promotion of the Chinese currency over the US dollar.One of the reasons is the emergence of hidden companies that are a repository for commercial funds that are held on social media platforms due to transactions between millions of users such as Facebook, as well as some of the bonds traded for major companies that develop the idea of electronic currency to evade tax and exploit the reputation of some international brands in order to collect overlapping funds [28].


## 2.3. Feature Extraction

Trading and dealing with digital currency are fraught with a lot of dangers, so it is necessary to know the components and data of the digital currency and how to deal with it so that we can make simulations to avoid the risk arising from dealing with it. Items of digital currency can be classified into three main categories: Bitcoin feeding, transaction, and return [29]. With Bitcoin being the basis of the currency and due to the technological development, it attracted attention and became popular in investing. Some traders and investors consider it free money that is easy to obtain, while others consider it as gold prospecting. Mining of Bitcoin refers to the digital process of adding transaction records to blockchain, a publicly distributed ledger which is holding the history of each transaction of Bitcoin [30].Transaction refers to sending Bitcoin through any path and anywhere, and these transactions clump together in new term called blockchain which is serial of transaction blocks, recording the history of transactions.Returns of Bitcoin are the interest on cryptocurrency when Bitcoin increases during investing after a period of time; mining of Bitcoin for some time can be returned to end user with transaction history record to value this Bitcoin.For this purpose, we can extract the features from digital currency to develop supervised machine learning technique through its network for prediction and reduce the risk association with it. Features improved the time frame within hour, day, week, and month prior prediction. The main goal of using deep learning to forecast digital currency is to predict Bitcoin price of USD at least one hour in advance [31]. All the information will be gathered in advance and used for processing and computing, considering the transaction path and nodes for Bitcoin in addition to the features extracted such as the following:(i)
Current Bitcoin price(ii)
Flow of the path per hour(iii)
Number of transactions per hour(iv)
Mean value of the transaction(v)
In\out degree of averaging node(vi)
Transaction median value(vii)
Median degree of the node(viii)
Number of mined Bitcoins.(ix)
Source and destination address.(x)
Number of transactions per node.Some of these features are directly related to the price of Bitcoin and others are indirectly related [32]. For each node, we can collect some extra features such as the following:(i)
Bitcoin passing through the node(ii)
Weight of flow Bitcoin(iii)
Transaction number(iv)
Nearest centrality to the nodeThe purpose of getting these features is not only to classify or cluster certain Bitcoin and its flow, but also to get general idea regarding how the important players in the market of Bitcoin affect the valuation and how they control the market.One of the best information items gained from features is the activity of different addressing and balancing of the net, as shown in Figure1.Figure 1
Overview of Bitcoin behavior.


## 2.4. Selection of Features

An important part of feature extraction is to first choose which one should be used during classification or regression. Reducing features in calculation process that take the mutual data among the features and output results will be the pure features that illuminated or pruned insignificant features. Mutual information is produced by the following equation:(1)IA;B=∑b∈B∑a∈Apa⋅b×logpa⋅bpapb,where A is extracted feature, B output data, and I mutual function.Through this equation, we can put the rule of given information, that is, which feature is informative and which is uninformative and can be normally discarded. For such research informative features can be changed within the time but still filtered according to their importance; however, some features are still informative in a specific process, such as the following:(i)
Mined Bitcoin for the last hour(ii)
Transaction number through new addresses for the last hour(iii)
Mean of the node degree for the last hour(iv)
The net flow for the last hourInformative features help to predict the right current price then can avoid the risk of digital currency issue.Another important process for the features is Union Find which is the algorithm of determining the contiguous subnets through the network. It is preprocessing technique to find the relation of multiple accounts belonging to a single owner. This algorithm carries out many iterations to find out the union and finding function.First, union function merges two disjoint subnets to produce their union.Second, find the function by checking other parts and find out whether the subnet belongs to the same merged subnet.


## 2.5. Deep Learning

Current studies focus on automation and prediction of Bitcoin behavior to avoid digital currency risk in the market. Making the machine touchable is not easy and requires powerful processors and high-performance computers. The development in data science and modern technology, such as big data and high-performance computers, provided an opportunity for machine learning to understand data and its behavior through complex systems. Machine learning gives the machine ability to learn different algorithms without strict orders from certain programs or limited instructions [33].Deep learning can be defined as technique of machine learning used to learn useful features directly from given Bitcoin transaction, paths, and subnet domain. Many layers are exploited by deep learning for nonlinear data processing of unsupervised or supervise feature extraction for classification and pattern recognition [34]. Deep learning motivation is greatly reduced by Artificial Intelligence (AI) area, which simulates the human brain ability to analyze data, make decision, and learn. Deep learning goal is to emulate the approach of hierarchical learning of extracting features by human brain directly from unsupervised data.The core of deep learning is the hierarchical computation of features and representation of information, such as defining features starting form low level to high level. With cryptocurrency, the standard techniques of machine learning do not work well when running directly due to ignoring nature of blockchain. In deep learning, features are extracted automatically from Bitcoin transaction. One of the characteristics of these feature methods is considered to be learning in the system [35].The character of Bitcoin transactions as a function is a key issue for the processing or success of the digital currency. Features extracted in Bitcoin have some limitations [36]. For this reason, we can use deep learning with its feature extraction to solve risk issues in digital currency.The main difference between machine learning and deep learning is feature selection method, as shown in Figure2.Figure 2
Difference of normal neural network and deep learning in feature analysis techniques.Features in deep learning will be generated automatically to simulate the appropriate results [37]. Different hidden layers participate in decision making by using the feedback from one next layer to previous one, or resulting layer will be fed into first layer [38]. DL enables computers to perform complex calculations by relying on simpler calculations to optimize computer efficiency. It is difficult for a computer to understand complex data such as transaction number and weights or subnet region of a complex nature, so we use deep learning algorithms instead of usual learning methods [39].Deep learning considers the nonlinear relation between blockchain and transaction determining the weight of Bitcoin reconstructed that depends on linear model since the variation of digital currency gets large. This is actually because linear model is similar to nonlinear behavior of the relationship between Bitcoin transactions and the data of the previous hour [37]. For this reason, DNN is used to solve the nonlinear model of improving quality of Bitcoin prediction. The second factor that deep learning takes into consideration is the speed. Real time is necessary in dealing with online currency during data acquisition and analysis prediction.


## 2.6. Blockchain of Finance

The blockchain starts when dealing with some anonymous fake online transactions. This dealing over the Internet is described as peer to peer payment through blockchain infrastructure. Payments are defined as Bitcoin, the first cryptocurrency and the largest currency, giving them hundreds of other currencies, that is digital cash. Technology of blockchain is established on the principles of gathering all the transactions data to be block of public ledger. They part and connect to previous block via a Merkle root, in form of fixed chain as shown in Figure3.Figure 3
Blockchain structure.Cryptocurrencies spread their transactions that take agreement from neighboring nodes to integrate together to achieve chain.This is known as the verification process of competitive entry. Therefore, the finance of blockchain is defined as decentralized process and the management as capability of self-management. Process of cryptography supports this technology and is known as proof-of-work. It is the algorithm fee reward that each node earns as part of contributing node power mathematically expressed as(2)PB−1=R2HH−1HR−1.PB−1 is the probability of parting node of block 1, R is hash rate to certain node, and H is hash rate of the network rate (competitors).The equation above illustrates that larger hashing power to user and probability of the node can reach the correct transaction; when it is confirmed, the reward will go into effect and it is found that the number of blocks per minute is actually a binary distribution. Proof of stake is known as the alternative cryptographic method for distribution achievements. It is an algorithm mainly based on process of leader selection and expressed by(3)pi=Si∑k=1nSk,where pi is the probability of the node leadership i and si is stakehold via stakeholder Ui while sk is stakehold via another stakeholder.


## 2.7. Proposed Method

In this study, we focus on the digital currency effectiveness and prediction. Then, we apply deep learning algorithm to increase the accuracy of prediction and reduce the statistical risk in cryptocurrency. Figure4 shows the general framework of the proposed method starting by collecting two categories of data firstly. The data provided in the last history are used in the training system.Figure 4
General flowchart for proposed method.Training mode is supposed to be labeled with known results in advance, and neural network has to put the result which is known in advance in order to build the system on this basis, in addition to the information gathered from previous months about transactions of digital currency. Features will be extracted in this stage to be processed according the weight supported.Predictive model called linear regression is used to formulate a line located at the best fit separating between dependent variable scalar and multiple variables. Mean square error is considered between actual and predicted output and minimized by the linear fit. Some calculation is needed such as parameterization (or factorized form), hypothesis, linear regression goal, and cost function, as follows:(4)hθx=θ0+θ1x,Jθ0⋅θ1=12m∑i=1mhθxi−yi2,minθ0.θ1Jθ0⋅θ1,where the hypothesis h is provided with parameters θ0.θ1 to satisfy the cost function J to find its minimum.Neural network considers the family of machine learning technique, derived from the biological nervous system via modeling interconnected neurons’ system that depends on iterative learning. Neural network system starts with feeding by connecting multidimensional input to the hidden layer neurons before predicting the right result. The entered data or features go through several shifts depending on the weight of the features and the neural network construction strategy. Each hidden layer produces data for any other layer, or its results go to the inputs of previous layers as feedback.Normally, nonlinear functions such ash function are used after each output layer, N × N dimensions’ matrix suggested for adjustment N is considered account numbers, nodes can be represented as rows and columns in a matrix matrix, connected nodes in a pattern use non-zero values to represent the relationship between nodes and their transactions. The process of neural network is shown in Figure 5.Figure 5
Depicting nodes and their transactions within proposed DNN.Depicting all the information collected from blockchain to form vector and matrix makes prediction easy, and neural network can determine root mean square error (RMSE) as in the following equation:(5)R2=1−∑i=1Nyprei−yexpi2∑i=1Nyprei−y¯2,RMSE=1N∑i=1Nyprei−yexpi2.ypre and yexp are experimental and predicted variables. y¯ is the average of dependent experimental variable, and N is the total iteration number of running the system; maximum R2 with minimum RMSE makes the best performance of DNN.This study used movements of Bitcoins in Europe, Canada, and USA trading company as data processing and datasets. Because these data have been marked and informationized, in addition to checking the accuracy of the proposed method, we can also understand the movements of large companies in the market.


## 3. Experimental Results

The many leveraged iterations for neural network model are used to predict price of digital currency (Bitcoin) on hour in the future to reduce statistical risk by using improved feature set. For the baseline prediction setting, set the normal prediction and increment the process per hour to achieve normal mean squared error. Then, neural network is applied with normal features extracted to run the system. In the last running, DNN was applied with preprocessing of feature reduction on many iterations. This is actually running under training mode with fetching data from previous predicted data as shown in Table1.Table 1
Model’s result.
Model runningNo. of iterationsMSEN-prediction12.7Neural network3 (hidden layers)1.6DNN121.02Prediction error is a controlling factor in determining statistical risk and plays an important role in the benefit reward of digital currency. DNN experiments the results many times during iterations and feeds back the predicted result to the neural system again when it is not proper or suitable prediction.To evaluate the system, we considered year 2018 for training to find the accuracy. Accuracy reflects the good prediction of the system by comparing the actual results with the expected results and the degree of convergence between them. Figure6 shows the accuracy over accumulative square error.Figure 6
Accuracy of training system.According to Figure6, we can notice the extent of the convergence between the accuracy of the prediction proposed by the DNN and the actual results. This result can reflect the worthiness of the model and how it can avoid the risk of the greed of investors and speculators in the stock market for digital currency.Proposed informative features such as net flow through the account (per hour) and transactions’ number are provided by new address for given hour. Figure7 shows the correlation of features; many of the transactions are close to zero, as well as the flow of nodes in the system. This information allows moving Bitcoin. We can also notice that when the feature is large and positive, the price will decrease, while when feature is large and negative, the price will increase.Figure 7
Correlation of features and transactions.


## 4. Conclusion

The digital currency term is commonly used in the present day, but there are many risks involved in digital currency, so it is imperative to find a way to avoid or reduce the risks faced by those who deal with Bitcoin. Deep learning is widely used to solve complex cases that require an advanced prediction of financial transactions. One of the deep learning algorithms used in this study, deep neural network, has been improved to adapt to this problem statement to be suited to the appropriate way to resolve such cases. Features extracted in advance were used to build neural network from the transactions and nodes (Bitcoin) with currency return. Prediction process was used to reduce uninformative features to gain per hour data that satisfy requirement of the algorithm. Deep neural network achieved worthy results in terms of accuracy and MSE when trained on given previous data of year 2018. Prediction of benefit of Bitcoin in advance helps to avoid statistical risk in digital currency.



---

*Source: 2611063-2022-01-27.xml*