Optimizing Portfolio Risk of Cryptocurrencies Using Data-Driven Risk Measures

: Portfolio risk management plays an important role in successful investments. Portfolio standard deviation, value-at-risk, expected shortfall, and maximum absolute deviation are widely used portfolio risk measures. However, the existing portfolio risk measures are vulnerable to larger skewness and kurtosis of the asset returns. Moreover, the traditional assumption of normality of the portfolio returns leads to the underestimation of portfolio risk. Cryptocurrencies are a decentralized digital medium of exchange. In contrast to physical money, cryptocurrency payments exist purely as digital entries on an online ledger called blockchain that describe speciﬁc transactions. Due to the high volume and high frequency of cryptocurrency transactions, risk forecasting using daily data is not enough, and a high-frequency analysis is required. High-frequency data reveal a very high excess kurtosis and skewness for returns of cryptocurrencies. In order to incorporate larger skewness and kurtosis of the cryptocurrencies, a data-driven portfolio risk measure is minimized to obtain the optimal portfolio weights. A recently proposed data-driven volatility forecasting approach with daily data are used to study risk forecasting for cryptocurrencies with high-frequency (hourly) big data. The paper emphasizes the superiority of portfolio selection of cryptocurrencies by minimizing the recently proposed risk measure over the traditional minimum variance portfolio.


Introduction and Motivation
Portfolio risk management plays an important role in successful investments. Following the global financial crisis in 2008 (see Appel and Grabinski 2011 for more details), financial markets are faced with a need for implementing sustainable forecasting models incorporating market risks. Some studies (Klinkova and Grabinski 2017) suggest that investing (betting) on unpredictable stock prices is identical to gambling. Employing volatility, value-at-risk (VaR), and conditional value-at-risk (CVaR) in the decision-making process of capital allocation helps to avoid the future risk of financial failures. A Basel III monitoring report by the Basel Committee on Banking Supervision in 2021 The Bank for International Settlements (2021) requires financial institutions to use more complex credit scoring models for efficient capital allocation and enhanced risk management.
A cryptocurrency is a digital form of money. Cryptocurrencies derive their value purely from the trust that is placed on them, and they are not backed by any commodity, such as gold or silver. The first cryptocurrency, Bitcoin, was founded in 2009 by Satoshi Nakamoto (a pseudonym) defining it as a "Peer-to-Peer (P2P) Electronic Cash System" Nakamoto (2008). Compared to the traditional systems which utilize a client-server, Bitcoin can be transferred through a P2P network from one user to other. This provides higher security compared to the traditional systems as it does depend on intermediaries and their central servers. The investments incorporating cryptocurrencies in their portfolios saw a rise during the year 2017 when Bitcoin started gaining significant value and popularity. However, despite high returns, it has also led to high risk in portfolios due to high skepticism about the widespread adoption of cryptocurrencies. Studies have been carried out for further comparison of cryptocurrencies with other portfolios such as stocks, currencies, and commodities Ma et al. (2020).
Recent studies in the area of computational finance have identified the negative effect of high kurtosis of the returns on traditional approaches Thavaneswaran et al. (2019Thavaneswaran et al. ( , 2020; Liang et al. (2020). Furthermore, the normality assumption of returns leads to the underestimation of risks. This is due to the fact that the distributions of most returns tend to be not normal and have heavy or fat tails that tend to be skewed. That is, the traditional assumption of normality of the portfolio returns leads to underestimation of portfolio risk. It is also important to point out that, even though a random variable has a Gaussian-like distribution, the standard deviation may not be equal to sigma because, in many cases, random variables do not take values from negative infinity to positive infinity. Thus, drawing conclusions from distributions which are not exactly Gaussian needs a different approach (see Grabinski and Klinkova 2020 for more details).
In this study, we investigate portfolios of five stocks and six cryptocurrencies. Apple (APPL), Amazon (AMZN), Microsoft (MSFT), Adobe (ADBE), and Marvel (MRVL) are studied under stocks and Bitcoin (BTC), Ether (ETH), Binance Coin (BNB), Ripple (XRP), Dogecoin (DOGE), and Cardano (ADA) are the cryptocurrencies studied (Appendix A). The selection of cryptocurrencies is based on their market capitalization, and respective market capitals are obtained from Coinmarketcap (http://www.coinmarketcap.com, accessed on 18 August 2022) CoinMarketCap (n.d.). Furthermore, we categorize cryptocurrencies into two groups based on the adjusted closing prices. Group 1 includes cryptocurrencies BTC, ETH, and BNB with higher exchange prices, and group 2 concludes XRP, DOGE, and ADA with relatively lower price ranges. We collect all our data from Yahoo! Finance (http://www.finance.yahoo.com, accessed on 18 August 2022) YahooFinance (n.d.), which is a leading source of financial data. The window of our study period is from 1 April 2020 to 18 February 2022, and we investigate high-frequency data for all the stocks and cryptocurrencies considering hourly adjusted closing prices.
The paper investigates two research questions. The first research question of interest is the appropriate distribution for the returns and what properties high-frequency cryptocurrency data hold. The second research question of interest is what the optimal weights of an investment portfolio are that maximize returns while minimizing the risk. The remainder of the paper consists of three sections and the conclusions. Section 2 provides a literature review of portfolio optimization, and Section 3 discusses models and methods. Section 4 provides a detailed summary of the numerical experiment(s) for regular stocks and cryptocurrencies.

Literature Review
Traditionally popular forecasting models such as normal GARCH, student-t GARCH, and Exponentially Weighted Moving Average (EWMA) compute conditional variance to obtain conditional volatility by taking the square root. However, direct estimation of volatility is far more superior to the traditional approach, as it is not influenced by heavy tail distributions of assets' continuous compounded returns Thavaneswaran et al. (2020). As the value of a cryptocurrency is driven purely by the trust that is placed on them, and the transactions can happen at any point in time, volatility associated with cryptocurrencies is very high Baur and Dimpfl (2018); Peng et al. (2018). Studies Thavaneswaran et al. (2020Thavaneswaran et al. ( , 2019; Liang et al. (2020) focus on the estimation of an investment's volatility, along with other risk metrics like VaR. In 1952, Markowitz introduced modern portfolio theory with a framework to calculate optimal weights of assets in an investment portfolio Selection (1959). The model investigates the maximization of expected portfolio return for a given level of risk. Since the initial work, different versions of the model have been studied, and the recent study Thavaneswaran et al. (2021) emphasizes risk metrics for portfolio risk with an emphasis on volatility and sign correlation. The results conclude that these outperform the commonly used tangency portfolios. However, there is no significant work to integrate skewness and kurtosis in the portfolio risk measures on high-frequency price data for cryptocurrencies.
The problem of selecting an optimal portfolio from a set of volatile financial assets has been studied using various diverse approaches such as the multiple-criteria decision analysis (MCDA) in work by Aljinović et al. (2021) and more recently by Juskaite and Gudelytė-Žilinskienė (2022) for cryptocurrency. In addition, the work by Basilio et al. (2018) studies the application of MCDA-based portfolio selection for assets traded on Brazilian stock market stocks. Another interesting approach by Pätäri et al. (2012) involves using data envelopment analysis (DEA) to select assets in a portfolio by combining the benefits of value investing and momentum-based investing.
This study opens a new avenue for future research in the area of portfolio optimization with big data for cryptocurrencies. The real data application starts with developing an objective function capturing two components. The first component concludes the expected return of the portfolio and the second component captures variance. The objective is to maximize portfolio return while minimizing the variance. The corresponding weights for the portfolio are generated from a uniform distribution. Summation of the weights adds to one simulating investing one dollar among the assets/cryptocurrencies. Generated weights are used to simulate a different kind of portfolio, and one with the highest return and lowest variance is chosen as the optimal combination of weights. Both traditional and data-driven risk measures are explored, and results are compared to identify the superiority of the approaches.

Background on the Measurement of Portfolio Risk
In portfolio optimization, two popular streams of models have been developed with the objective of minimizing portfolio variance while maximizing portfolio returns. Optimizing portfolio returns for a given level of variance, also directly attributed as risk, has been studied in literature extensively Best (2010). However, traditional risk measures fail to incorporate high kurtosis and skewness of returns. Studies accounting for high skewness and kurtosis lead to different conclusions than the traditional approaches, and Ref. Lai et al. (2006) studied simultaneously the effect of maximizing skewness and expected return and minimizing kurtosis.
Suppose there are n assets and R (i) ; i = 1, ..., n is the asset returns. Two metrics µ and Σ are the expected return and variance-covariance matrix of assets. Let the column vector x = (x 1 , x 2 , . . . , x n ) (z represent transpose of vector z) denote wealth's proportion invested in the selected assets and µ p (x) and σ 2 P (x) is portfolio expected return and variance: In usual notation, the budget constraints for the portfolio are l x = 1, where l = (1, 1, . . . , 1) . Here, the objective is to find the optimal assignments of wealth with maximum return and minimum risk. The objective can be studied as an optimization problem: where λ is the risk tolerance level of the investor. As the value of λ increases, the portfolio has a high risk with high returns.

Data-Driven Portfolio Risk Measure
Recent studies Thavaneswaran et al. (2020) and Zhu et al. (2020) investigate the heavytailed student-t distributions of returns of different asset prices. For a random variable X with mean µ X , the sign correlation is defined by Let F(x) and σ 2 X be the cumulative distribution function and variance of X, respectively. For finite mean and variance, sign correlation is .
√ 2/π when the random variable X is from a normal distribution and ρ X is less than √ 2/π when it follows a Student's t-distribution. The portfolio sign correlation (ρ P,sgn ) is defined as Thus, portfolio MAD for any distribution is and ρ takes the value of √ 2/π (0.7979) when portfolio MAD is for normal distribution.

Portfolio Risk Measures with Skewness and Kurtosis
Combining the estimates is more analytically complex than combining estimate functions (EFs). Recent study Thavaneswaran et al. (2021) incorporates skewness (μ 3 ) and kurtosis (κ) to introduce a risk measure for the portfolio following the lemma from Thompson and Thavaneswaran (1999) and Liang et al. (2011).

Lemma 1.
In the class of all unbiased EFs of the form g = g 1 + Cg 2 , the one which minimizes Var g is given by and ρ is the correlation between g 1 and g 2 . Notice that, as a result of the combination, variance is reduced by a factor of (1 − ρ 2 ).

Random Weights Algorithm
For the selected n number of assets, corresponding n random weights are generated through a uniform distribution. Weights are independent, and standardized weights sum to one. Let random weights be w = (w 1 , . . . , w n ) and the weighted sum of returns of the assets can be used to calculate corresponding portfolio risk measures. Generated weights are used to simulate different kinds of portfolios, and the one with the highest return and lowest variance is chosen as the optimal combination of weights. In the portfolio optimization literature, w Σw has been used to calculate portfolio standard variance Ma et al. (2020). However, the random weight approach has the computation advantage over the traditional approach, avoiding the calculation of the inverse of the covariance matrix.
Suppose P (i) t denotes adjusted closing price of asset i at time t, and we consider past l + 1 hours of data point for each asset. Simple returns of asset i are calculated by Portfolio returns of asset i are given by for a given random weights w = (w 1 , . . . , w n ). Let us assume that the conditional distribution of portfolio return has the density function f (x) and the inverse of a cumulative distribution function (CDF) at tail probability α is denoted by F −1 (α). Let us also assumeR P andσ P are the portfolio expected return estimate and SD based on the past l observations. Thus, the estimated portfolio MAD is calculated by MAD P = 2ρ P,signσP F(R P )(1 − F(R P )), the volatility estimate for a portfolio based on volatility correlation reduction is calculated by VEV P = 1 −ρ 2 P,volσ P , the volatility estimate for a portfolio based on sign correlation reduction is given by VES P = 1 −ρ 2 P,signσ P , and the volatility estimate for a portfolio based on combined sign and volatility correlation reduction is given by Portfolio Sharpe Ratio (PSR) using standard deviation is defined as: where r f is the risk-free rate. In this study, we set r f = 0 for simplicity as the objective is to maximize a portfolio's excess return to risk on an efficient frontier. Once the corresponding volatility and risk measures are available, Portfolio Sharpe Ratios can be computed as PSR.SD =R P σ P , PSR.MAD =R P MAD P , PSR.VEV =R P VEV P , PSR.VES =R P VES P , and PSR.VESV = R P VESV P for SD, MAD, VEV, VES, and VESV, respectively. The optimal weights w * = (w * 1 , w * 2 , . . . , w * n ) are determined for each portfolio with the highest return and lowest risk. In order to construct annualized portfolio expected return, annualized portfolio risk, d.f., and annualized portfolio Sharpe ratio (APSR) for comparison, these optimal weights are then applied to the data. The APSR is then computed as where Nμ P is the annualized portfolio expected return, √ Nσ P is the annualized portfolio volatility, and N is the number of trading hours in a year. It is also important to note that, for cryptocurrencies, hourly data are available to download for twenty-three hours per day and seven days per week, whereas, due to the opening and closing times of the markets, hourly data are available to download only for seven hours per day and five days per week for stocks. Thus, respective N values for cryptocurrencies and stocks are different.

Results
In this section, we investigate portfolios using random weights. We start our investigation by exploring the adjusted hourly closing prices of stocks and cryptocurrencies (respective plots are given in Figures 1-3). It can be clearly seen that there is a gradual increase in the hourly adjusted closing prices over time for both stocks and cryptocurrencies. However, note that, even though stocks retain their value, cryptocurrencies indicate rapid price changes with gradual price fluctuations. Comparing adjusted closing prices of stocks to cryptocurrencies, one can speculate high volatility for cryptocurrencies.   For Stocks and two groups of cryptocurrencies, summary statistics are provided in Table 1. Note that, even though returns for average returns of both stocks and cryptocurrencies are close, the standard deviation for cryptocurrencies is relatively high, indicating a high risk. In addition, in general, returns of all the assets are skewed and have excess kurtosis, indicating non-normality and heavy-tailed distribution. Cryptocurrencies in the first group are negatively skewed, whereas the second group of cryptocurrencies and all the studied stocks are positively skewed. Kurtosis associated with stocks varies between 8.4 and 10.7, and for cryptocurrencies, it varies from 17.0 to 5293.1. ADA has the highest kurtosis among all the assets, and BTC has the smallest kurtosis among the cryptocurrencies. For each asset, the sample sign correlation is less than 0.79 indicating returns of the assets following a t-distribution. Except for ADA, volatility correlations for stocks are greater than the cryptocurrencies, and ETH has the lowest volatility correlations among all the assets. Figures 4-6 visualize the relationship between portfolio return skewness and kurtosis using random weights. For stocks, the expected portfolio return increases as the portfolio skewness increases and kurtosis decreases. Thus, the expected portfolio return and PSR can be increased by minimizing portfolio kurtosis and maximizing portfolio skewness. Similar conclusions can be drawn for the first group of cryptocurrencies based on Figure 5. However, the second group of cryptocurrencies shows an insignificant correlation between portfolio return, skewness, and kurtosis ( Figure 6). We further investigate the relationship between portfolio skewness and kurtosis as the volatility correlation increases, and Figures 7-9 summarize the results. Increasing the volatility correlation can generally raise PSR and predicted portfolio return. However, the rate of increase is different for the three groups, and stocks are expected to have the highest expected increment in return and PSR with volatility correlation increase.      Optimal weights for the minimum risk (variance) portfolio using SD, VEV, VES, VESV, and MAD are given in Table 2 for three groups. The table also provides annualized portfolio return, risk, and PSR for each risk measure for all the assets. Note that considering the first group of cryptocurrencies the highest weights are assigned to BTC, ETH, and BNB, respectively, under all risk measures. For the second group of cryptocurrencies, the highest portion of the investment is assigned to XRP under all risk measures. Except for the MAD, DOGE accounts for the second-highest weight in the second group of cryptocurrencies. Among the stocks, under all risk measures, ADBE (Adobe) is assigned the lowest weight, and the second-highest weight is taken by MRVL (Marvel). The study also investigates optimal weight assignments of assets under SD, VEV, VES, VESV, and MAD for tangency portfolio and maximum mean risk portfolio. Summarized results for tangency and maximum mean risk portfolio are given in Table 3. The optimal weight assignment for the first group of cryptocurrencies under the maximum mean risk portfolio is similar to that of the minimum variance portfolio. However, for the second group of cryptocurrencies, the optimal weight assignment varies among the risk measures. Among the stocks, AAPL has the highest optimal weight for all the risk measures. ADBE has the lowest optimal weights among the stocks for all the risk measures, following the same results as in the minimum variance portfolio. Optimal weight assignments of minimum risk portfolio and maximum mean risk portfolio are visualized in Figures 10-12 for three asset groups. Note that stocks with low risks, such as AMZN, AAPL, and MSFT, cryptocurrencies with low risks, such as BTC and XRP, are assigned more weights under the minimum risk portfolio under VESV. In contrast, stocks with high risk-adjusted for expected return such as AAPL and MRVL are assigned more weights under the maximum mean risk portfolio under VESV. It is important to note that BTC from cryptocurrency group 1 and XRP from cryptocurrency group 2 are assigned more weights under both minimum risk and maximum mean risk portfolios. Figure 13-15 provide the effective borders of three asset groups' lowest risk and maximum mean risk portfolios utilizing SD, VEV, VES, VESV, and MAD. In addition, there is a greater APSR for each maximum mean-risk portfolio than for the matching minimal risk portfolio. Note that efficient frontiers for stocks are more scattered compared to cryptocurrency groups, and for cryptocurrencies, annualized returns are very high compared to that of stocks. However, cryptocurrencies also account for high annualized risk compared to stocks.      Considering the test data of three asset groups, Figures 16-18 visualize cumulative returns of the portfolios. The black line represents cumulative returns of the portfolios with equal weights (EWQ). The cumulative returns of the minimum and maximum mean risk portfolio using SD, VEV, VES, VESV, and MAD are represented by bottom and top orange, green, red, and purple lines, respectively. Note that, in general, maximum mean risk portfolios perform better than minimum risk portfolios for stocks ( Figure 16). However, the performance of minimum risk and maximum mean risk portfolios are very close (Figures 17 and 18), and, still, maximum mean risk portfolios outperform minimum risk portfolios.

Conclusions
Cryptocurrencies face risks such as volatility, lack of regulation in their trade, hacker risk, etc., and the resulting portfolios constructed with cryptocurrencies are very risky.
A straightforward yet powerful data-driven portfolio risk measure integrating skewness and kurtosis is provided to obtain optimal portfolio weights for cryptocurrency assets using the hourly price data. The novelty of the paper is to use the recently proposed volatility correlation-based portfolio risk measure and construct resilient portfolios for cryptocurrencies without inverting the higher order covariance matrix of the portfolio returns as used in many traditional approaches.
Our experimental observations suggest that hourly adjusted closing prices capture more detailed and comprehensive analysis, making a high-frequency analysis with big data possible. High-frequency data also reveal a very high excess kurtosis for returns of cryptocurrencies. Moreover, this study emphasizes the superiority of portfolio selection using data-driven methods over the traditional portfolio standard deviation methods.
It is important to point out that optimal weights are chosen from a pool of weights generated from a uniform distribution. Even though 8000 combinations of random weights are considered in the study, the ideal approach is to obtain optimal weights by solving an optimization problem. However, it requires high computation power, and it is to be believed beyond the scope of this study. Furthermore, the study does not investigate portfolios with a combination of financial instruments from three groups, as would be the case in many real-life situations. Future research will consider mixed portfolios of three groups with more stocks and cryptocurrencies, which is a natural extension of this work.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A
The selection of cryptocurrencies is based on market capitalization, and Coinmarketcap (http://www.coinmarketcap.com, accessed on 18 August 2022) CoinMarketCap (n.d.) is a potential source of information on the market capitalization of each asset. Even though high-frequency data for cryptocurrencies are available in Yahoo! Finance (http://www.finance.yahoo.com, accessed on 18 August 2022) YahooFinance (n.d.) and most of the analysis is conducted using RStudio, RStudio fails to download high-frequency data directly from the source. However, Python is capable of downloading high-frequency data, and portfolio optimization is carried out using RStudio.
Download data using Python: In order to Install "yfinance" type "pip install yfinance" on anaconda terminal. import pandas as pd import y f i n a n c e as y f s t o c k = "BTC−USD" s t a r t _ date = " 2018 −05 −01 " df _ b t c _ d a i l y = y f . download ( s t o c k , s t a r t = s t a r t _ date , i n t e r v a l = " 1h " ) . r e s e t _ index ( ) df _ b t c _ d a i l y . t o _ csv ( ' . / HourlyData . csv ' , index = F a l s e ) Three sets of R codes are required for the three asset groups considered in the study. The required data are saved in the Excel files (e.g., BTC_data_hourly.csv for Bitcoin). If data files and R codes are in the same folder, it is not necessary to set up paths of data files manually in RStudio.