Application of Machine Learning and CoVaR Model on Intelligent Decision Method

The traditional asset allocation model does not take into account the spread of systemic risk in the process of portfolio optimization, which will lead to great losses in the portfolio when facing financial risks, especially extreme risks. In order to solve this problem, this paper improves the efficiency frontier of Markowitz, takes the factors that cause changes in the rate of return on individual underlying assets into the consideration of systemic risk, applies CoVaR model to measure the spread of systemic risk, and constructs a new asset allocation model based on Mean-CoVaR. The results show that when considering systemic risk shocks, the impact of systemic risk diffusion on Mean-CoVaR portfolio is significantly lower than that of traditional Mean-Variance portfolio. And Mean-CoVaR model is more efficient for portfolio allocation.


Introduction
With the acceleration of the process of economic globalization, the global financial market has become more and more closely linked in recent years, resulting in a closer relationship between financial assets; and with the progress of science and technology, the transmission of information is getting faster and faster, and the information network has connected a single market into one. It is more likely to cause a single asset problem to form a systemic risk through a high degree of market linkage [1]. At the same time, in the environment of the rapid development of the financial market, products continue to push through the old and bring forth the new, which is relatively easy to produce extremely unstable risk situations, especially the subprime mortgage crisis in 2008, resulting in the deterioration of the global investment environment [2]. The huge losses of individual institutions or assets cause huge losses and spread to other institutions or assets and even the market as a whole [3]. Therefore, when the market is more developed and the investment channels are more diversified, risk management is more important [4].
The traditional portfolio risk management concept represented by Markowitz only pays attention to its own risk and does not consider the effect of risk contagion among financial assets, which will lead to great losses in the portfolio under the condition of extreme market risk. If the consideration of risk contagion can be included in the portfolio model, it will improve the effect of risk diversification and further reduce the possibility of extreme losses in the portfolio, so as to enhance the effectiveness of the portfolio. This has important practical significance for portfolio optimization. In view of this, this paper mainly discusses the possibility of bringing the effect of risk diffusion into the unified analysis framework of portfolio optimization to test whether it helps to reduce portfolio losses [5].

Model construction and estimation
With the development of the financial market, the methods of measuring risk are also innovated. From the beginning, the variance or standard deviation of the rate of return on assets is used to measure risk, and then the concepts of value at risk (VaR), conditional value at risk (CVaR) and CoVaR are developed. And in the decision-making of asset allocation, these different risk measurement methods are also used to accurately grasp the risk of the investment portfolio and improve the efficiency of investment. This paper takes CoVaR as the evaluation standard of portfolio risk and constructs the Mean-CoVaR asset allocation model [6].
Reviewing the definition of VaR, given that the financial institution I is under the rate of return and confidence level 1merq, then can be expressed as: Note that is usually negative, but in practice, is usually expressed as a positive value [7]. VaR is a risk assessment of a single financial asset, which cannot reflect the degree of risk spillover between financial assets, so Adrian and Brunnermeier (2008) put forward the concept of CoVaR on the basis of VaR, indicating the value of risk faced by financial institutions when financial asset j is at risk level. Therefore, CoVaR ij q is a kind of conditional risk that reflects financial asset I to financial asset j, which can be expressed as follows: As can be seen from formula (2), CoVaR ij q is essentially a conditional VaR, which measures the total degree of risk faced by financial assets, including the value at risk of I and the risk spillover effect of j. CoVaR reflects conditional risk and contagion risk, which is mainly aimed at measuring the risk of extreme events under the extreme probability of the tail, and has the concept of conditionality, which can be used to capture the effect of risk contagion.
According to the above definition of CoVaR, it is assumed that the underlying rjt is the rate of return of the market, and the underlying is the rate of return of other underlying assets in the portfolio, so CoVaR ( | ) can be used to measure the impact on the spread of other underlying risks when systemic risks occur in the market. On the basis of quantile regression calculation, the above concepts can be transformed into the following models [8]: Where | is the rate of return of the underlying asset I (or the rate of return of the portfolio), r j is the rate of return of the market, then after minimizing the absolute deviation, r i | j , α I | j and β I | j in formula (3) can be obtained: Then � | is the CoVaR value of the underlying asset under extreme market returns. According to the above CoVaR model, and combined with the Markowitz (1952) optimal portfolio model, the optimal asset allocation model based on Mean-CoVaR is constructed, and its simplified form is as follows:  (5) Where is the weight of investing in type I assets, α and β are the estimated coefficients in quantile regression, ε t is the residual term in quantile regression, is the VaR value of the market rate of return at a significant level of τ%, n is the number of underlying assets in portfolio P, ‾ is the average daily rate of return of asset I, Rp portfolio P is the expected rate of return of portfolio P, and rexp is the required rate of return of portfolio P. Ritrjt is the rate of return of asset I at t, and rjt is the rate of return of the market at t. In the above model, the goal formula is to minimize the CoVaR value in the investment, and to solve the optimal portfolio under the Mean-CoVaR model under the condition that the return rate of the portfolio is at least higher than the market rate of return under the condition of short selling, and in accordance with the quantile regression model.

Data sources
The Shanghai 50 Index was officially issued by the Shanghai Stock Exchange on January 2, 2004. among the stocks listed on the Shanghai Stock Exchange, 50 stocks with large scale and good liquidity are selected as constituent stocks, and their market capitalization is used as the weighted weight. The SSE 50 index cannot only reflect the performance of blue chips, but also the reference standard of Huaxia SSE 50 ETF. Its cost shares are characterized by large scale, good liquidity, and the replacement of constituent stocks and the adjustment of weights are relatively stable. It is suitable for institutional legal persons to carry out portfolio hedging and arbitrage operations, and it is the evaluation standard of fund investment performance. In addition, as the price trend of the Shanghai 50 Index is almost the same as that of the Shanghai Composite Index, it cannot only be used to simulate the performance of the stock market, but also can be traded directly in the market to facilitate practical operation. Therefore, this paper takes the Shanghai 50 index as the market target, taking into account the underlying asset trading volume and liquidity, using the top 6 stocks in the Shanghai 50 index as the underlying assets. they are: ping an of China (600318), China Merchants Bank (600036), Guizhou Moutai (600519), Industrial Bank (601166), Minsheng Bank (600016) and Bank of Communications (601328) [9].
In this paper, the sample period is from January 4, 2010 to December 31, 2016, a total of 7 years, excluding the missing data, 1700 samples are obtained. The data comes from the Ruisi database, and the following calculation operations are completed by R software programming.

Mean-CoVaR model estimation
Based on the constructed Mean-CoVaR model, the number of underlying assets selected in this paper is 6 stocks, that is, NF6, and the sample range is from January 4, 2010 to December 31, 2016, a total of 1700 samples. In addition, we choose the trend of the Shanghai 50 index as the market performance, and the significance level is 5% (τ% = 5%), then the VaR value of the Shanghai 50 index is 1.155%, that is, 1.155%. This model requires the rate of return to be the average daily rate of return of the Shanghai 50 index. Because the average daily return of the Shanghai 50 index in the sample range is-2.96E murine 5, which is close to 0.    Under the Mean-CoVaR model constructed above, we apply the sample data such as the rate of return on assets set above, and divide the rate of return of the investment portfolio and the corresponding target weight of each portfolio into 100 points. Figure 1 is the efficiency frontier of 100 groups of portfolios based on the MeanCoVaR model. At the same time, the article lists the weight distribution of 100 groups of optimal portfolios, as shown in figure 2.
As can be seen from figures 1 and 2, the risk value of the minimum point in the efficiency frontier o f the Mean-CoVaR model is 0.0337 and the portfolio return is 0.0006, that is, the portfolio return is les s affected by systemic risk diffusion, and the portfolio asset allocation at this point is shown in figure 3 .

Comparison of empirical results
In order to compare the effect of Mean-CoVaR model, this paper uses Markowitz's Mean-Variance model to calculate the efficiency frontier of the underlying portfolio. At the same time, because the efficiency frontier of the Mean-Variance model is in the yield-standard deviation coordinate space, in order to compare and analyze, the weight allocation results of the optimal portfolios in the Mean-Variance model are substituted into the CoVaR formula, the CoVaR value of the portfolio is deduced back, and the Mean-Variance efficiency frontier is transformed from the original rate of return-standard deviation coordinate space to the return-CoVaR coordinate space for comparison.
As can be seen from figure 4, under the same portfolio return (0.0006), the CoVaR value of the Mean-CoVaR model is less than that of the Mean-Variance model (0.0337 < 0.044013), that is, the asset allocation according to the portfolio An of the Mean-CoVaR model is less affected by the spread of systemic risk than that of the portfolio B of the Mean-Variance model.
In addition, under the condition of the same rate of return, the CoVaR values of other investment portfolios on the efficiency frontier of the Mean-CoVaR model are smaller than those on the Mean-Variance efficiency frontier, so when considering systemic risk spillovers, the asset allocation of the Mean-CoVaR model is more efficient than that of the Mean-Variance model. In addition, in terms of the Sharp ratio of point An and B, the Sharp ratio of point An is 0.04, which is greater than 0.007 of point B. therefore, the portfolio allocation performance of point An is better than that of B. at the same time, according to the comparison of the Sharp rate of the portfolio of the two models in figure 5, 92% of the portfolio Sharp ratio based on the Mean-CoVaR model is higher than that of the Mean-Variance model, so the overall portfolio allocation performance of the Mean-CoVaR model is better than that of the Mean-Variance model. Based on the above empirical results, under the condition of considering risk spillover, the portfolio allocation performance of MeanCoVaR model is better than that of Mean-Variance model. Mean-CoVaR portfolio model, taking the market risk spillover effect into account, it will be possible to reduce the loss of the portfolio in the event of a market crash and maintain a good investment performance.

Conclusion
This paper combines the concept of CoVaR with the Markowitz portfolio model, incorporates the consideration of risk diffusion in the framework of the traditional investment model, and constructs a new portfolio allocation model based on the Mean-CoVaR model. Using the top 6 stocks in the Shanghai 50 index as the underlying assets and the Shanghai 50 index as the risk source, by selecting the samples from January 4, 2010 to December 31, 2016, The main results are as follows: (1) when taking the CoVaR of the investment portfolio as a risk consideration, the impact of systemic risk diffusion on the investment portfolio based on MeanCoVaR is significantly lower than that of the traditional Mean-Variance portfolio, and the Mean-CoVaR model is more efficient for portfolio allocation.
(2) according to the test results during the sample period, the portfolio based on the Mean-CoVaR model can significantly reduce the possibility of loss, and its impact of systemic risk diffusion is significantly lower than that of the portfolio based on Mean-Variance. And during the sample period, 92% of the Sharp value of the portfolio of the Mean-CoVaR model is higher than that of the Mean-Variance model, and the investment performance is better.