Machine Learning-Based Analysis of Cryptocurrency Market Financial Risk Management

Cryptocurrency is one of the famous financial state in all over the world which cause several type of risks that effect on the intrinsic assessment of risk auditors. From the beginning the growth of cryptocurrency gives the financial business with the wide risk in term of presentation of money laundering. In the institution of financial supports such as anti-money laundering, banks and secrecy of banks proceed as a specialist of risk, manager of bank and officer of compliance which has a provocation for the related transaction through cryptocurrency and the users who hide the illegal funds.In this study, the Hierarchical Risk Parity and unsupervised machine learning applied on the cryptocurrency framework. The process of professional accounting in term of inherent risk connected with cryptocurrency regarding the occurrence likelihood and statement of financial impact. Determining cryptocurrency risks comprehended to have a high rate of occurrence likelihood and the access of private key which is unauthorized. The professional cryptocurrency experience in transaction cause the lower risk comparing the less experienced one. The Hierarchical Risk Parity gives the better output in term of returning the adjusted risk tail to get the better risk management result.The result section shows the proposed model is robust to various intervals which are re-balanced and the co-variance window estimation.


I. INTRODUCTION
Financial market is one of the complex systems that the definition of complexity didn't get accepted from universities and this cause the agreement in term of interacting the elements of complex systems together. Complex system modeling is similar to daunting task which the structure of this system organized based on hierarchical manner that collected their own subsystems [1]- [3]. This resources extracted by the name of hierarchical models. Unfortunately, in the process of portfolio construction there is a hug challenge regarding the lack of correlation matrix in hierarchical structure. This issue worsen the matrices for large covariance. In recent decades, around 2500 type of cryptocurrencies which contains the 252. 5

trillion dollar of trading in this
The associate editor coordinating the review of this manuscript and approving it for publication was Juan Liu . market [4]- [6]. The cryptocurrency reverberation transpire in, out of order environment [7]- [10]. Even news publishers had more interest and closer attention to the price changes and the large remote of actions to the soar unmitigated. Rules set up is for investors protecting and try to stop the money laundry. Similarly, stop the crowd for the fiat currency. Regarding all the mentioned good wills, implementation and theories shows the dedicated movement of price of cryptocurrency market. Lahre et al. [11] propose the strategy of Hierarchical Risk Parity (HRP) on the multi-asset multi-factor allocation which achieves the good results on tail risk. Moreover, Jain et al. [12] applied the same strategy for the individual stocks to comport the fifty indexes of NIFTY. Raffinot et al. [13], compares different varients of HRP (HERC and HCCA) and evaluates the performance of them. Brauneis et al. [14] uses the mean-variance framework to analyze the portfolios of cryptocurrency based on the Markowitz optimization with the high ratio. Walid et al. [15] proposed the relationship between cryptocurrencies based on the highest frequency. The presented system gives the output of useful marketing insights and gives the allowance to the agent to improve the system stability. Platanakis et al. [16], demonstrates the estimation error in term of return estimation rather than naively diversified (1/N) strategy. Similarly, they used [17] the model of Black Litterman based on the variance constraints to support the sophisticated portfolio technique for estimation control of the simple methods to manage the cryptocurrency. Saba et al. [18] applied the wavelet-based analysis for cryptocurrency multi-scale dynamic interdependence between the liquid cryptocurrencies to count the traders and investors heterogeneous behaviour. Corbet et al. [19] compare the different rules of trading in term of average-oscillator to breakout the range of trading strategies. Based on the reports of cryptocurrency related audit considerations and Chartered Professional Accountants Cananda (CPAC), building the general awareness for the intrinsic risks of the ecosystem of digital assets recommended. In 2018, the CPAC reported a list which shows the cryptocurrency special risks mentioned as below: • Choosing the exchange of cryptocurrency based on the entity contains no control on transactions and its overbalanced for the maintained account of the entity.
• Cryptocurrecy wallet which is belonging to the entity has no account.
• Its not possible to access to cryptocurrency by loosing the private key.
• If an unauthorized party get any access to the private key then all the cryptocurrency stolen.
• Misrepresentation of private key of entity.
• Sending the incorrect address from entity which is not possible of recovery from cryptocurrency.
• The transactions of cryptocurrency get recorded from entity which has no identification possibility based on the anonymity of the transactions in blockchain.
• The cryptocurrency contains the delay of transactions in the end of period.
• It become difficult to record the conditions and events for the financial purposes.
Some of the mentioned risks contain the higher likely-hood such as the private key which is belonging to only one person and its a secret number which gives the access to the blockchain funds. By loosing this key getting access to the cryptocurrency contains the highest-impact risk which cause the delay in process of cryptocurrency. The main contribution of this research summarized as below: • Using the Hierarchical Risk Parity for the cryptocurrency portfolio based on the usage of machine learning techniques.
• The proposed system is able to examine the professional accounting based on the associated risk of cryptocurrency and the impact which is expected from financial statement. • Finding the intrinsic risk which are correlated negatively in the cryptocurrency.
• Ranking the exchange level control risk based on the likelihood evaluation.
• Finding the highest likelihood risk of the determined cryptocurrency. The rest of the process is divided as follows: Section 2 represents the brief literature review related to risk management of cryptocurrency framework. Section 3 presents the systematic structure of the proposed risk management system. Section 4 presents the implementation process and development environment details. We conclude this paper in the conclusion section.

II. STATE-OF-THE-ART
Cryptocurrency is a decentralized type of currency that developed and designed in 2008 which without the need of involving bank makes the possibility of peer-to-peer transaction [20]- [23]. Huge number of articles reported that the cryptocurrency plays an import role in term of growth of financial crimes [24]- [26]. Based on the report of anti-money in CipherTrace, almost 125 million dollar lost and stolen regarding the different breaches of security. Regarding to the report of BIS Annual Economic Report in 2018, the cryptocurrency makes an agreement to update the long-standing financial institution trust with the system of decentralized architecture. Based on the universal aspect of Internet, most of the cryptocurrencies become convenient based on passing from associated financial fees to the system of traditional banking [27]- [29]. Table 1 shows the comparison of the related state-of-the-art in cryptocurrency risk management.

A. LAUNDERING OF MONEY IN CRYPTOCURRENCY SYSTEM
The growth of various cryptocurrency types noted as six fold in 2015-2018 in term of financial crimes [33]. In the recent years, cryptocurrency become a common financial procedure which used as tax evasion, money laundering and terrorism that there is no need of identity for the criminals which makes everything difficult for banks to peruse the money VOLUME 10, 2022 laundering [34]. Misusing of funds get stated from Cipher-Trace of the holders of cryptocurrency that contains almost 4.3 billion dollars in 2019 [35]. Based on the advanced level of cryptocurrency technological features, the institutions of financial system make a barrier and struggle with the crimes of cryptocurrency regarding the lack of knowledge related to system of banks and abilities of agencies in the conflict of money laundering [36]. The advanced technologies like the computer science based cryptography enhanced the cryptocurrency enforcement entities which not caught up fully yet [37]. Table 2 shows the market capability of different cryptocurrencies during 2020. In total five cryptocurrencies record compared together.

B. ACTS AND FINANCIAL REGULATIONS
Banks which considered as financial institutions defined some adjustments to assist them for identification of money laundering and suspicious process [38], [39]. Based on the lack of oversight regarding the suitable regulatory, the money laundering increased in cryptocurrency system [40]. Regarding the regulation deficiency, the scheme of cryptocurrency is the legal risk for the subject of security [41]. The government can't prohibit the blockchain and cryptocurrency regarding their popularity in development of supervision regulation which contains the safe guard to overcome the damages of financial institution [42]. In one of the case studies related to Financial Action Task Force [43], the Altaf Khanami laundered a hug amount of money (billion dollars) illegally for dealings drug, weapons dealing and lots of groups of terrorists. In another case, the money used for the support of proceeding the criminal approaches in Nigeria. Table 3 shows the details of banks related to financial investigation and education attended to interview of cipher trace.

C. EFFICIENCY OF MONEY LAUNDERING FOR FINANCIAL INSTITUTIONS
The financial institutions and banks are the pole of finance flow in term of direct prey of money laundering. Banks tarnish the fame regarding the money laundering to customers that loose their confidence and value and similarly scaring from the safety of their funds [44]. Zali et al. [45], used the legal trick for criminals by using the financial employees help to move the money into the another account to avoid paying fines owing to lack of detailed policies of anti-money laundering. Table 4 shows the summery of penalties that USA banks paid during 2019 to 2012. The information taken from ''https://www.bankersonline.com/penalty/penalty-type/ bsa-aml-civil-money-penalties'' website and due to lots of penalty records in 2012, we set the state from that period.

III. METHODOLOGY
In this section we focus on details of proposed exchange rate prediction approach. HRP concept is graph-based theory and using the machine learning techniques in three main steps defined as: • Clustering • recursive bisection • quasi-diagonalization The first step initiate the assets into various clusters based on applying the Hierarchical Tree Clustering algorithm. The correlation matrix between two assets of x and y converted to the correlation distance matrix A in the following Equation 1: Next step, shows the evaluation between all the pair-wise manner columns based on the Euclidean distance process which gives us the augmentation matrix distanceÂ as following Equation 2: By using the recursive approach, from Equation 2 the clusters created. By defining the set of clusters as C and the first cluster as (x * , y * ) evaluated as Equation 3: Based on this the defined distance matrix updates theÂ evaluation process and all the assets use the C[1] single clustering linkage. Therefore, for every asset x out of the cluster, the distance of new cluster evaluated as Equation 4: Figure 1 gives the overview of the proposed risk management system. The first part shows the cryptocurrency network details which contains the request for transaction that process into the P2P network. After validation of the transaction request from minors the combined transaction goes into data block and add the news block to the blockchain and complete the transaction. There are two main parts in the cryptocurrency decentralized network which based on regulation prevent the financial crimes and damages of the financial institutions. In this process, there are four main things which mentioned to prevent as money laundering, corruption, fines which banks suppose to pay and terror activities. The damages from this step cause the loosing trust of customer, it effects on the interest rates and compliance programs. There are four main process for the money laundering as the sources of income, placement, layering and integration which all of the are from the illegal incomes. To avoid this, we applied reinforcement learning technique for risk management of the digital coins transactions and money laundering.

A. REINFORCEMENT LEARNING-BASED RISK MANAGEMENT
Reinforcement learning (RL) is a learning-based machine learning algorithm which is based on the correct input that improves the performance of system [46]. Figure 2 shows the process of risk management using RL. The meaning of risk management in the proposed system is to identify, evaluate and prioritization the system risks. As it shown, the management problem of the portfolio describes the RL-based trading system with specifications by considering the risks and profits of the management issues. Regarding the expressing of the portfolio management problem in the RL architecture, the system agent provides the strategies of trading the assets in the current state of the environment of capital market. All the assets trading information's are connected to the environment. The strategy of trading provided by agent. The evaluation of this trading strategy gives the reward and provide to the agent the next state information.

B. DATA
The applied data in this process is from daily cryptocurrency prices from 2017 to 2020 and the prices collected from coinmarketcap website. We exclude the missing data information due to avoid the incompatible process in applied algorithm. The missing parts covered by propagating with the reliable forwarded observation. The final records of data are showing the 61 cryptocurrencies details. The reason of 61 cryptocurrencies is related to the project which we have limited data access. Table 5 shows the sample information of 10 cryptocurrencies as below. The total number of dataset is ten thousand records and 80% applied for training set and 20% for testing set.
Following Figures 3, 4, 5, 6 presents the proof of significant growth during 2016 and 2017 that follows the sharp decline during 2018 regarding the Asia regulation and eveywhere.

IV. RESULTS ANALYSIS AND DISCUSSION
In this process, we applied three famous risk-based assets traditional approach for allocation strategy to make the comparison with HPR that as mentioned in Table 6, 7 and 8, Inverse Volatility (IV), Minimum Variance (MV) and Maximum Diversification (MD). In this process we used the rolling window analysis and evaluate the average value of the defined range. The rolling window set as 350, 600 and 850. The performance of the out-of-sample HPR portfolio in 350 days co-variance estimation summarized in Table 6. The HPR annualized volatility and return are in row 0.7718 and 1.7802. Moreover, MD gives the result of 3.42 more return result and IV decrease the volatility to 1.5 slightly. The balance of HPR in term of risk and return has the high effect which provides the trade-off best risk-return result comparing with sharp ratio. All the process follows for the 600 and 850 days in same way.

A. RISK MANAGEMENT IMPLICATION
Regarding to the generated results of the risk performance portfolio, the risk assessments implication analysed for further processing the system. There are three features as reference portfolio, Risk-min and determined portfolio that VOLUME 10, 2022  compares the five cryptocurrencies assets. In the first step, for each portfolio, the risk reduction assets compared with variance reduction against the portfolio of benchmark. In this process, four risk metrics downsides defined asset the portfolio of cryptocurrency by providing the risk protection downsides. More specifically, the Regret (RE), Semi-Variance (SV), Expected Shortfall (ES), Value-at-Risk (VaR) evaluated for every portfolio. The details of results presented in Table 9. The 30 days records also presented in Table 10. Both tables gives the report of cryptocurrency portfolios and risk-minimizing records which provide better result as compare with other portfolios. Similarly, adding the Ether in portfolio of risk-minimizing gives the high risk reduction as compare to another cryptocurrencies. For the strategy of VaR, risk reduction in maximum level is equal to portfolio weight in four of mentioned cryptocurrencies but Litecoin    gives the higher VaR reduction record. Comparing all of the cryptocurrencies together, the Monero has the highest reduction in the VaR. The ES value for all cases is negative and  indicates the evidence against the reduction of ES strategy. The portfolio of minimizing risk gives the information related risk reduction maximum downside comparison of Ether with VOLUME 10, 2022  other crypto types. The logic behind the benefits of such diversification can be regarding to the level of Ether which is the second largest trading cryptocurrency in term of market capitalization.

B. PERFORMANCE EVALUATION OF THE PROPOSED RISK MANAGEMENT
The comparison between existing research works and the most common benchmarks in this area, the two management portfolio algorithms and the basic DQN of the trading system compared with the proposed RL. The Uniform Buy and Hold (UBAH) strategy support the portfolio until the end of process and investing the assets during process. Uniform Constant Re-balanced Portfolio(BCRP) uses in trading duration to re-balance the portfolio. Passive Aggressive Mean Reversion strategy(PAMR) and Exponential Gradient(EG) are the other two portfolio algorithms. Table 11 shows the   comparison of the proposed RL algorithms with other existing works in term of risk management of cryptocurrency network. Figure 7 shows the output of proposed RL and MDD baseline. The trading agent of MDD in this system reached to 13% in a way that the Maximum Draw Down (MDD) in Hold contain 49% and in case of MDD in random is 64%. In case that the baseline looses the funds of investments, the stability of the proposed system reach to almost 1.15. Figure 8 shows the risk index regularity in cryptocurrency market in time period of 2018 to 2020. The highest volatility extracted from uncertain policy. The movement of risk index is synchronous.

V. CONCLUSION
In this study, the risk management of cryptocurrency network analysed using the Reinforcement Learning (RL) technique and asset allocation method named as Hierarchical Risk Parity (HRP) that applied in cryptocurrencies portfolio. Reinforcement learning gives a high performance evaluation results as compare to other machine learning techniques have been used in this area. The main reason of applying RL in this process is the learning-based aspect of this approach which gives the opportunity to system structure to get the high accuracy in term of giving the right information to system. Moreover, the HRP has the highest properties and desirable diversification. The results analyzed using various estimation windows and methodologies and similarly re-balancing the selected period. The applied HRP gives the transitional asset allocations meaningful alternative and improve the risk management process. In future research, the proposed technique will extended by applying out-of-sample testing performance in more assets and classes and using techniques of optimization to get better performance in term of risk management.