# Research on Stock Market Portfolio Optimization Using Stochastic Matrix Theory and Genetic Algorithm

Authors: YanJin Zhang
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

Financial engineering is a synthesis of modern finance, information technology, engineering, and other fields. Under the complex and volatile market conditions, how to allocate assets reasonably to minimize the benefits and risks assumed is a very important topic. Using the principle of random matrix, the correlation statistical characteristics of stocks are analyzed, the noise reduction and reconstruction algorithm of the correlation matrix is discussed, and a new noise reduction algorithm, two-point determination method, is given. The investment portfolio is numerically simulated, and its parameters are set by the orthogonal experimental method. Through analysis, it is found that the eigenvector contained in the maximum eigenvalue of the correlation matrix can be regarded as a market indicator. The “two-point determination method” has a good effect in “denoising” and can provide operational decision-making and technical support for portfolios.


---

## Body

## 1. Introduction

Finance is a subject full of vitality. Most people think that the origin of modern finance comes from Markowitz’s portfolio selection theory. Markowitz published a seminal article called “Portfolio Selection” in 1952 [1]. In this article, Markowitz describes how to use portfolios to diversify and maximize returns, and for the first time, under the guidance of classical probability theory, gives a probabilistic-based average—Variance method [2]. A large number of domestic and foreign experts have conducted in-depth discussions on securities investment management. This paper makes an in-depth discussion on the securities investment portfolio from three perspectives: seeking new methods of capital return and risk measurement under unstable conditions, focusing on building a portfolio selection model suitable for various investment conditions, and focusing on the optimization method of establishing the best combination decision-making mode and the corresponding practical application. Portfolio issues refer to investment decisions made under conditions of uncertainty. In recent years, many scholars at home and abroad have done a lot of work in this area [3].Since the 1960s, many people have conducted in-depth discussions on the relevant theories of securities investment based on Markowitz's mean-variance analysis [4]. According to Roy's point of view on portfolios, Kataoka and Telser have successively introduced various types of “safety first” models [5]. In practice, investors often need to adjust their investment decisions to obtain the greatest benefits, which requires investors to regard investment decisions as a multilevel and dynamic issue. Many scholars have successively launched a series of multiperiod portfolio selection models [6]. The development of my country’s securities portfolio theory is relatively lagging behind, and there is still a certain distance from the mature foreign financial market theory [7]. But in recent years, it has shown a thriving trend, and there have been some results. Beyer et al. [8] proposed a specific solution to the optimal problem of securities portfolio and the definition of optimal decision-making, and from the perspective of the matrix, he obtained the risk size of the securities investment portfolio. Tang et al. also conducted a mathematical analysis of the effectiveness limit of portfolio securities under various constraints. The portfolio securities without negative constraints are analyzed. This paper discusses how to construct the stock portfolio selection problem when it cannot be sold. Zhang Weiguo made in-depth discussions from the aspects of theory, model, method, and application.In our country, some researches have been carried out on the fuzzy and uncertain problem of securities investment portfolio, and some research results have been obtained. On the basis of probability theory, Xintian and Li [9] proposed several new models and corresponding efficient calculation methods. Wei [10] proposed a new fuzzy decision-making method. Zhaohan [11] and others analyzed the portfolio of fuzzy returns. Zhaohan [12] analyzed it based on the fuzzy possibility theory, and on this basis, Fang Yong conducted in-depth research on this problem. Liu Yanchun discussed the optimal model of risky asset portfolio based on average-WCVaR. Paulo et al. [13] studied the optimal problem of portfolio investment with multiple projects and multiple stages, and conducted in-depth research on the optimal problem of multistage investment based on the net present value. Bucsa et al. discussed a new stock portfolio decision-making method based on fuzzy index [14]. On this basis, Zhou Hongtao studied the optimization of multiple indicators.In conclusion, from a theoretical point of view, there are few discussions on the specific value range and specific analysis formula of the security portfolio. And according to its own uncertain factors (random and fuzzy), relevant algorithms are found and analyzed with examples. Using the random matrix method, the statistical properties of the correlation of stocks are analyzed and their properties and stability are discussed. The study found that the eigenvector contained in the maximum eigenvalue of the correlation matrix can be regarded as a market indicator. This paper mainly discusses the correlation-based matrix noise reduction-reconstruction algorithm and presents a new secondary judgment algorithm research The effects of various noise reduction techniques such as correlation matrix stability, portfolio risk, and portfolio effectiveness boundaries are analyzed. Based on the mean square error method, this paper proposes a mean square error-based optimal model for asset size, which includes a risk-free approach, the interest, and the number of bonds. In order to facilitate the investment of enterprises, transaction costs are reduced and the investment efficiency of enterprises is improved. The method was solved by NSGA-II genetic algorithm, and the parameter setting of the method was optimized by orthogonal experiment method.


## 2. Portfolio Optimization of Securities Based on Random Matrix Theory

### 2.1. Portfolio Management

Securities investment portfolio refers to the allocation of various assets by investors according to their own needs and effective management of them during the investment process. Investors often weigh the risk of an investment against the expected return, and high return means high risk.The MV model requires estimates of sampled income and variance. In addition, due to the errors caused by the data used, the accuracy of the variation-covariance matrix of stock returns has a greater effect on the effectiveness of the method. Many experiments have proved that the method contains many disturbances, which makes the optimal solution of this method produces a large offset, which results in an optimal solution to the model. The noise disturbance is eliminated in the portfolio correlation matrix to obtain an efficient security that matches the actual demand.


### 2.2. RMT-Based Portfolio Optimization

According to the principle of random matrix, in a portfolio, the variance-covariance (correlation matrix) composed of the covariance of securities and income, most of the information it contains is “useless,” that is, it can be regarded as “ noise” [15]. The RMT algorithm is used to decompose the noise in the correlation matrix and reorganize the corresponding asset portfolio to make it more efficient.


#### 2.2.1. Establishment of Portfolio Correlation Matrix

Assuming that an investment project containsN resources, if the stock price of the i-th resource at t is Si (t), the rate of return of the asset i is as follows:(1)Rit=lnSit+Δt−lnSit.Because different stocks have different volatility, the above returns need to be normalized.(2)rit=Rit−Rit¯σi.Here,σi is the average return of Ri in a certain period, representing the standard deviation of Ri (t).MV’s portfolio model includes a variation-covariation matrix composed of various stocks, the covariance of each factor is proportional to each factor, and the correlation reflects the correlation of each asset. If each asset has a negative correlation, the correlation is weak and the covariance is small. Therefore, when constructing a portfolio, selecting a security that is positively correlated with it can effectively reduce the overall investment risk. If both bonds are negative, diversification completely removes this danger and is a very effective behavior. However, empirical surveys show that different stocks have a certain positive relationship. Therefore, in order to diversify investment risks, it is necessary to increase the asset size of securities.


#### 2.2.2. Denoising

According to the random matrix method, the correlation matrix C is divided into two parts: “information” and “noise.” “Information” and “ noise” are defined by the random matrix method. The theoretical maximum eigenvalue and the minimum eigenvalue, the eigenvalue ofC is higher than the theoretical maximum eigenvalue and its corresponding eigenvector. The “information” of the eigenvector C and the eigenvalue and eigenvector between the eigenvalue and the theoretical maximum eigenvalue are “noise.” On the basis of “noise,” the correlation matrix C of the resource is removed, and the correlation matrix of the resource is reconstructed, that is, the new correlation matrix only contains some meaningful data. Therefore, compared with the original correlation matrix, a better combination can be obtained with an affinity matrix.


### 2.3. Stability of the Correlation Matrix

How is the stability of the correlation matrix measured? Krzanowski [16] noted that the degree of overlap of the eigenvectors in two successive cycles determines the similarity (convergence) of the eigenvectors, and that after the vectors are normalized, their number is multiplied by the cosine of the angle of the two vectors. This provides a measure of the degree of overlap of feature vectors. If the two are in the same direction, the remaining string force will become larger, otherwise, it will become very slim. The size of the correlation matrix is larger than the eigenvalue of λmax, and the corresponding eigenvector can obtain more information for the eigenvector. Therefore, to measure the stability of the correlation matrix, Krzanowski proposed to test the influence of small perturbations of eigenvalues on its corresponding eigenvectors vk, the angle θk is the angle between the vectors vk and vkp, and the cosine of the angle θk. It is determined by the following formula:(3)cosθk=1+ξλk−λk−1−1/2,1+ξλk+1−λk−1/2.


## 2.1. Portfolio Management

Securities investment portfolio refers to the allocation of various assets by investors according to their own needs and effective management of them during the investment process. Investors often weigh the risk of an investment against the expected return, and high return means high risk.The MV model requires estimates of sampled income and variance. In addition, due to the errors caused by the data used, the accuracy of the variation-covariance matrix of stock returns has a greater effect on the effectiveness of the method. Many experiments have proved that the method contains many disturbances, which makes the optimal solution of this method produces a large offset, which results in an optimal solution to the model. The noise disturbance is eliminated in the portfolio correlation matrix to obtain an efficient security that matches the actual demand.


## 2.2. RMT-Based Portfolio Optimization

According to the principle of random matrix, in a portfolio, the variance-covariance (correlation matrix) composed of the covariance of securities and income, most of the information it contains is “useless,” that is, it can be regarded as “ noise” [15]. The RMT algorithm is used to decompose the noise in the correlation matrix and reorganize the corresponding asset portfolio to make it more efficient.


### 2.2.1. Establishment of Portfolio Correlation Matrix

Assuming that an investment project containsN resources, if the stock price of the i-th resource at t is Si (t), the rate of return of the asset i is as follows:(1)Rit=lnSit+Δt−lnSit.Because different stocks have different volatility, the above returns need to be normalized.(2)rit=Rit−Rit¯σi.Here,σi is the average return of Ri in a certain period, representing the standard deviation of Ri (t).MV’s portfolio model includes a variation-covariation matrix composed of various stocks, the covariance of each factor is proportional to each factor, and the correlation reflects the correlation of each asset. If each asset has a negative correlation, the correlation is weak and the covariance is small. Therefore, when constructing a portfolio, selecting a security that is positively correlated with it can effectively reduce the overall investment risk. If both bonds are negative, diversification completely removes this danger and is a very effective behavior. However, empirical surveys show that different stocks have a certain positive relationship. Therefore, in order to diversify investment risks, it is necessary to increase the asset size of securities.


### 2.2.2. Denoising

According to the random matrix method, the correlation matrix C is divided into two parts: “information” and “noise.” “Information” and “ noise” are defined by the random matrix method. The theoretical maximum eigenvalue and the minimum eigenvalue, the eigenvalue ofC is higher than the theoretical maximum eigenvalue and its corresponding eigenvector. The “information” of the eigenvector C and the eigenvalue and eigenvector between the eigenvalue and the theoretical maximum eigenvalue are “noise.” On the basis of “noise,” the correlation matrix C of the resource is removed, and the correlation matrix of the resource is reconstructed, that is, the new correlation matrix only contains some meaningful data. Therefore, compared with the original correlation matrix, a better combination can be obtained with an affinity matrix.


## 2.2.1. Establishment of Portfolio Correlation Matrix

Assuming that an investment project containsN resources, if the stock price of the i-th resource at t is Si (t), the rate of return of the asset i is as follows:(1)Rit=lnSit+Δt−lnSit.Because different stocks have different volatility, the above returns need to be normalized.(2)rit=Rit−Rit¯σi.Here,σi is the average return of Ri in a certain period, representing the standard deviation of Ri (t).MV’s portfolio model includes a variation-covariation matrix composed of various stocks, the covariance of each factor is proportional to each factor, and the correlation reflects the correlation of each asset. If each asset has a negative correlation, the correlation is weak and the covariance is small. Therefore, when constructing a portfolio, selecting a security that is positively correlated with it can effectively reduce the overall investment risk. If both bonds are negative, diversification completely removes this danger and is a very effective behavior. However, empirical surveys show that different stocks have a certain positive relationship. Therefore, in order to diversify investment risks, it is necessary to increase the asset size of securities.


## 2.2.2. Denoising

According to the random matrix method, the correlation matrix C is divided into two parts: “information” and “noise.” “Information” and “ noise” are defined by the random matrix method. The theoretical maximum eigenvalue and the minimum eigenvalue, the eigenvalue ofC is higher than the theoretical maximum eigenvalue and its corresponding eigenvector. The “information” of the eigenvector C and the eigenvalue and eigenvector between the eigenvalue and the theoretical maximum eigenvalue are “noise.” On the basis of “noise,” the correlation matrix C of the resource is removed, and the correlation matrix of the resource is reconstructed, that is, the new correlation matrix only contains some meaningful data. Therefore, compared with the original correlation matrix, a better combination can be obtained with an affinity matrix.


## 2.3. Stability of the Correlation Matrix

How is the stability of the correlation matrix measured? Krzanowski [16] noted that the degree of overlap of the eigenvectors in two successive cycles determines the similarity (convergence) of the eigenvectors, and that after the vectors are normalized, their number is multiplied by the cosine of the angle of the two vectors. This provides a measure of the degree of overlap of feature vectors. If the two are in the same direction, the remaining string force will become larger, otherwise, it will become very slim. The size of the correlation matrix is larger than the eigenvalue of λmax, and the corresponding eigenvector can obtain more information for the eigenvector. Therefore, to measure the stability of the correlation matrix, Krzanowski proposed to test the influence of small perturbations of eigenvalues on its corresponding eigenvectors vk, the angle θk is the angle between the vectors vk and vkp, and the cosine of the angle θk. It is determined by the following formula:(3)cosθk=1+ξλk−λk−1−1/2,1+ξλk+1−λk−1/2.


## 3. Empirical Analysis and Discussion

### 3.1. Performance Comparison of Different Denoising Methods

Jolliffe argues that when the correlation matrix is stable, its characteristic vector and the economic implications of its principal components can be unambiguously explained. Therefore, after removing the noise, the stability of the correlation matrix is particularly critical.In this study, 80 A-share stocks on the Shanghai Stock Exchange were taken as samples, and the real returns from 2016-06-02 to 2020-12-31 were taken as the research object. In order to study the stability of the covariance (correlation) matrix of asset portfolios using various noise reduction techniques in random matrices, the research was carried out through various noise reduction techniques.


#### 3.1.1. The Stability of the Correlation Matrix

The rank-overlap relationship curve of the combination initial correlation matrixC is obtained by analyzing the sequential correlation matrix C of the portfolio returns. This method can better reflect the stability of the correlation matrix. Figure 1 is the rank-overlap relationship curve of the initial correlation matrix C of the portfolio. It can be seen from this figure that the higher the order of the correlation matrix, the worse its stability.Figure 1
Rank-overlap plot of the original correlation matrix of the portfolio.By eliminating some noise in the correlation matrix, denoising the combined correlation matrix, and then reconstructing a new combined correlation matrix, the rank-overlap relationship curves of the correlation matrices after various noise removals are obtained, as shown in Figures2–6.Figure 2
Correlation matrix reconstructed based on MI denoising method.Figure 3
Correlation matrix reconstructed based on MII denoising method.Figure 4
Correlation matrix reconstructed based on MIII denoising method.Figure 5
Correlation matrix reconstructed based on MIV denoising method.Figure 6
Correlation matrix reconstructed based on MV denoising method.Figures2–6 show the correlation matrix rank-overlap curve of the noise elimination method MI-MV. It can be seen from the figure that MIII has the best denoising performance, and the correlation matrix column value after denoising is the largest, while MII has the best denoising performance The stability of the noise algorithm decreases sharply after the first few steps, while the MII increases sharply in the later stages. On this basis, this paper proposes a new algorithm based on MII, which adopts a new noise reduction algorithm.MIV is based on MIII. It can be seen from this figures that the stability of the reconstructed correlation matrix obtained by the MIV denoising technique is similar to that of MIII and has good stability. Method MV uses the residual method to represent the characteristic quantity of noise. It can be seen from the image that only some orders have high stability. This algorithm ensures that the integrity of the data is maintained to the greatest extent possible, while avoiding the over-rendering of noise.Figure7 is the rank-overlap curve of the combined reorganization correlation matrix obtained by the two-point determination method (MVI). It can be seen from the figure that although the stability of the correlation matrix of the noise reduction algorithm is not as high as that of the MIII algorithm, but it also ensures the stability of the reconstructed correlation matrix.Figure 7
Correlation matrix reconstructed based on MVI denoising method.Through the comparison of the above six methods, it is found that the MIII method has the best noise reduction effect, and the methods MIV, MV and MVI are MIV, MII and MVI follow respectively. This paper mainly compares the stability of asset allocation and compares it from the risk of asset allocation and the effective margin.


#### 3.1.2. Minimum Variance Portfolio Risk

Table1 shows the minimum variance of the asset portfolio, which is denoised by using a variety of denoising techniques. From the data shown in Table 1, it can be seen that compared with other corresponding risk values, the combined risk of MIII after noise reduction is significantly higher than other corresponding risks, and after using MIII noise reduction in Figure 4, the correlation matrix’s stability is the best, which shows that although this algorithm can obtain a high degree of stability, the risk prediction for the portfolio is relatively large, because when determining the alternative factors, the deviation of the slope selection is large, so posed a greater risk of forecasting. Because this denoising algorithm uses a minimum number of algebras as algebras, choosing the minimum number of algebras will have a certain impact on the final effect, and to achieve the best effect, the minimum number of algebras must be set. However, this requires a lot of complex calculations.Table 1
Minimum variance portfolio risk.
MIMIIMIIIMIVMVMVIR10.29840.30520.73020.29010.31380.3027R20.38390.38390.38390.38390.38390.3839R30.41110.41110.41110.41110.41110.4111R40.37670.37620.59310.38950.37630.3760Except for MIII, the R1 and R4 values of the other two algorithms are relatively similar. Through the analysis of the rank-overlap relationship between the correlation matrix and R4, it can be seen that both the MIV and MV algorithms can improve the correlation after denoising, while also reducing portfolio risk. Under the minimum variance, the MI and MII noise reduction algorithms are not much different from other noise reduction algorithms, but if the denoised correlation matrix is denoised, it cannot be ensured that the denoised correlation matrix remains stable. The new noise reduction algorithm MVI analyzes the stability of the correlation matrix and the risk of combination. Although it is not as simple as the MI and MII algorithms, it does not need to set any parameters for noise reduction, so its processing process is much simpler.However, from the perspective of the risk analysis of the investment portfolio, the data in Table1 is not ideal. Regardless of whether it has been processed by past noise, the prediction of future investment risks is relatively low. There is an important factor in this. The data used are weekly earnings data, and long-term data are used to estimate, which will inevitably reduce the expected risk of investment.


#### 3.1.3. Portfolio Efficient Frontier

Figures8–13 are the legal bounds for portfolios obtained by applying different denoising treatments (MI–MVI) to the correlation matrix (MI–MVI) of the portfolios. The bound is carried out by the initial correlation matrix. Figure 13 is the effective bound of the security estimated with the correlation matrix reconstructed by denoising. It is the security obtained by the initial correlation matrix Efficient bounds for combinations. Optimal bounds for combinations are found using the denoised correlation matrix. As can be seen from the graph, except for MI and MIV, the rest of the graphs are similar: curve (b) is above curve (a), that is, the risk of noise processing is lower than that without noise reduction.Figure 8
Efficient frontier (MI) for portfolios.Figure 9
Efficient frontier (MII) of portfolio.Figure 10
Efficient frontier (MIII) of portfolio.Figure 11
Efficient frontier (MIV) of portfolio.Figure 12
Efficient frontier (MV) of portfolio.Figure 13
Efficient frontier (MVI) of portfolio.The calculated value of MI is quite different from other calculated values, but MI is very close to MI in terms of stability, because their replacement unit spacing is 0, so the stability is poor. However, from the perspective of effective bounds, the difference between MI and other methods is the difference in the sum of the substitution factors. MI replaces the noise characteristic with 0, that is, the sum of the substitution factors is 0, and the sums of other substitution factors are similar to noise. MIII has good stability, but after the effective edge denoising, its effective edge (b) value is not lower than the noise-free value, indicating that the effect of the method is not lower than the noise-free condition under the same income. The main reason for this is that other elements in MIII are still determined by subjectivity, which can lead to errors and thus less satisfactory results. At the same time, MIV also needs to set some parameters in the noise reduction process, which affects the stability of noise reduction. In order to obtain better noise reduction performance, the parameters must be optimized, which increases the complexity of the operation. The MVI algorithm is a new noise reduction algorithm. According to the experimental results, it has a very good inhibitory effect on the stability of the reconstructed correlation matrix and the efficient frontier of the portfolio.


### 3.2. Empirical Analysis of Portfolio Optimization Based on RMT

#### 3.2.1. Minimum Variance Portfolio

The optimal selection problems of portfolio investment include maximizing the benefit of the investment and minimizing the variance. Think of it as a simple way of putting it in terms of minimizing the risk of an investment so that you can get the least amount of risk. This simplified format makes it easy to analyze the effect of noise on securities.Table2 shows the risk of the minimum variance portfolio of 50 securities with Q = T/N = 1, 2, 3, 4, and 5. The following analysis can be obtained from the information in Tables 2 and Table 3:(1)
When the value ofQ (T) increases, the noise contained in the portfolio correlation matrix also decreases accordingly.(2)
Regardless of noise exclusion or not, the forecast results for the first three data are higher than that of the “realized” hazard, i.e., the hazard estimates are often overestimated.(3)
Under the conditions ofQ = 1 to 3, the risk of the portfolio with or without noise is lower than that of the portfolio without noise, and through the noise reduction of RMT, a lower investment risk can be obtained.(4)
From the effect point of view, all the predicted risks are smaller than that of the actual realization risks, which are despised because the increase ofQ(T) will weaken the credibility of historical data, so that predictions cannot be made based on these data. In addition, when Q = 4 and Q = 5 predict an era of economic recession, the risk of investment is unavoidable, and the prediction of long-term historical data will inevitably lead to the underestimation of the risk of investment.Table 2
50 stocks of minimum variance portfolio risk.
R1R2R3R4λ > λmaxNNoise%Q = 10.47560.47760.32130.326829.30198Q = 20.37780.39830.35540.349723.32184Q = 30.33230.34460.27250.273520.55178Q = 40.26500.35350.42760.356118.87/5.40240Q = 50.37640.33430.58190.605018.05/4.05268


#### 3.2.2. Portfolio Efficient Frontier

Figures14–17 are the active bounds for a portfolio of 50 stocks with Qs of 2, 3, 4, and 5 Q, respectively. It can be seen from the four subfigures that all curves (b) are located on the left side of curve (a), that is, under the same expected income level, the forecast risk after noise is smaller than that of the forecast without noise reduction.Figure 14
Efficient frontier whenQ = 2.Figure 15
Efficient frontier whenQ = 3.Figure 16
Efficient frontier whenQ = 4.Figure 17
Efficient frontier whenQ = 5.Comparing the 4 figures, it is found that in the case ofQ = 2, the best result is obtained. When Q = 2, when the investment return reaches the same level, the investment risk is the lowest. When Q = 2, the optimal security portfolio is in the range of less risk. When the Q value increases, its risk increases and the expected return does not increase. An increase in Q indicates an increase in the duration of historical data. According to RMT theory, when Q increases, the noise contained in the correlation matrix will decrease. However, increasing Q does not make it reach the optimal investment allocation because of its time effect. At the same time, since the model is based on weekly income and has large time intervals, Q increases, that is, from long-term historical data, the risk of the security is predicted. When the Q value is 3, 4, and 5, with the increase of Q, the optimal side length curve of the noise gradually tends to decrease. So the choice of Q depends on the sampling frequency, and RMT is used in RMT to analyze the parameters of high and low frequencies.


## 3.1. Performance Comparison of Different Denoising Methods

Jolliffe argues that when the correlation matrix is stable, its characteristic vector and the economic implications of its principal components can be unambiguously explained. Therefore, after removing the noise, the stability of the correlation matrix is particularly critical.In this study, 80 A-share stocks on the Shanghai Stock Exchange were taken as samples, and the real returns from 2016-06-02 to 2020-12-31 were taken as the research object. In order to study the stability of the covariance (correlation) matrix of asset portfolios using various noise reduction techniques in random matrices, the research was carried out through various noise reduction techniques.


### 3.1.1. The Stability of the Correlation Matrix

The rank-overlap relationship curve of the combination initial correlation matrixC is obtained by analyzing the sequential correlation matrix C of the portfolio returns. This method can better reflect the stability of the correlation matrix. Figure 1 is the rank-overlap relationship curve of the initial correlation matrix C of the portfolio. It can be seen from this figure that the higher the order of the correlation matrix, the worse its stability.Figure 1
Rank-overlap plot of the original correlation matrix of the portfolio.By eliminating some noise in the correlation matrix, denoising the combined correlation matrix, and then reconstructing a new combined correlation matrix, the rank-overlap relationship curves of the correlation matrices after various noise removals are obtained, as shown in Figures2–6.Figure 2
Correlation matrix reconstructed based on MI denoising method.Figure 3
Correlation matrix reconstructed based on MII denoising method.Figure 4
Correlation matrix reconstructed based on MIII denoising method.Figure 5
Correlation matrix reconstructed based on MIV denoising method.Figure 6
Correlation matrix reconstructed based on MV denoising method.Figures2–6 show the correlation matrix rank-overlap curve of the noise elimination method MI-MV. It can be seen from the figure that MIII has the best denoising performance, and the correlation matrix column value after denoising is the largest, while MII has the best denoising performance The stability of the noise algorithm decreases sharply after the first few steps, while the MII increases sharply in the later stages. On this basis, this paper proposes a new algorithm based on MII, which adopts a new noise reduction algorithm.MIV is based on MIII. It can be seen from this figures that the stability of the reconstructed correlation matrix obtained by the MIV denoising technique is similar to that of MIII and has good stability. Method MV uses the residual method to represent the characteristic quantity of noise. It can be seen from the image that only some orders have high stability. This algorithm ensures that the integrity of the data is maintained to the greatest extent possible, while avoiding the over-rendering of noise.Figure7 is the rank-overlap curve of the combined reorganization correlation matrix obtained by the two-point determination method (MVI). It can be seen from the figure that although the stability of the correlation matrix of the noise reduction algorithm is not as high as that of the MIII algorithm, but it also ensures the stability of the reconstructed correlation matrix.Figure 7
Correlation matrix reconstructed based on MVI denoising method.Through the comparison of the above six methods, it is found that the MIII method has the best noise reduction effect, and the methods MIV, MV and MVI are MIV, MII and MVI follow respectively. This paper mainly compares the stability of asset allocation and compares it from the risk of asset allocation and the effective margin.


### 3.1.2. Minimum Variance Portfolio Risk

Table1 shows the minimum variance of the asset portfolio, which is denoised by using a variety of denoising techniques. From the data shown in Table 1, it can be seen that compared with other corresponding risk values, the combined risk of MIII after noise reduction is significantly higher than other corresponding risks, and after using MIII noise reduction in Figure 4, the correlation matrix’s stability is the best, which shows that although this algorithm can obtain a high degree of stability, the risk prediction for the portfolio is relatively large, because when determining the alternative factors, the deviation of the slope selection is large, so posed a greater risk of forecasting. Because this denoising algorithm uses a minimum number of algebras as algebras, choosing the minimum number of algebras will have a certain impact on the final effect, and to achieve the best effect, the minimum number of algebras must be set. However, this requires a lot of complex calculations.Table 1
Minimum variance portfolio risk.
MIMIIMIIIMIVMVMVIR10.29840.30520.73020.29010.31380.3027R20.38390.38390.38390.38390.38390.3839R30.41110.41110.41110.41110.41110.4111R40.37670.37620.59310.38950.37630.3760Except for MIII, the R1 and R4 values of the other two algorithms are relatively similar. Through the analysis of the rank-overlap relationship between the correlation matrix and R4, it can be seen that both the MIV and MV algorithms can improve the correlation after denoising, while also reducing portfolio risk. Under the minimum variance, the MI and MII noise reduction algorithms are not much different from other noise reduction algorithms, but if the denoised correlation matrix is denoised, it cannot be ensured that the denoised correlation matrix remains stable. The new noise reduction algorithm MVI analyzes the stability of the correlation matrix and the risk of combination. Although it is not as simple as the MI and MII algorithms, it does not need to set any parameters for noise reduction, so its processing process is much simpler.However, from the perspective of the risk analysis of the investment portfolio, the data in Table1 is not ideal. Regardless of whether it has been processed by past noise, the prediction of future investment risks is relatively low. There is an important factor in this. The data used are weekly earnings data, and long-term data are used to estimate, which will inevitably reduce the expected risk of investment.


### 3.1.3. Portfolio Efficient Frontier

Figures8–13 are the legal bounds for portfolios obtained by applying different denoising treatments (MI–MVI) to the correlation matrix (MI–MVI) of the portfolios. The bound is carried out by the initial correlation matrix. Figure 13 is the effective bound of the security estimated with the correlation matrix reconstructed by denoising. It is the security obtained by the initial correlation matrix Efficient bounds for combinations. Optimal bounds for combinations are found using the denoised correlation matrix. As can be seen from the graph, except for MI and MIV, the rest of the graphs are similar: curve (b) is above curve (a), that is, the risk of noise processing is lower than that without noise reduction.Figure 8
Efficient frontier (MI) for portfolios.Figure 9
Efficient frontier (MII) of portfolio.Figure 10
Efficient frontier (MIII) of portfolio.Figure 11
Efficient frontier (MIV) of portfolio.Figure 12
Efficient frontier (MV) of portfolio.Figure 13
Efficient frontier (MVI) of portfolio.The calculated value of MI is quite different from other calculated values, but MI is very close to MI in terms of stability, because their replacement unit spacing is 0, so the stability is poor. However, from the perspective of effective bounds, the difference between MI and other methods is the difference in the sum of the substitution factors. MI replaces the noise characteristic with 0, that is, the sum of the substitution factors is 0, and the sums of other substitution factors are similar to noise. MIII has good stability, but after the effective edge denoising, its effective edge (b) value is not lower than the noise-free value, indicating that the effect of the method is not lower than the noise-free condition under the same income. The main reason for this is that other elements in MIII are still determined by subjectivity, which can lead to errors and thus less satisfactory results. At the same time, MIV also needs to set some parameters in the noise reduction process, which affects the stability of noise reduction. In order to obtain better noise reduction performance, the parameters must be optimized, which increases the complexity of the operation. The MVI algorithm is a new noise reduction algorithm. According to the experimental results, it has a very good inhibitory effect on the stability of the reconstructed correlation matrix and the efficient frontier of the portfolio.


## 3.1.1. The Stability of the Correlation Matrix

The rank-overlap relationship curve of the combination initial correlation matrixC is obtained by analyzing the sequential correlation matrix C of the portfolio returns. This method can better reflect the stability of the correlation matrix. Figure 1 is the rank-overlap relationship curve of the initial correlation matrix C of the portfolio. It can be seen from this figure that the higher the order of the correlation matrix, the worse its stability.Figure 1
Rank-overlap plot of the original correlation matrix of the portfolio.By eliminating some noise in the correlation matrix, denoising the combined correlation matrix, and then reconstructing a new combined correlation matrix, the rank-overlap relationship curves of the correlation matrices after various noise removals are obtained, as shown in Figures2–6.Figure 2
Correlation matrix reconstructed based on MI denoising method.Figure 3
Correlation matrix reconstructed based on MII denoising method.Figure 4
Correlation matrix reconstructed based on MIII denoising method.Figure 5
Correlation matrix reconstructed based on MIV denoising method.Figure 6
Correlation matrix reconstructed based on MV denoising method.Figures2–6 show the correlation matrix rank-overlap curve of the noise elimination method MI-MV. It can be seen from the figure that MIII has the best denoising performance, and the correlation matrix column value after denoising is the largest, while MII has the best denoising performance The stability of the noise algorithm decreases sharply after the first few steps, while the MII increases sharply in the later stages. On this basis, this paper proposes a new algorithm based on MII, which adopts a new noise reduction algorithm.MIV is based on MIII. It can be seen from this figures that the stability of the reconstructed correlation matrix obtained by the MIV denoising technique is similar to that of MIII and has good stability. Method MV uses the residual method to represent the characteristic quantity of noise. It can be seen from the image that only some orders have high stability. This algorithm ensures that the integrity of the data is maintained to the greatest extent possible, while avoiding the over-rendering of noise.Figure7 is the rank-overlap curve of the combined reorganization correlation matrix obtained by the two-point determination method (MVI). It can be seen from the figure that although the stability of the correlation matrix of the noise reduction algorithm is not as high as that of the MIII algorithm, but it also ensures the stability of the reconstructed correlation matrix.Figure 7
Correlation matrix reconstructed based on MVI denoising method.Through the comparison of the above six methods, it is found that the MIII method has the best noise reduction effect, and the methods MIV, MV and MVI are MIV, MII and MVI follow respectively. This paper mainly compares the stability of asset allocation and compares it from the risk of asset allocation and the effective margin.


## 3.1.2. Minimum Variance Portfolio Risk

Table1 shows the minimum variance of the asset portfolio, which is denoised by using a variety of denoising techniques. From the data shown in Table 1, it can be seen that compared with other corresponding risk values, the combined risk of MIII after noise reduction is significantly higher than other corresponding risks, and after using MIII noise reduction in Figure 4, the correlation matrix’s stability is the best, which shows that although this algorithm can obtain a high degree of stability, the risk prediction for the portfolio is relatively large, because when determining the alternative factors, the deviation of the slope selection is large, so posed a greater risk of forecasting. Because this denoising algorithm uses a minimum number of algebras as algebras, choosing the minimum number of algebras will have a certain impact on the final effect, and to achieve the best effect, the minimum number of algebras must be set. However, this requires a lot of complex calculations.Table 1
Minimum variance portfolio risk.
MIMIIMIIIMIVMVMVIR10.29840.30520.73020.29010.31380.3027R20.38390.38390.38390.38390.38390.3839R30.41110.41110.41110.41110.41110.4111R40.37670.37620.59310.38950.37630.3760Except for MIII, the R1 and R4 values of the other two algorithms are relatively similar. Through the analysis of the rank-overlap relationship between the correlation matrix and R4, it can be seen that both the MIV and MV algorithms can improve the correlation after denoising, while also reducing portfolio risk. Under the minimum variance, the MI and MII noise reduction algorithms are not much different from other noise reduction algorithms, but if the denoised correlation matrix is denoised, it cannot be ensured that the denoised correlation matrix remains stable. The new noise reduction algorithm MVI analyzes the stability of the correlation matrix and the risk of combination. Although it is not as simple as the MI and MII algorithms, it does not need to set any parameters for noise reduction, so its processing process is much simpler.However, from the perspective of the risk analysis of the investment portfolio, the data in Table1 is not ideal. Regardless of whether it has been processed by past noise, the prediction of future investment risks is relatively low. There is an important factor in this. The data used are weekly earnings data, and long-term data are used to estimate, which will inevitably reduce the expected risk of investment.


## 3.1.3. Portfolio Efficient Frontier

Figures8–13 are the legal bounds for portfolios obtained by applying different denoising treatments (MI–MVI) to the correlation matrix (MI–MVI) of the portfolios. The bound is carried out by the initial correlation matrix. Figure 13 is the effective bound of the security estimated with the correlation matrix reconstructed by denoising. It is the security obtained by the initial correlation matrix Efficient bounds for combinations. Optimal bounds for combinations are found using the denoised correlation matrix. As can be seen from the graph, except for MI and MIV, the rest of the graphs are similar: curve (b) is above curve (a), that is, the risk of noise processing is lower than that without noise reduction.Figure 8
Efficient frontier (MI) for portfolios.Figure 9
Efficient frontier (MII) of portfolio.Figure 10
Efficient frontier (MIII) of portfolio.Figure 11
Efficient frontier (MIV) of portfolio.Figure 12
Efficient frontier (MV) of portfolio.Figure 13
Efficient frontier (MVI) of portfolio.The calculated value of MI is quite different from other calculated values, but MI is very close to MI in terms of stability, because their replacement unit spacing is 0, so the stability is poor. However, from the perspective of effective bounds, the difference between MI and other methods is the difference in the sum of the substitution factors. MI replaces the noise characteristic with 0, that is, the sum of the substitution factors is 0, and the sums of other substitution factors are similar to noise. MIII has good stability, but after the effective edge denoising, its effective edge (b) value is not lower than the noise-free value, indicating that the effect of the method is not lower than the noise-free condition under the same income. The main reason for this is that other elements in MIII are still determined by subjectivity, which can lead to errors and thus less satisfactory results. At the same time, MIV also needs to set some parameters in the noise reduction process, which affects the stability of noise reduction. In order to obtain better noise reduction performance, the parameters must be optimized, which increases the complexity of the operation. The MVI algorithm is a new noise reduction algorithm. According to the experimental results, it has a very good inhibitory effect on the stability of the reconstructed correlation matrix and the efficient frontier of the portfolio.


## 3.2. Empirical Analysis of Portfolio Optimization Based on RMT

### 3.2.1. Minimum Variance Portfolio

The optimal selection problems of portfolio investment include maximizing the benefit of the investment and minimizing the variance. Think of it as a simple way of putting it in terms of minimizing the risk of an investment so that you can get the least amount of risk. This simplified format makes it easy to analyze the effect of noise on securities.Table2 shows the risk of the minimum variance portfolio of 50 securities with Q = T/N = 1, 2, 3, 4, and 5. The following analysis can be obtained from the information in Tables 2 and Table 3:(1)
When the value ofQ (T) increases, the noise contained in the portfolio correlation matrix also decreases accordingly.(2)
Regardless of noise exclusion or not, the forecast results for the first three data are higher than that of the “realized” hazard, i.e., the hazard estimates are often overestimated.(3)
Under the conditions ofQ = 1 to 3, the risk of the portfolio with or without noise is lower than that of the portfolio without noise, and through the noise reduction of RMT, a lower investment risk can be obtained.(4)
From the effect point of view, all the predicted risks are smaller than that of the actual realization risks, which are despised because the increase ofQ(T) will weaken the credibility of historical data, so that predictions cannot be made based on these data. In addition, when Q = 4 and Q = 5 predict an era of economic recession, the risk of investment is unavoidable, and the prediction of long-term historical data will inevitably lead to the underestimation of the risk of investment.Table 2
50 stocks of minimum variance portfolio risk.
R1R2R3R4λ > λmaxNNoise%Q = 10.47560.47760.32130.326829.30198Q = 20.37780.39830.35540.349723.32184Q = 30.33230.34460.27250.273520.55178Q = 40.26500.35350.42760.356118.87/5.40240Q = 50.37640.33430.58190.605018.05/4.05268


### 3.2.2. Portfolio Efficient Frontier

Figures14–17 are the active bounds for a portfolio of 50 stocks with Qs of 2, 3, 4, and 5 Q, respectively. It can be seen from the four subfigures that all curves (b) are located on the left side of curve (a), that is, under the same expected income level, the forecast risk after noise is smaller than that of the forecast without noise reduction.Figure 14
Efficient frontier whenQ = 2.Figure 15
Efficient frontier whenQ = 3.Figure 16
Efficient frontier whenQ = 4.Figure 17
Efficient frontier whenQ = 5.Comparing the 4 figures, it is found that in the case ofQ = 2, the best result is obtained. When Q = 2, when the investment return reaches the same level, the investment risk is the lowest. When Q = 2, the optimal security portfolio is in the range of less risk. When the Q value increases, its risk increases and the expected return does not increase. An increase in Q indicates an increase in the duration of historical data. According to RMT theory, when Q increases, the noise contained in the correlation matrix will decrease. However, increasing Q does not make it reach the optimal investment allocation because of its time effect. At the same time, since the model is based on weekly income and has large time intervals, Q increases, that is, from long-term historical data, the risk of the security is predicted. When the Q value is 3, 4, and 5, with the increase of Q, the optimal side length curve of the noise gradually tends to decrease. So the choice of Q depends on the sampling frequency, and RMT is used in RMT to analyze the parameters of high and low frequencies.


## 3.2.1. Minimum Variance Portfolio

The optimal selection problems of portfolio investment include maximizing the benefit of the investment and minimizing the variance. Think of it as a simple way of putting it in terms of minimizing the risk of an investment so that you can get the least amount of risk. This simplified format makes it easy to analyze the effect of noise on securities.Table2 shows the risk of the minimum variance portfolio of 50 securities with Q = T/N = 1, 2, 3, 4, and 5. The following analysis can be obtained from the information in Tables 2 and Table 3:(1)
When the value ofQ (T) increases, the noise contained in the portfolio correlation matrix also decreases accordingly.(2)
Regardless of noise exclusion or not, the forecast results for the first three data are higher than that of the “realized” hazard, i.e., the hazard estimates are often overestimated.(3)
Under the conditions ofQ = 1 to 3, the risk of the portfolio with or without noise is lower than that of the portfolio without noise, and through the noise reduction of RMT, a lower investment risk can be obtained.(4)
From the effect point of view, all the predicted risks are smaller than that of the actual realization risks, which are despised because the increase ofQ(T) will weaken the credibility of historical data, so that predictions cannot be made based on these data. In addition, when Q = 4 and Q = 5 predict an era of economic recession, the risk of investment is unavoidable, and the prediction of long-term historical data will inevitably lead to the underestimation of the risk of investment.Table 2
50 stocks of minimum variance portfolio risk.
R1R2R3R4λ > λmaxNNoise%Q = 10.47560.47760.32130.326829.30198Q = 20.37780.39830.35540.349723.32184Q = 30.33230.34460.27250.273520.55178Q = 40.26500.35350.42760.356118.87/5.40240Q = 50.37640.33430.58190.605018.05/4.05268


## 3.2.2. Portfolio Efficient Frontier

Figures14–17 are the active bounds for a portfolio of 50 stocks with Qs of 2, 3, 4, and 5 Q, respectively. It can be seen from the four subfigures that all curves (b) are located on the left side of curve (a), that is, under the same expected income level, the forecast risk after noise is smaller than that of the forecast without noise reduction.Figure 14
Efficient frontier whenQ = 2.Figure 15
Efficient frontier whenQ = 3.Figure 16
Efficient frontier whenQ = 4.Figure 17
Efficient frontier whenQ = 5.Comparing the 4 figures, it is found that in the case ofQ = 2, the best result is obtained. When Q = 2, when the investment return reaches the same level, the investment risk is the lowest. When Q = 2, the optimal security portfolio is in the range of less risk. When the Q value increases, its risk increases and the expected return does not increase. An increase in Q indicates an increase in the duration of historical data. According to RMT theory, when Q increases, the noise contained in the correlation matrix will decrease. However, increasing Q does not make it reach the optimal investment allocation because of its time effect. At the same time, since the model is based on weekly income and has large time intervals, Q increases, that is, from long-term historical data, the risk of the security is predicted. When the Q value is 3, 4, and 5, with the increase of Q, the optimal side length curve of the noise gradually tends to decrease. So the choice of Q depends on the sampling frequency, and RMT is used in RMT to analyze the parameters of high and low frequencies.


## 4. Empirical Analysis of NSGA-II Genetic Algorithm Parameter Optimization

Table3 is an empirical study of the evaluation index, and the optimal level is combined as a parameter of its algorithm. As can be seen from the table, the empirical analysis results of A1B5C1 have shorter running time and smaller SP, but the resources in its portfolio have not decreased, while A5B1C5, as the calculation method of calculation parameters, although the calculation period is longer, the SP is larger, but the total amount of resources is reduced. Therefore, under the same evolutionary algebra, comparing SP should select ABC as the parameter of the optimization algorithm from the optimal mode.Table 3
The results of the two groups of parameter evaluation indicators.
A1B5C1A5B1C5Elapsed timeSPNumber of assetsElapsed timeSPNumber of assets11840.896159.22202715.436148.1921810.590759.71167214.213648.7431820.507059.77169014.740548.0641920.316559.91156315.436148.1951890.406359.79170614.213648.74The mean185.60.543359.681731.614.808048.38Figures18 and 19 are experimental data for the combination of two optimal levels of A1B5C1 and A5B1C5 as an optimized computational method. The empirical analysis of the optimal combination of A5B1C5 shows that the optimal combination of A5B1C5 is much better than that of A1B5C1. Therefore, when optimizing the parameters of NSGA-II, it is necessary to evaluate it not only from its own characteristics, but also from a specific problem. The conventional test method is not only ineffective, but a kind of blind obedience. Through example analysis, it is proved that it is a feasible way to use orthogonal experiment to determine the reasonable combination of factors.Figure 18
A1B5C1 empirical results.Figure 19
A5B1C5 empirical results.From the optimal solution, it can be known that when the rate of return and the degree of risk of stocks reach a certain level, this method can effectively select stocks and reduce the number of assets invested in stocks. Before investing, investors should choose different types of investment targets based on various factors such as the macro situation, stock market conditions, and their own investment experience, and then choose the most suitable investment targets according to their own preferences and use the above methods, providing reference for investors to make investment decisions, and can effectively guide the investment type and investment scale of the fund, reducing the investment risk of investors to the fund. At the same time, investors can also make periodic adjustments to their assets through this model.


## 5. Conclusion

Today, when the capital market is becoming more mature and standardized, quantitative investment has gradually formed a brand-new asset allocation and combination. Quantitative research is also an important feature and development direction of contemporary capital. Based on the actual needs of investors, using NSGA-III random matrix analysis technology and NSGA-III genetic algorithm, the technical process and technical system of securities data analysis, processing, and model solving are established, and the model is tested through comprehensive empirical analysis. The correctness and feasibility provide theoretical and technical support for the management of securities investment portfolio. This paper conducts an empirical study on investment portfolios containing multiple securities and finds that diversification can effectively reduce the risk of investment, but when the investment scale reaches a certain level, this effect becomes negligible. Using this method, we can reduce the funds in securities investment and reduce the management of securities investment, thus verifying the correctness and effectiveness of the model.



---

*Source: 8355934-2022-08-25.xml*