# Design of Optimum Portfolio Scheme Based on Improved NSGA-II Algorithm

Authors: Yiqian Zhou; Weinan Chen; Deqin Lin
Journal: Computational Intelligence and Neuroscience
 (2022)

---

## Abstract

In the financial industry, it is of great significance to study the multiobjective portfolio optimization for obtaining a reasonable investment strategy. This paper designs the financial portfolio scheme based on the multiobjective optimization algorithm that is based on the framework of the NSGA-II algorithm. In order to introduce convergence information, aiming at the actual problem of the portfolio, the mixed individual coding mechanism with asset information expands the application of the multiobjective evolutionary algorithm in portfolio optimization. The portfolio scheme obtained is effective, which is helpful to improve the decision-making efficiency of financial investors and enriches the application of modern financial theory.


---

## Body

## 1. Introduction

With the rapid development of the financial market, investment and financial management are no longer limited to a single way of saving with more investments in securities. How to use more scientific and rational investment strategies to realize capital appreciation has become a problem that investors must consider and pay attention to. Generally speaking, the purpose of investment and financial management is to maximize the income, but benefits and risks often exist at the same time. A portfolio can spread risks, and the key lies in how to allocate assets and how to deal with the relationship between risks and benefits.At present, the financial industry, as one of the important components of China’s economy, has been widely concerned by people in various fields. In reality, the investment fields and fund types are complicated, so the essence of designing a relatively optimal portfolio is a high-dimensional multiobjective optimization problem [1–4]. Meanwhile, the heuristic algorithm can get a satisfactory solution in polynomial time, such as evolutionary algorithm, simulated annealing algorithm, artificial neural network, and quantum algorithm [5–7]. Because of the inherent multiobjective nature of portfolio problem, many scholars usually use a multiobjective evolutionary algorithm to solve it, such as weighting method, constraint method, objective programming method, and minimax method. A multiobjective optimization algorithm does not need to obtain the derivative information of the problem nor does it need to aggregate optimization objectives with different properties. It can deal with enormous scope search space autonomously, where the problem can be solved by parallel search of cyclic iteration, and the average fitness of the species is improved generation by generation to approach the global optimal solution [8, 9]. Therefore, the customized improvement of the problem model can not only expand its related research but also help to advance the decision-making efficiency of investors.


## 2. Theoretical Basis of Portfolio

With the rapid development of science and technology and the continuous improvement of the financial system, China’s financial market is actively integrated with foreign countries where financial products are becoming more diversified, and bonds, stocks, futures, foreign exchange, and various Internet financial derivatives are gradually moving towards the investment scope of ordinary people [10]. Investment is the act of converting funds into assets or capital in a certain period of time, so as to obtain economic returns or value-added benefits. No matter what kind of investment is made, the purpose is to obtain higher returns. However, benefits and risks often coexist. Investors want to get as many benefits as possible and at the same time bear as little risk as possible. Therefore, how to maintain and increase the value of assets through investment and financial management is a great challenge.


### 2.1. Single Investment

The quantitative relationship is applied to the research of portfolio theory, the benefits and risks are quantified, and the two goals of maximizing benefits and minimizing risks are put forward to solve the problems of selection of financial products and allocation of capital proportion for investors [11, 12].In actual investment activities, the average historical real rate of return is usually used to replace the expected rate of return to measure the pros and cons of the portfolio. Assuming that there areM securities in the securities pool, the actual rate of return of securities is calculated as shown in the following formula:(1)ri=Sit−Si0Si0,where ri is the actual rate of return of a security, Sit is the closing price of the securities at the end of the holding period, and Si0 is the closing price of the securities at the initial stage of the cycle.The company’s operation and performance usually have certain stability; therefore, the average historical actual rate of return can be used as the estimate of the expected rate of return of the securities. Assuming that vectorRi=ri1,ri2,…,riTT represents the vector composed of multiperiod historical return rate of the ith asset, so the expected return rate is shown in the following formula:(2)Ri¯=ERi=∑t=1Tritpit,where R¯i is the expected return on a security, T is the number of periods with the historical real return, rit is the real return on the security in term t, and pit is the probability that the real return is rit.In investment activities, it is uncertain to use the historical rate of return to estimate the expected rate of return because the real return may be higher than expected or lower than expected, which is the risk faced by many investors. Therefore, the risk needs to be quantified by the variance of the expected rate of return. For a single security, the risk can be calculated by the following formula:(3)σ2=DRi=∑tTrit−Ri¯2pt.The above formula uses the volatility of security returns; that is, the varianceσ2 of the expected return rate of a security is adopted to quantify the risk. The larger the variance is, the greater the deviation between the actual return rate and the expected return rate is, which indicates that the returns of security are highly uncertain, and the investment risk is strong.


### 2.2. Portfolio Investment

Assuming a portfolio chooses N sorts of resources from the protections pool and joins them as indicated by a specific venture proportion, then in a certain investment cycle, the pay of the portfolio is measured by the weighted normal amount of the return paces of every resource, which can be calculated by the following formula:(4)rp=∑i=1NxiRi¯,where rp represents the expected return rate of the portfolio and xi represents the proportion of the ith asset in the portfolio, which meets the budget constraint ∑i=1Nxi=1, xi>0,Ri¯.In the actual market, all kinds of securities are not completely independent, and there are always some connections. This correlation between securities is usually expressed by covariance, which is the expectation to measure the overall error between two variables [13]. In the actual portfolio, investors usually want to choose some unrelated assets as far as possible to spread the risk as much as possible, so set R=R1,R2,…,RNT as the actual rate of return of each security in the portfolio, and the covariance between i and j securities is calculated by the following formula:(5)σij=covRi,Rj=1T∑tTrit−Ri¯rjt−Rj¯.Using varianceσp2 as a measure of portfolio risk, we should consider not only the characteristics of individual securities but also the relationship between them. The portfolio risk is expressed by the following formula:(6)σp2=DR=∑iN∑jNxiyjσij.


## 2.1. Single Investment

The quantitative relationship is applied to the research of portfolio theory, the benefits and risks are quantified, and the two goals of maximizing benefits and minimizing risks are put forward to solve the problems of selection of financial products and allocation of capital proportion for investors [11, 12].In actual investment activities, the average historical real rate of return is usually used to replace the expected rate of return to measure the pros and cons of the portfolio. Assuming that there areM securities in the securities pool, the actual rate of return of securities is calculated as shown in the following formula:(1)ri=Sit−Si0Si0,where ri is the actual rate of return of a security, Sit is the closing price of the securities at the end of the holding period, and Si0 is the closing price of the securities at the initial stage of the cycle.The company’s operation and performance usually have certain stability; therefore, the average historical actual rate of return can be used as the estimate of the expected rate of return of the securities. Assuming that vectorRi=ri1,ri2,…,riTT represents the vector composed of multiperiod historical return rate of the ith asset, so the expected return rate is shown in the following formula:(2)Ri¯=ERi=∑t=1Tritpit,where R¯i is the expected return on a security, T is the number of periods with the historical real return, rit is the real return on the security in term t, and pit is the probability that the real return is rit.In investment activities, it is uncertain to use the historical rate of return to estimate the expected rate of return because the real return may be higher than expected or lower than expected, which is the risk faced by many investors. Therefore, the risk needs to be quantified by the variance of the expected rate of return. For a single security, the risk can be calculated by the following formula:(3)σ2=DRi=∑tTrit−Ri¯2pt.The above formula uses the volatility of security returns; that is, the varianceσ2 of the expected return rate of a security is adopted to quantify the risk. The larger the variance is, the greater the deviation between the actual return rate and the expected return rate is, which indicates that the returns of security are highly uncertain, and the investment risk is strong.


## 2.2. Portfolio Investment

Assuming a portfolio chooses N sorts of resources from the protections pool and joins them as indicated by a specific venture proportion, then in a certain investment cycle, the pay of the portfolio is measured by the weighted normal amount of the return paces of every resource, which can be calculated by the following formula:(4)rp=∑i=1NxiRi¯,where rp represents the expected return rate of the portfolio and xi represents the proportion of the ith asset in the portfolio, which meets the budget constraint ∑i=1Nxi=1, xi>0,Ri¯.In the actual market, all kinds of securities are not completely independent, and there are always some connections. This correlation between securities is usually expressed by covariance, which is the expectation to measure the overall error between two variables [13]. In the actual portfolio, investors usually want to choose some unrelated assets as far as possible to spread the risk as much as possible, so set R=R1,R2,…,RNT as the actual rate of return of each security in the portfolio, and the covariance between i and j securities is calculated by the following formula:(5)σij=covRi,Rj=1T∑tTrit−Ri¯rjt−Rj¯.Using varianceσp2 as a measure of portfolio risk, we should consider not only the characteristics of individual securities but also the relationship between them. The portfolio risk is expressed by the following formula:(6)σp2=DR=∑iN∑jNxiyjσij.


## 3. Multiobjective Optimization Algorithm

### 3.1. Algorithm Design

NSGA-II algorithm is a far-reaching multiobjective optimization algorithm at present. Since it was put forward, because of its simplicity and high efficiency, this algorithm has become one of the basic algorithms in problems of multiobjective optimization [14]. As shown in Figure 1, the main advantages of this algorithm compared with traditional NSGA are as follows.(1)
The fast nondominated sorting algorithm reduces the computational complexity from the original mN3 to mN2, where n is the species size and m is the quantity of goal capacities.(2)
The addition of the crowding degree and crowding degree comparison operator not only solves the shortcoming of artificial designation of shared parameters in the algorithm but also enables the species to be homogeneously extended to the whole Pareto domain through crowding degree, thus ensuring the diversity of the species.(3)
Introduction of elite strategy and expansion of sampling space combine the parent and the offspring together to produce the next generation of the species by competition is beneficial to preserve the excellent individuals of the previous generation of the species. At the same time, the stratified storage of individuals in the species reduces the loss of the best individuals, improves the overall level of the species, and greatly optimizes the accuracy of the algorithm.Figure 1
Advantages of NSGA-II algorithm.The NSGA-II algorithm adopted in this paper can improve the diversity of the species and make the level of the species improve rapidly. The flow chart of the algorithm is shown in Figure2.(1)
Initialize the species and set its size asn, after the nondominated sorting of the species with the size of n, execute the traditional genetic algorithm, and obtain the first-generation progeny species through crossover, mutation, and selection(2)
Combine the parent and offspring species into a species, calculate the crowding degree of individuals in the nondominant layer simultaneously through rapid nondominant sorting, and select suitable individuals to form a new parent species by using crowding degree and nondominant relationship(3)
Generate a new progeny species through the basic operations of crossover, mutation, and selection in a traditional genetic algorithm, and repeat the above steps until the maximum number of iterations is metFigure 2
Flow chart of NSGA-II algorithm. The fundamental advances are as per the following [15, 16].


### 3.2. Optimized Algorithm

t-SNE algorithm is introduced to reduce the problem of target redundancy in high-dimensional multitargets, which greatly decreases the running time and the load of devices and improves the accuracy of the algorithm. The flow chart is shown in Figure3.Figure 3
Algorithm optimization based ont-SNE.Firstly, the original target setI0 was selected to initialize the species, and then, the NSGA-II algorithm was performed to optimize the species to form a new parent species P0. Then, t-SNE algorithm is optimized for P0 to obtain the nonredundant target set I1. Finally, the above steps are repeated until the maximum number of iterations is satisfied, and the species P2,P3,…Pt−2Pt−1, and target set I3,…,It, when It−1=It, the Pareto optimal solution Pt−1 of the target set can be obtained.


### 3.3. Implementation Process of Algorithm

Assuming that the number of targets isN, the target set is It, and gen is the number of iterations.(1)
Sett=0, the initial target set is I0=1,2,…,N, and then, the species of the target set is initialized. P, where selection, suitable individuals are selected to form a new parent species P0 by fast nondominated sorting and calculating crowding degree. The binary crossover can be simulated as follows:(7)x1jt=0.5∗1+γjx1jt+1−γjx2jt,x2jt=0.5∗1+γjx1jt+1−γjx2jt.Among them,(8)γj=2uj1/n+1,uj<0.5,121−uj1/η+1,else.(2)
Calculate the pairs of Euclidean distances between samples ofP0 species, and calculate the joint probability pij between pairs of data points in high-dimensional space.(9)pij=pj|i+pi|j2n, where δi represents the variance of the Gaussian function centered on the data point, xi represents the initial population characteristic matrix, and pji represents the conditional probability of similarity between the data point xi and data point xj of the species characteristic matrix.(10)pj|i=exp−xi−xj2/2δi2∑k≠iexp−xi−xk2/2δi2.(3)
Calculate joint probabilityqij between low dimensional spatial data point pairs in P0 Eigenmatrix.(11)qij=1+yi−yj2−1∑k≠l1+yl−yk2−1, where yi, yj, yl, and yk represent the data point of the species characteristic matrix.(4)
Calculate the KL divergence betweenpij and qij, and work out the objective function C:(12)C=KLPQ=∑i∑jpijlogpijqij.(5)
Solve the gradient ofP and Q:(13)δCδyi=4∑jpij−qijyi−yj1+yi−yj2−1.(6)
Get the target setI1, and repeat (1) ∼ (5) until the set maximum iteration algebra is met, and the species is obtained. P2,P3,…,Pt−2,Pt−1 and target set I3,…,It, when It−1=It, and find the Pareto optimal solution of the target set Pt−1.Calculate the target setI1, and repeat step (1) ∼ (5) until the maximum iteration algebra is satisfied, and the species P2,P3,…,Pt−2,Pt−1 and target set I3,…,It, when It−1=It, the Pareto optimal solution Pt−1 of the target set can be obtained.


## 3.1. Algorithm Design

NSGA-II algorithm is a far-reaching multiobjective optimization algorithm at present. Since it was put forward, because of its simplicity and high efficiency, this algorithm has become one of the basic algorithms in problems of multiobjective optimization [14]. As shown in Figure 1, the main advantages of this algorithm compared with traditional NSGA are as follows.(1)
The fast nondominated sorting algorithm reduces the computational complexity from the original mN3 to mN2, where n is the species size and m is the quantity of goal capacities.(2)
The addition of the crowding degree and crowding degree comparison operator not only solves the shortcoming of artificial designation of shared parameters in the algorithm but also enables the species to be homogeneously extended to the whole Pareto domain through crowding degree, thus ensuring the diversity of the species.(3)
Introduction of elite strategy and expansion of sampling space combine the parent and the offspring together to produce the next generation of the species by competition is beneficial to preserve the excellent individuals of the previous generation of the species. At the same time, the stratified storage of individuals in the species reduces the loss of the best individuals, improves the overall level of the species, and greatly optimizes the accuracy of the algorithm.Figure 1
Advantages of NSGA-II algorithm.The NSGA-II algorithm adopted in this paper can improve the diversity of the species and make the level of the species improve rapidly. The flow chart of the algorithm is shown in Figure2.(1)
Initialize the species and set its size asn, after the nondominated sorting of the species with the size of n, execute the traditional genetic algorithm, and obtain the first-generation progeny species through crossover, mutation, and selection(2)
Combine the parent and offspring species into a species, calculate the crowding degree of individuals in the nondominant layer simultaneously through rapid nondominant sorting, and select suitable individuals to form a new parent species by using crowding degree and nondominant relationship(3)
Generate a new progeny species through the basic operations of crossover, mutation, and selection in a traditional genetic algorithm, and repeat the above steps until the maximum number of iterations is metFigure 2
Flow chart of NSGA-II algorithm. The fundamental advances are as per the following [15, 16].


## 3.2. Optimized Algorithm

t-SNE algorithm is introduced to reduce the problem of target redundancy in high-dimensional multitargets, which greatly decreases the running time and the load of devices and improves the accuracy of the algorithm. The flow chart is shown in Figure3.Figure 3
Algorithm optimization based ont-SNE.Firstly, the original target setI0 was selected to initialize the species, and then, the NSGA-II algorithm was performed to optimize the species to form a new parent species P0. Then, t-SNE algorithm is optimized for P0 to obtain the nonredundant target set I1. Finally, the above steps are repeated until the maximum number of iterations is satisfied, and the species P2,P3,…Pt−2Pt−1, and target set I3,…,It, when It−1=It, the Pareto optimal solution Pt−1 of the target set can be obtained.


## 3.3. Implementation Process of Algorithm

Assuming that the number of targets isN, the target set is It, and gen is the number of iterations.(1)
Sett=0, the initial target set is I0=1,2,…,N, and then, the species of the target set is initialized. P, where selection, suitable individuals are selected to form a new parent species P0 by fast nondominated sorting and calculating crowding degree. The binary crossover can be simulated as follows:(7)x1jt=0.5∗1+γjx1jt+1−γjx2jt,x2jt=0.5∗1+γjx1jt+1−γjx2jt.Among them,(8)γj=2uj1/n+1,uj<0.5,121−uj1/η+1,else.(2)
Calculate the pairs of Euclidean distances between samples ofP0 species, and calculate the joint probability pij between pairs of data points in high-dimensional space.(9)pij=pj|i+pi|j2n, where δi represents the variance of the Gaussian function centered on the data point, xi represents the initial population characteristic matrix, and pji represents the conditional probability of similarity between the data point xi and data point xj of the species characteristic matrix.(10)pj|i=exp−xi−xj2/2δi2∑k≠iexp−xi−xk2/2δi2.(3)
Calculate joint probabilityqij between low dimensional spatial data point pairs in P0 Eigenmatrix.(11)qij=1+yi−yj2−1∑k≠l1+yl−yk2−1, where yi, yj, yl, and yk represent the data point of the species characteristic matrix.(4)
Calculate the KL divergence betweenpij and qij, and work out the objective function C:(12)C=KLPQ=∑i∑jpijlogpijqij.(5)
Solve the gradient ofP and Q:(13)δCδyi=4∑jpij−qijyi−yj1+yi−yj2−1.(6)
Get the target setI1, and repeat (1) ∼ (5) until the set maximum iteration algebra is met, and the species is obtained. P2,P3,…,Pt−2,Pt−1 and target set I3,…,It, when It−1=It, and find the Pareto optimal solution of the target set Pt−1.Calculate the target setI1, and repeat step (1) ∼ (5) until the maximum iteration algebra is satisfied, and the species P2,P3,…,Pt−2,Pt−1 and target set I3,…,It, when It−1=It, the Pareto optimal solution Pt−1 of the target set can be obtained.


## 4. Multiobjective Portfolio Model

### 4.1. Problem Description

The financial market has many nonrandom factors, such as fuzziness and uncertainty. Therefore, this paper tries to express the fuzzy uncertainty of the financial market with fuzzy theory. Investors usually refer to financial intermediaries. The main reason why diversified investment reduces the risk is that the correlation of different types of companies is poor or even negative. After the formation of the portfolio, the correlation of the portfolio is dissolved, so that the variance of the portfolio decreases; that is, the risk decreases. In investment theory, diversified investment is common that it can effectively reduce risks [17, 18]. Based on the fuzzy theory, a profit-risk optimization model is established with constraints, where the profit and risk are regarded as two optimization objectives in the model.Assuming thatR represents all real numbers, A is the convex fuzzy number defined on R with continuous membership function μAx, and F is the whole fuzzy set defined on the real number field R.Definition 1.
AssumeA∈F,Aγ=aγ,a¯γγ∈0,1, and A represents the γ-horizontal cut set, then the probability mean of fuzzy number A is defined as(14)EA=∫01γa¯γ+a¯γdγ,VarA=∫01γEA−a¯γ2+EA−a¯γ2dγ.
Lower half probability variance ofA is(15)Var−A=2∫01γEA−a¯γ2dγ.
Upper half probability variance ofA is(16)Var+A=2∫01γEA−a¯γ2dγ.
IfA=a,b,α,β is A trapezoidal fuzzy number, its membership function μAx is shown in Figure 4.(17)μAx=x−a−αα,a−α≤x≤a,1,a≤x≤b,b+β−xβ,b≤x≤b+β,0,else.
So, theγ-horizontal cut set of trapezoidal fuzzy number A is Aγ=a−1−γα,b+1−γβ,∀γ∈0,1.
In this paper, we consider the following constraints [19]:(1)
Constraint on the number of portfolio assets: in the process of real investment decision-making, there are certain requirements for the number of assets held. Assume that the maximum number of assets held isM, then the constraint is ∑i=1nsignxi=M.(2)
Investment ratio constraint: the sum of investment ratios for each asset should be 1. Namely,∑i=1nxi=1.Figure 4
Membership function of fuzzy number A.


### 4.2. Model Building

As skewness is introduced as a new goal, cardinality constraints and upper and lower bound constraints are added, historical data are replaced by predicted returns, and the specific portfolio model is shown in function (18).(18)maxRx=XTR¯=∑inxiRi¯,minVx=XTVX=∑i=1n∑j=1nxixjσij,maxSx=EXTR−R¯2=∑i=1nxi3si3+3∑i=1nxi2xjsijj+∑j=1nxixj2sijji≠j,s.t.∑i=1nxi=1,∑i=1nKmin≤θi≤Kmax,liθi≤xi≤uiθi,i=1,2,3…,n,θi∈0,1,i=1,2,…,n.Among them,n is the number of available assetsX is the weight vector formed by the proportion of investment into various assets when each goal achieves the optimal tradeoffxi is the proportion invested in the ith asset; 12, Ri¯ 12 is the expected return on the ith assetσij is the return covariance between asset i and asset jsi3,sii, and sijj are skewness and oblique skewnessRx is the expected return on the portfolio xVx is the return variance of the portfolio xSx is the skew of the portfolio xθi specifies whether an asset θi exists in the portfolioKmin and Kmax are the minimum and maximum number of assets allowed in a portfolioli and ui are the lowest and highest proportion of the investment in asset i to the total investment, respectivelyThe advancement objective of the model is to limit the gamble of the portfolio and expand the normal return of the portfolio and the skewness of the portfolio. Therefore, constraints conclude budget constraints, upper and lower limit constraints, and cardinality constraints. Cardinality constraint ensures that the number of assets in the portfolio is within a certain range where substantial diversified income can be achieved by owning 6 to 15 stocks [20].


### 4.3. Model Solution

#### 4.3.1. Test Index

Generation distance (GD) and spatial distribution (SS) are selected to test the convergence and accuracy of the algorithm in this paper.GD refers to the average minimum distance from each point in the solution setP to the reference set P′, indicating the degree of deviation from the truly optimal boundary. The larger the GD value, the farther away from the true optimal boundary, and the worse the convergence. The specific calculation formula is as follows:(19)GDP,P′=∑i=1ndi2n,where n is the number of points on the Pareto frontier and di is the minimum Euclidean distance between an individual and the real Pareto frontier.SD indicates the extent of the obtained solution set. The smaller the value of SD, the more homogeneous the solution set. The specific calculation formula is as follows:(20)Δ=df+dl+∑i=1N−1di−d¯df+dl+N−1d¯.


#### 4.3.2. Test Environment

The hardware environment used in this experiment is Intel Xeon (R) CPU ES-2620V4 @ 2.10 GHz, NVIDIA Quadro M4000 GPU, and the running memory is 32G. In addition, the experiment is realized by Matlab simulation. In order to test the performance of the algorithm under different numbers of the target, they are set as 3, 5, and 10, respectively, in the test function. DTLZ (I, M) represents the spatial distribution of targets in the I dimension, where I is the target dimension and M is the number of target objects. The specific parameters are shown in Table 1.Table 1
Test parameters.
NameExpressionValueSpecies sizeSpecies size500Evolutionary algebraGeneration10000Variation probabilityPm0.1Cross probabilityPc0.9Data dimensionV12Analog binary crossover parameterL50Polynomial variation parameterU5


#### 4.3.3. Test Results

Function (18) was tested with the NSGA-II algorithm and its improved algorithm, respectively, running independently for 10 times, and the test indexes were GD and SD. The experimental results are shown in Table 2.Table 2
Model test results.
Test categoriesNSGA-IIImproved NSGA-IIGeneration distanceStandard5.7065E − 022.6509E − 05Error2.1500E − 034.9200E − 05Spatial distributionStandard0.352110.33982Error0.009770.0103Table2 shows that the indicators of GD and SD obtained by the improved algorithm are 2.6509E − 05,0.33982, respectively; the GD and SD of the NSGA-II algorithm are 5.7065E − 02 and 0.35211, respectively, which shows that the optimization algorithm has the smallest deviation from the real optimal boundary, the best convergence, and the smallest breadth of the solution set. Therefore, the optimized multiobjective algorithm has better convergence, and the distribution of the solution set is more homogeneous.


## 4.1. Problem Description

The financial market has many nonrandom factors, such as fuzziness and uncertainty. Therefore, this paper tries to express the fuzzy uncertainty of the financial market with fuzzy theory. Investors usually refer to financial intermediaries. The main reason why diversified investment reduces the risk is that the correlation of different types of companies is poor or even negative. After the formation of the portfolio, the correlation of the portfolio is dissolved, so that the variance of the portfolio decreases; that is, the risk decreases. In investment theory, diversified investment is common that it can effectively reduce risks [17, 18]. Based on the fuzzy theory, a profit-risk optimization model is established with constraints, where the profit and risk are regarded as two optimization objectives in the model.Assuming thatR represents all real numbers, A is the convex fuzzy number defined on R with continuous membership function μAx, and F is the whole fuzzy set defined on the real number field R.Definition 1.
AssumeA∈F,Aγ=aγ,a¯γγ∈0,1, and A represents the γ-horizontal cut set, then the probability mean of fuzzy number A is defined as(14)EA=∫01γa¯γ+a¯γdγ,VarA=∫01γEA−a¯γ2+EA−a¯γ2dγ.
Lower half probability variance ofA is(15)Var−A=2∫01γEA−a¯γ2dγ.
Upper half probability variance ofA is(16)Var+A=2∫01γEA−a¯γ2dγ.
IfA=a,b,α,β is A trapezoidal fuzzy number, its membership function μAx is shown in Figure 4.(17)μAx=x−a−αα,a−α≤x≤a,1,a≤x≤b,b+β−xβ,b≤x≤b+β,0,else.
So, theγ-horizontal cut set of trapezoidal fuzzy number A is Aγ=a−1−γα,b+1−γβ,∀γ∈0,1.
In this paper, we consider the following constraints [19]:(1)
Constraint on the number of portfolio assets: in the process of real investment decision-making, there are certain requirements for the number of assets held. Assume that the maximum number of assets held isM, then the constraint is ∑i=1nsignxi=M.(2)
Investment ratio constraint: the sum of investment ratios for each asset should be 1. Namely,∑i=1nxi=1.Figure 4
Membership function of fuzzy number A.


## 4.2. Model Building

As skewness is introduced as a new goal, cardinality constraints and upper and lower bound constraints are added, historical data are replaced by predicted returns, and the specific portfolio model is shown in function (18).(18)maxRx=XTR¯=∑inxiRi¯,minVx=XTVX=∑i=1n∑j=1nxixjσij,maxSx=EXTR−R¯2=∑i=1nxi3si3+3∑i=1nxi2xjsijj+∑j=1nxixj2sijji≠j,s.t.∑i=1nxi=1,∑i=1nKmin≤θi≤Kmax,liθi≤xi≤uiθi,i=1,2,3…,n,θi∈0,1,i=1,2,…,n.Among them,n is the number of available assetsX is the weight vector formed by the proportion of investment into various assets when each goal achieves the optimal tradeoffxi is the proportion invested in the ith asset; 12, Ri¯ 12 is the expected return on the ith assetσij is the return covariance between asset i and asset jsi3,sii, and sijj are skewness and oblique skewnessRx is the expected return on the portfolio xVx is the return variance of the portfolio xSx is the skew of the portfolio xθi specifies whether an asset θi exists in the portfolioKmin and Kmax are the minimum and maximum number of assets allowed in a portfolioli and ui are the lowest and highest proportion of the investment in asset i to the total investment, respectivelyThe advancement objective of the model is to limit the gamble of the portfolio and expand the normal return of the portfolio and the skewness of the portfolio. Therefore, constraints conclude budget constraints, upper and lower limit constraints, and cardinality constraints. Cardinality constraint ensures that the number of assets in the portfolio is within a certain range where substantial diversified income can be achieved by owning 6 to 15 stocks [20].


## 4.3. Model Solution

### 4.3.1. Test Index

Generation distance (GD) and spatial distribution (SS) are selected to test the convergence and accuracy of the algorithm in this paper.GD refers to the average minimum distance from each point in the solution setP to the reference set P′, indicating the degree of deviation from the truly optimal boundary. The larger the GD value, the farther away from the true optimal boundary, and the worse the convergence. The specific calculation formula is as follows:(19)GDP,P′=∑i=1ndi2n,where n is the number of points on the Pareto frontier and di is the minimum Euclidean distance between an individual and the real Pareto frontier.SD indicates the extent of the obtained solution set. The smaller the value of SD, the more homogeneous the solution set. The specific calculation formula is as follows:(20)Δ=df+dl+∑i=1N−1di−d¯df+dl+N−1d¯.


### 4.3.2. Test Environment

The hardware environment used in this experiment is Intel Xeon (R) CPU ES-2620V4 @ 2.10 GHz, NVIDIA Quadro M4000 GPU, and the running memory is 32G. In addition, the experiment is realized by Matlab simulation. In order to test the performance of the algorithm under different numbers of the target, they are set as 3, 5, and 10, respectively, in the test function. DTLZ (I, M) represents the spatial distribution of targets in the I dimension, where I is the target dimension and M is the number of target objects. The specific parameters are shown in Table 1.Table 1
Test parameters.
NameExpressionValueSpecies sizeSpecies size500Evolutionary algebraGeneration10000Variation probabilityPm0.1Cross probabilityPc0.9Data dimensionV12Analog binary crossover parameterL50Polynomial variation parameterU5


### 4.3.3. Test Results

Function (18) was tested with the NSGA-II algorithm and its improved algorithm, respectively, running independently for 10 times, and the test indexes were GD and SD. The experimental results are shown in Table 2.Table 2
Model test results.
Test categoriesNSGA-IIImproved NSGA-IIGeneration distanceStandard5.7065E − 022.6509E − 05Error2.1500E − 034.9200E − 05Spatial distributionStandard0.352110.33982Error0.009770.0103Table2 shows that the indicators of GD and SD obtained by the improved algorithm are 2.6509E − 05,0.33982, respectively; the GD and SD of the NSGA-II algorithm are 5.7065E − 02 and 0.35211, respectively, which shows that the optimization algorithm has the smallest deviation from the real optimal boundary, the best convergence, and the smallest breadth of the solution set. Therefore, the optimized multiobjective algorithm has better convergence, and the distribution of the solution set is more homogeneous.


## 4.3.1. Test Index

Generation distance (GD) and spatial distribution (SS) are selected to test the convergence and accuracy of the algorithm in this paper.GD refers to the average minimum distance from each point in the solution setP to the reference set P′, indicating the degree of deviation from the truly optimal boundary. The larger the GD value, the farther away from the true optimal boundary, and the worse the convergence. The specific calculation formula is as follows:(19)GDP,P′=∑i=1ndi2n,where n is the number of points on the Pareto frontier and di is the minimum Euclidean distance between an individual and the real Pareto frontier.SD indicates the extent of the obtained solution set. The smaller the value of SD, the more homogeneous the solution set. The specific calculation formula is as follows:(20)Δ=df+dl+∑i=1N−1di−d¯df+dl+N−1d¯.


## 4.3.2. Test Environment

The hardware environment used in this experiment is Intel Xeon (R) CPU ES-2620V4 @ 2.10 GHz, NVIDIA Quadro M4000 GPU, and the running memory is 32G. In addition, the experiment is realized by Matlab simulation. In order to test the performance of the algorithm under different numbers of the target, they are set as 3, 5, and 10, respectively, in the test function. DTLZ (I, M) represents the spatial distribution of targets in the I dimension, where I is the target dimension and M is the number of target objects. The specific parameters are shown in Table 1.Table 1
Test parameters.
NameExpressionValueSpecies sizeSpecies size500Evolutionary algebraGeneration10000Variation probabilityPm0.1Cross probabilityPc0.9Data dimensionV12Analog binary crossover parameterL50Polynomial variation parameterU5


## 4.3.3. Test Results

Function (18) was tested with the NSGA-II algorithm and its improved algorithm, respectively, running independently for 10 times, and the test indexes were GD and SD. The experimental results are shown in Table 2.Table 2
Model test results.
Test categoriesNSGA-IIImproved NSGA-IIGeneration distanceStandard5.7065E − 022.6509E − 05Error2.1500E − 034.9200E − 05Spatial distributionStandard0.352110.33982Error0.009770.0103Table2 shows that the indicators of GD and SD obtained by the improved algorithm are 2.6509E − 05,0.33982, respectively; the GD and SD of the NSGA-II algorithm are 5.7065E − 02 and 0.35211, respectively, which shows that the optimization algorithm has the smallest deviation from the real optimal boundary, the best convergence, and the smallest breadth of the solution set. Therefore, the optimized multiobjective algorithm has better convergence, and the distribution of the solution set is more homogeneous.


## 5. Evaluation of Portfolio Design

### 5.1. Scheme Analysis

By taking the fund as an example, if the original capital Y yuan is used for financial investment, then the investment in A, B, C,D, and E funds can be expressed as(21)Y=A+B+C+D+E,W=aWA+bWB+cWC+dWD+eWE,where Y is the original fund, a,b,c,d,e and WA,WB,WC,WD,WE are the weight and income of funds invested in A,B,C,D,E, respectively, and W is the total income.


### 5.2. Evaluation Indicators

The raw data of this experiment come from the daily trading data of Chinese funds from December 2014 to December 2021, which contains transaction data of various fund prices, each of which consists of time, opening price, maximum price, minimum price, closing price, increase rate, and turnover rate. The daily price data of 10 kinds of funds are selected as experimental data, and only 733 fund price data are selected.In this paper, the mainstream measurable performance indicators of investment in the current market are adopted, namely, the annual rate of profit, sharp ratio, and forecast rate of profit [21, 22].(1)
Annualized rate of profitThe annualized rate of profit is a measure of the profitability of investors during the investment period of one year(22)Annualized rate of return=Income/capitalInvestment days/365×100%.(2)
Sharp ratioSharp ratio is a standardized index to evaluate the fund performance(23)Sharpe Ratio=ERP−RfσP.whereERP represents the expected return rate of risk asset portfolio; Rf is the risk-free rate of return, which can be replaced by the interest rate of 10-year Treasury bonds, that is, 2.85%; ERP−Rf is the risk premium. When the Sharp ratio <0, the return on investment is not as good as the return on Treasury bonds.(3)
Predicted rate of profitThe estimated pace of profit from the venture, otherwise called the speculation benefit rate, alludes to the proportion of the absolute yearly net gain of the speculation plan to the all speculation of the plan in a year subsequent to arriving at the planned limit of creation(24)Predicted rate of profit=Annual pre−tax profitTotal investment of project×100%.


### 5.3. Analysis of Results

The multiobjective portfolio model algorithm mentioned above is iterated for 50 times to get the weight of each industry coefficient in the scheme of the portfolio. The results are shown in Table3.Table 3
Weight of portfolio.
Serial numberNSGA-II algorithmOptimization algorithm10.265020.1020.19630.2490.18540050.1270.28760.1640.23470080.0450.060900100.0480.038According to a certain capital, the annual return, investment profit, and Sharp ratio within 2 years are calculated, respectively, according to the portfolio scheme obtained by NSGA-II and its optimization algorithm, as shown in Table4.Table 4
Performance evaluation.
NSGA-II algorithmOptimization algorithmAnnualized rate of profits/%37.6041.25Forecast rate of profits/%63.2470.08Sharp ratio/%74.2693.65From the data in the table, it can be seen that the annualized profits of the portfolio scheme within two years obtained by NSGA-II and its optimization algorithm are 37.60% and 41.25%, respectively. The predicted profits on investment are 63.24% and 70.08%, respectively; the Sharp ratio of the two portfolio schemes is greater than 0, which indicates that the income of investment exceeds that of the Treasury bonds. Therefore, the portfolio scheme obtained by the multiobjective optimization algorithm is the best.


## 5.1. Scheme Analysis

By taking the fund as an example, if the original capital Y yuan is used for financial investment, then the investment in A, B, C,D, and E funds can be expressed as(21)Y=A+B+C+D+E,W=aWA+bWB+cWC+dWD+eWE,where Y is the original fund, a,b,c,d,e and WA,WB,WC,WD,WE are the weight and income of funds invested in A,B,C,D,E, respectively, and W is the total income.


## 5.2. Evaluation Indicators

The raw data of this experiment come from the daily trading data of Chinese funds from December 2014 to December 2021, which contains transaction data of various fund prices, each of which consists of time, opening price, maximum price, minimum price, closing price, increase rate, and turnover rate. The daily price data of 10 kinds of funds are selected as experimental data, and only 733 fund price data are selected.In this paper, the mainstream measurable performance indicators of investment in the current market are adopted, namely, the annual rate of profit, sharp ratio, and forecast rate of profit [21, 22].(1)
Annualized rate of profitThe annualized rate of profit is a measure of the profitability of investors during the investment period of one year(22)Annualized rate of return=Income/capitalInvestment days/365×100%.(2)
Sharp ratioSharp ratio is a standardized index to evaluate the fund performance(23)Sharpe Ratio=ERP−RfσP.whereERP represents the expected return rate of risk asset portfolio; Rf is the risk-free rate of return, which can be replaced by the interest rate of 10-year Treasury bonds, that is, 2.85%; ERP−Rf is the risk premium. When the Sharp ratio <0, the return on investment is not as good as the return on Treasury bonds.(3)
Predicted rate of profitThe estimated pace of profit from the venture, otherwise called the speculation benefit rate, alludes to the proportion of the absolute yearly net gain of the speculation plan to the all speculation of the plan in a year subsequent to arriving at the planned limit of creation(24)Predicted rate of profit=Annual pre−tax profitTotal investment of project×100%.


## 5.3. Analysis of Results

The multiobjective portfolio model algorithm mentioned above is iterated for 50 times to get the weight of each industry coefficient in the scheme of the portfolio. The results are shown in Table3.Table 3
Weight of portfolio.
Serial numberNSGA-II algorithmOptimization algorithm10.265020.1020.19630.2490.18540050.1270.28760.1640.23470080.0450.060900100.0480.038According to a certain capital, the annual return, investment profit, and Sharp ratio within 2 years are calculated, respectively, according to the portfolio scheme obtained by NSGA-II and its optimization algorithm, as shown in Table4.Table 4
Performance evaluation.
NSGA-II algorithmOptimization algorithmAnnualized rate of profits/%37.6041.25Forecast rate of profits/%63.2470.08Sharp ratio/%74.2693.65From the data in the table, it can be seen that the annualized profits of the portfolio scheme within two years obtained by NSGA-II and its optimization algorithm are 37.60% and 41.25%, respectively. The predicted profits on investment are 63.24% and 70.08%, respectively; the Sharp ratio of the two portfolio schemes is greater than 0, which indicates that the income of investment exceeds that of the Treasury bonds. Therefore, the portfolio scheme obtained by the multiobjective optimization algorithm is the best.


## 6. Conclusion

Based on the portfolio theory, this paper introduces the t-SNE optimized NSGA-II algorithm to establish a multiobjective portfolio model for the multiobjective optimization of portfolio investment in the financial industry, where the expected return, risk, skewness, and other indexes of securities are quantified, and the solving algorithm of the model is evaluated by the generation distance and spatial distribution. The evaluation results show that the annualized profits of the portfolio scheme obtained by the optimized algorithm are 41.25%, the predicted profits on investment are 70.08% within two years, and its evaluation of performance is higher than that of the NSGA-II algorithm.



---

*Source: 7419500-2022-06-13.xml*