Two-Stage Robust Optimization Model for Uncertainty Investment Portfolio Problems

Investment portfolio can provide investors with a more robust financial management plan, but the uncertainty of its parameters is a key factor affecting performance. -is paper conducts research on investment portfolios and constructs a two-stage mixed integer programming (TS-MIP) model, which comprehensively considers the five dimensions of profit, diversity, skewness, information entropy, and conditional value at risk. But the deterministic TS-MIP model cannot cope with the uncertainty. -erefore, this paper constructs a two-stage robust optimization (TS-RO) model by introducing robust optimization theory. In case experiments, data crawler technology is used to obtain actual data from real websites, and a variety of methods are used to verify the effectiveness of the proposed model in dealing with uncertainty. -e comparison of models found that, compared with the traditional equal weight model, the investment benefits of the TS-MIP model and the TS-RO model proposed have been improved. Among them, the Sharpe ratio, Sortino ratio, and Treynor ratio have the largest increase of 19.30%, 8.25%, and 7.34%, respectively.


Introduction
Investment portfolio means that investors invest their own assets in stocks, funds, bonds, and other securities at the same time, in order to achieve higher or more stable profits under lower risk conditions. In the early research, many scholars constructed the mean-variance model and the portfolio effective boundary model, which opened a new era of investment portfolio. Among them, since Markowitz founded the portfolio theory, the development of portfolio theory has been extremely rapid [1,2]. Risks persist due to poor risk management and uncertainty in the market environment. Portfolio theory is one of the important financial theories that discuss the profits and risks in the investment process. In the management of risk, many scholars believe that the research of investment portfolio can effectively measure uncertainty and avoid risk. e investment portfolio mainly embodies the idea of investment diversification. By screening different types of risk asset projects, the purpose of reducing investment risks is achieved. e investment portfolio optimization method provides a powerful tool for risk management [3,4]. Using the model method of investment portfolio optimization to find a reasonable allocation of funds can help investors balance safety and profitability and ensure that they achieve maximum profits within the acceptable risk range. Whether it is the securities and finance industry or other academic fields such as research institutes and universities, how to effectively formulate appropriate investment strategies has always been the focus of research [5,6]. It is found that the game between investment and risk is always accompanied by investors. Continuously improving investment risk management capabilities is a top priority for regulatory authorities, financial institutions, and even individual investors.
Some investors tend to avoid risks by looking for the law of risk distribution, so that they can modify their strategies in a timely manner in the face of unexpected situations. In the application process of investment portfolio optimization, there are few or even missing historical data. How to accurately measure risk in the absence of historical data and how to reasonably estimate possible losses taking into account a variety of factors is also a huge challenge. In addition, the study found that financial risk measurement is based on a basic distribution assumption. e selection of appropriate distribution assumptions has a significant impact on the accurate measurement of risk, which in turn affects the efficiency of the overall investment plan. How to choose an appropriate distribution hypothesis is also a pain point in portfolio research. In the research on the uncertainty of portfolio risk distribution, researchers focus on how to incorporate the uncertainty of loss into the investment decision-making process and then improve the problem of portfolio optimization. In addition to the existing research on the specific distribution probability of hypothetical risks, many scholars have tried to conduct research from the risk itself. It is found that the loss is affected by many factors. In an economic environment that is rising frequently, the distribution of losses may be similar to a normal distribution. In a flat economic environment, the risk loss distribution may be similar to a certain distribution [7][8][9]. In a recessionary economic environment, the risk loss distribution may be similar to a certain Pareto distribution [9,10]. Under different distribution models, the choice of portfolio strategy often leads to significant differences in expected results. How to effectively screen the probability distribution of risks and how to effectively determine the investment portfolio plan are a hot topic in the research.
In addition to the research on the probability of risk distribution, many scholars have conducted multidimensional research on the inherent uncertainty by citing models in cross-domains. Garlappi et al. (2007) constructed a portfolio model by estimating the confidence interval of the expected profit. e study found that the fuzzy aversion portfolio only performed stably for a period of time [11]. Tu and Zhou (2010) proposed a method that allows Bayesian Priors to reflect the objectives of economic problems. In terms of measurement of out-ofsample loss function, the model of portfolio strategy based on the objective priori can be significantly superior to the model developed in the classical framework [12]. Bayraktar and Zhou (2017) studied the fundamental theorem of asset pricing and option hedging prices under discretetime nondominated model uncertainty and portfolio constraints. Research has discovered the duality of superhedging prices in a market where stocks are dynamically traded and options are statically traded [13]. e research of Golosnoy and Okhrin (2008) found that there is general uncertainty in the asset allocation model, and the optimal belief degree can be determined by developing a case-based decision-making method [14]. Some scholars use the linear loss aversion function to construct the model and obtain the optimal solution. is function assumes that the marginal utility of investors' gains and losses is constant. Investor's loss aversion degree and reference profit will vary with market conditions and relative wealth. e assumption that the loss aversion coefficient and the reference point remain unchanged does not conform to the true psychology of investors [15,16]. Huang and Qiao (2012) discussed a multiperiod securities investment portfolio selection problem and proposed an uncertain risk index adjustment model. e goal of optimal investment portfolio adjustment is to maximize the total incremental wealth under the constraints of accumulating risk index values during the control investment period and satisfying the constraints of self-raised funds in each period [17]. When analyzing the optimal investment decision of loss aversion investors, the dynamic change characteristics of loss aversion coefficient and reference point should be considered. At present, when building loss aversion models, scholars assume that the expected profit of assets is determined, and the average profit and profit distribution of risky assets in the market are both uncertain. Using the uncertainty of asset profit distribution for reference, the assumption of unknown profit distribution is introduced into robust optimization to describe the fuzzy aversion characteristics of investors, which is more in line with the real psychology of investors. Uncertainties are particularly prominent, and the economy has been affected. In this case, reasonable investment decisions are particularly important. For multiperiod investments, the experience and wisdom of investors are extremely important, where investing, profits, risks, and liquidity are often involved. ese three are interrelated and restrict each other. is relationship is in the relationship between profit and risk. e performance is more prominent in time. High risk means high returns, and risk and profit are often proportional, but investors hope to obtain higher profits with less risk, which poses a big problem for investors and researchers. erefore, it is still necessary to continue to study multistage investment under uncertain conditions.
In recent years, with the steady optimization theory and methods being gradually accepted and recognized by scholars, the uncertainty of using robust optimization to study the portfolio has become particularly novel. e robust optimization theory simply expresses the uncertain parameters in a specific interval and can flexibly control the degree of uncertainty. e robust optimization theory proposed by Bertsimas and Sim (2004) and Ben Tal et al. (2007) to deal with the uncertainty in the model is now a commonly used research method [18,19]. Huang et al. (2010) studied how to use robust optimization to analyze uncertain parameter problems and proved the effectiveness of the robust optimization model [20]. Dai and Wen (2014) proposed a robust optimization theory for minimizing the CVaR of the investment portfolio under the general affine data perturbation uncertainty set. eir research uses numerical experiments with real market data to illustrate the practicality of robust optimization models [21]. In venture capital, investors pay more attention to the right-leaning loss distribution risk, and then it is of practical significance to introduce information entropy into risk measurement research in the financial field. rough the review of the above literature, diversification of investment demand and uncertainty of risk preference are also hot issues in investment portfolio research in recent years. Many scholars have conducted in-depth investigations on the uncertainty of risk appetite. Information entropy can be used to measure the degree of deviation from uniform distribution. e deviation corresponds to a point that reflects the uncertainty of the probability distribution over the entire range of values. At the same time, information entropy can express more information about the distribution, more accurately reflect the risk of loss distribution, and then serve as an ideal means of measuring risk. It can be found from the above-mentioned literature that robust optimization, CAaR, and information entropy, as tools to measure stock investment risk, can be well applied in the symmetric and asymmetric distribution of probability. However, although most of the existing algorithms have played a certain role in improving the accuracy of the model solution, the convergence speed is often slow due to the complexity of the solution algorithm.
In the research of portfolio optimization, the mean-risk model usually assumes that the expected profit on risky assets is subject to a known probability distribution and that the number of transactions is infinitely divided, which is not consistent with the actual situation. In this paper, a twostage robust portfolio optimization model is constructed, and the optimal solution in the worst case is found in the uncertain set. Based on the analysis and comparison of the above related literature, the research in this paper mainly includes the following innovations: (i) is paper summarizes the research results of related scholars, analyzes the classical portfolio problems in depth, and proposes a deterministic TS-MIP model considers the risk and diversity of investment problems. (ii) On the basis of deterministic model, the research content is further extended to uncertainty, and the mechanism of influence of uncertainty parameters on portfolio efficiency is analyzed in depth. (iii) In the research of dealing with uncertainty interference, this paper introduces the theoretical method of robust optimization, constructs a TS-RO model, and applies it to the research field of investment portfolio. (iv) In the numerical case analysis part, this paper uses data crawling technology to obtain the latest real data from real-time websites as the input part of the model and uses real data for a large number of case studies and parameter comparisons, to obtain practical investment advice.
e rest of this framework is as follows: Section 2 lists related basic theories and methods. In the third section, based on the basic deterministic TS-MIP model, we analyze the problem under uncertain parameters and further construct the TS-RO model. Section 4 obtains relevant data through data crawling technology and constructs numerical cases for analysis. Section 5 compares the key parameters of the model and puts forward some management investment recommendations.

Information Entropy.
Information entropy can be defined as the possibility of discrete random events [22][23][24], and the specific expression is shown in Among them, the function of p i is to measure the probability of occurrence of the situation i. In the current stage of theoretical research, information entropy has been widely used to measure the uncertainty of information, and there is a positive correlation between entropy and uncertainty. In addition, the information entropy function also has the following three special properties: (i) Continuity: S is a continuous function of p i , (p i ∈ [0, 1]) (ii) Nonnegativity: S(p 1 , p 1 , p 1 , . . . , p n ) ≥ 0 (iii) Extreme value: if and only if the condition is p 1 � p 2 � · · · � p n , the information entropy achieves the maximum value

Value-Added Entropy and Actual Entropy.
Value-added entropy is a kind of generalized entropy [25,26], which can be defined as Suppose there are N types of stocks or securities in the market, and the k type contains n i possible prices (i � 1, 2, 3, . . . , N). e number of all possible value combinations is W � n 1 × n 2 × n 3 × · · · × n N . X� (x 1 , x 2 , x 3 , . . . , x k ; i � 1, 2, . . . , W) refers to the investment ratio of the k securities, and R� (r 1 , r 2 , r 3 , . . . , r k ) is the output ratio in the i price combination. In addition, R i � 1 + r i and r i represent the rate of profit, assuming that short selling is not allowed, that is, r k ≥ 0, k � 1, 2, . . . , N. e above formula (2) can be further transformed into Actual entropy: in the actual financial market, investment transactions require costs, and an investment portfolio that ignores transaction costs will often have a great impact on actual profits and may make investments invalid. Introduce typical transaction costs into the portfolio and define linear transaction costs. However, linear transaction costs rarely appear in investment costs, so the improved is paper draws on the improved typical transaction cost function and establishes a dual-objective portfolio model with the largest profit expectation and the smallest risk expectation. Set X � (x 1 , x 2 , x 3 , . . . , x n ) as the investment ratio in n stocks, R � (r 1 , r 2 , r 3 , . . . , r n ) as the expected rate of profit, and M(X) as the actual rate of profit of stocks and securities, and the portfolio model based on the CVaR measurement is expressed as Among them, f(X, Y j ) � −X ′ Y j , x i ≥ 0 means that short selling is not allowed, if and only if ω(X) > ω(Y) and F β (X, δ, μ) < F β (Y, δ, μ). Actual entropy can reflect the speed of appreciation and the cumulative profit of funds. Compared with the mean function that cannot directly reflect the cumulative profit of the fund, the combination of actual entropy and actual entropy can be more effective and more appropriate to reflect the investment profit.

CVaR.
VaR can usually be defined as value at risk [27,28], that is, the maximum loss of an investment portfolio in a normal market in a specific period under a specific confidence level of α. Set f(X, Y): R m × R n ⟶ R mn as the loss function of the investment portfolio, and the specific meaning is the expected loss of the investment portfolio. Among them, X is the investment decision vector, which specifically means the proportion of risky securities in the investment portfolio. Y is a 0-1 variable of value at risk, which represents the profit rate of securities stocks. en, which represents the probability that the loss f(X, Y) does not exceed δ, δ is the upper limit of risk, and ψ(X, δ) is the nonincreasing right continuous function of δ. Assuming that β(0 ≤ β ≤ 1) is used to represent the confidence level, X of VaR is expressed as However, because VaR is only a quintile within a certain confidence level, the left-tail risk beyond this quintile cannot be measured by VaR, which leads to failure in assessing the overall risk of the portfolio and makes investors may ignore huge losses in some small probability events. At the same time, VaR cannot measure the risks in some extreme situations, such as financial crises. Based on this, VaR under certain CVaR was proposed. CVaR can be defined as the conditional average value of losses exceeding under a certain confidence level, which is used to measure the average excess level of losses [29,30]. According to the research of related scholars, CVaR is more sensitive to the shape of the loss distribution at the tail of the distribution [31,32]. According to the definition of CVaR, we can get It is found that VaR must be used in the process of solving equation (7), and the mathematical expression is extremely complicated, and it is difficult to calculate the result. In order to solve this problem, Rockafellar and other scholars constructed an auxiliary function F β (X, δ) and effectively connected CVaR and VaR [33,34]. e auxiliary function is where VaR β (X) � min F β (X, δ). Due to the diversity and complexity of the market environment, the loss caused is also uncertain, and the probability density function φ(Y) is not easy to calculate. erefore, the method of using historical data to simulate calculations is selected, and historical data is used to predict the specific future random vector. Assuming that the random variable Y in the past trading day represents m scenarios, the value of each scenario is Y j , j � 1, 2, . . . , m, and the probability of any one scenario is 1/m. So, it exists that Because of the existence of function max in equation (9), and because function F β (X, δ) is usually not continuous and differentiable, general algorithms cannot be solved. Here, the aggregation function proposed by related scholars is used to smooth the max function [35,36]. For any μ > 0, the above function can be expressed as

Two-Stage Mixed Integer Programming (TS-MIP) Model.
A diversified investment portfolio has lower volatility risk than personal assets, and increasing the diversification of the investment portfolio can help investors reduce the variance of the investment portfolio. Not only can the risk in the investment portfolio be effectively and accurately measured, but also the investment portfolio can evaluate diversity. According to investment portfolio theory, diversity G can be used to reduce nonsystematic risks. Specifically, the greater the value, the more diversified the investment portfolio. Based on the above theory, in the model proposed in this paper, CVaR is used to adjust the direct function to determine the new objective function to measure the risk of the investment portfolio. e value-added entropy combined with the real entropy function M is used to measure the statistical profit of investment. Skewness function is used to measure investment increment. Based on the above analysis and combined investment portfolio strategy research, this paper proposes the following TS-MIP model, the structure of which is shown in Figure 1. e problem of outer layer maximization benefit planning mainly analyzes the maximization of income and the maximization of investment diversity and the maximization of skewness. Corresponding to it is the problem of internal minimization of risk, which mainly includes the minimization of information entropy and the minimization of investment risk. e investment risk here is measured by the CVaR. e stage of maximizing the benefit of the outer layer is the overall stage, and the specific form is as follows: e objective function is combinatorial optimization problem, which maximizes the profit under the condition of the lowest risk. e first line of constraint indicates the lower bound of profit. e second line of constraint indicates the maximum investment ratio, short selling is not allowed, and there is no additional capital inflow. e third line of constraints indicates the upper limit of investment diversity. e fourth line of constraints indicates the upper limit of the investment increment. e fifth and sixth lines of constraints are related variable constraints; the purpose is to ensure the feasibility. e inner minimization problem is second stage, and the form is as follows: e specific meaning: the objective function is to minimize information entropy, the risk. e first line of constraints represents that the lowest value of information entropy is higher than the limit threshold. e second line of constraint represents that the risk that investors can bear is lower than the upper bound of the maximum tolerance. e third line of constraints describes the calculation strategy for cumulative risk. e fourth line of constraints indicates the maximum investment ratio and no remittance of external funds. e fifth line of constraints indicates that the probability of all scenarios is 1. e sixth, seventh, and eighth lines of constraints are related variable constraints. In order to calculate CVaR with r VaR , assuming that the rate of profit on investment shows a normal distribution, r VaR can be expressed as r VaR � r q + σ q z α according to the law of large numbers, where r q measures the maximum loss of the investment portfolio. en, we obtained that Among them, z(z α ) is the probability density function of the standard normal distribution, which can be expressed as In addition, because p i cannot directly predict and is extremely difficult to calculate, this paper uses a computer program to assist in the solution of the model. In order to introduce the two-stage optimization model and its application in the risk-considering investment portfolio problem, Journal of Mathematics the relevant decision variables and parameters are summarized in Table 1.

Portfolio Optimization Problem with
Uncertainty. e real capital market environment is full of instability and randomness, and it is extremely difficult or even impossible to obtain the accuracy of data parameters. In the research of dealing with uncertain information, many scholars have cited the theory of robust optimization. Robust optimization model can effectively provide an effective measure of uncertainty. Studies have found that it plays an extremely restrictive role in dealing with uncertain information parameters. In this section, by citing the theory of robust optimization, a two-stage robust optimization model for solving portfolio problems under uncertain conditions is constructed [37]. Based on the analysis of real securities and stock markets, this paper takes the two-stage basic model as the research object to explore the impact of uncertainty in depth. In the actual market analysis process, the upper bound of the expected risk probability is not always certain. In other words, in a complex capital market environment, investors' risk attitudes are not always consistent. As investors' risk attitudes change, the original assumptions of expected risk probability as deterministic will not reflect the reality. erefore, this section extends the expected risk probability from certainty to uncertainty. According to the relevant theory of robust optimization, the assumptions are as follows. Set the expected risk probability that i and ε are the disturbance items [38]. Based on the above problem description and feasibility assumptions, this paper builds the TS-RO model. e expected risk of uncertainty in the model is δ i , and the uncertainty set is the most commonly used ellipsoid set E E [39]. e l 2 norm is used to define the uncertain ellipsoid sets ∪ E , ∪ E |ε j : ‖ε j ‖ 2 ≤ Ω ⟺ ε j ���� J ε 2 j ≤ Ω}, and Ω j as adjustable safety parameters, as well as the spherical diameter of the uncertain set. It means that at most Ω j disturbance items CVaR , in which, in order to simplify the expression, set Proof.
e conventional ellipsoid uncertainty set ∪ E is c i ∈ R n : c i � c i + Δξ, ξ ≤ Ω , where Δ � 1/2 , and its con- For ∀Σ is positive and closed, it is a convex problem. erefore, convex problem can be solved by Karush-Kuhn-Tucher condition.
erefore, the meaningful solution to deal with uncertain problems is its robust feasible solution. In all robust feasible solutions, how to interpret the value of the target (and possibly uncertain) still needs deeper analysis. When applied to the target problem, it is natural to quantify the quality of the solution through the guaranteed value sup E E E[δ i : c] (i.e., the maximum value) with the help of the "worst case-oriented" concept of robust theory. us, the best possible robust feasible solution is the one that solves the TS-MIP model    Journal of Mathematics Since the risk attitude of investors is considered, the expression form of the second stage inner minimization problem is significantly different from the basic model. e specific form is as follows: It is worth noting that, in the inner minimization problem with uncertainty, the objective of the objective function is rewritten to solve the infimum problem due to the heterogeneity of investors' risk attitudes. e meaning of the second term of the constraint is the risk probability scenario under the worst scenario. When the disturbance term of the uncertain parameter fluctuates within the range of the ellipsoid set, the adjustable safety parameter reflects the decision under the worst scenario. Its purpose is to solve the most stable investment income scenario, that is, the most stable income. In the process of calculation, the planning problem is more difficult due to the solution of multiple quadratic functions. erefore, in the follow-up study, in the program involving a large number of calculations, computer Journal of Mathematics software and existing commercial software are used to solve the problem. e package is used for solving calculations to ensure the accuracy of the obvious results.

Numerical Experiment
Suppose that an investor conducts investment activities on a stock exchange and selects 10 securities stocks as alternatives through multiple comparisons in multiple securities markets. After rigorous data comparison and advantage analysis, the best investment plan combination is screened out in order to achieve the purpose of maximizing the comprehensive benefits. In the process of selecting securities and stocks, the following factors and principles need to be considered comprehensively. First, the ultimate goal of investors is to maximize profits, but, at the same time, they must also take into account their risk tolerance. In other words, investors are pursuing the maximization of profits on the basis of certain risk expectations. Second, the investor's investment assets are fixed, and the initial investment proceeds will be used again for investment. ird, the investment process is rational. When investors face the risk of resisting the initial threshold, the investment quota will no longer be added. According to the above basic elements and principles, this paper first uses data crawling technology to obtain the relevant database, then uses the computer to simulate and check the model, and finally obtains investment management recommendations and research enlightenments through a large number of comparisons.

Data Collection.
In this section, we use actual financial securities market data to conduct simulation experiments to verify the effectiveness of the model. In the data acquisition stage, this section uses python to write the technical framework, Python 3.6, requests, math, time, pandas, matplotlib, pyecharts, statsmodels, scipy, jieba, and pylab. irdly, use the dictionary method to read the data directly, and save the read data to the preset file database. Next, use a loop strategy to crawl the data step by page, jump to the next page after completing the crawling of one page of data, and repeat the same data collection process. Finally, when the acquired data is stored in the database, the crawling process is terminated.
is section obtains historical data of historical stocks from a real website (Eastern Fortune.com). e data is obtained from the period from July 24, 2020, to December 20, 2020, about 1,000 statistical data generated by 100 exchanges of 10 stocks on the next day. Since the trading of stocks is only carried out on the trading day, the data sequence is sorted by time, but the time sequence is not continuous. In order to facilitate statistical calculations, this section sorts them according to the order of the trading days, which are 1 to 100 trading days. Table 2 describes the initial part of the data form of the obtained stock information. Before the numerical simulation, we conducted a simple statistical analysis of the historical profits of 10 stocks. Table 2 lists the average profit, standard deviation, skewness, and kurtosis of a single stock. e relevant parameter settings in this section are as follows: when investors sell securities in the securities market, the ratio of securities lending margin shall not be less than 50%, so k � 0.5. In the process of stock trading, the transaction cost includes commission, stamp duty, and transfer fee, which is generally 0.3% of the transaction amount. Due to the existence of transaction fees, stock 8 Journal of Mathematics trading should not be too frequent. is paper studies wind as three levels; one is based on a 30-day cycle, another is based on a 60-day cycle, and the third is based on a 90-day cycle. Analyze the relevance and influence of various indicators of stock trading. e profit rate of the stock is fitted according to historical parameters, and the fitted value of the historical data is used as the profit rate for analysis. On the assumption of the confidence interval, this paper, respectively, assumes 85%, 90%, 95%, and 99% confidence intervals and analyzes the parameters of each confidence interval. Figure 3 depicts the volatility of the profit rate of the selected 10 stocks 100 times. It can be seen that the fluctuation of stocks is relatively large, which shows that the volatility of investment income is relatively large. It can also be found that there is no obvious law for the fluctuation of stocks, so there are no algorithms and tools that can accurately predict stock investment profits. Overall, the volatility of individual stocks is affected by objective economic factors, which is manifested in the overall change trend of the macro. From the above figure, it can be seen that the volatility of stocks has a certain time regularity; that is, there are overall ups and downs. e trend of. erefore, in the investment process, it is necessary to take into account the various factors of the investment, as well as to make a reasonable plan in combination with objective conditions and risk tolerance. Figure 4 depicts the overall (100 trading days) average amount of fluctuations in 10 stocks. Only from the perspective of the average value, among the 10 stocks, the average value of volatility of 8 stocks is higher than 0, and the average value of volatility of 2 stocks is lower than 0. is shows that the overall stock market at this stage shows a good development trend. Stockholders showed a positive attitude towards the improvement of economic conditions and actively invested funds in the stock market.

Model Algorithm Design.
In this paper, based on the Matlab (R2016a) platform, the algorithm framework is designed, and the algorithms of the two-stage basic model and the TS-RO model under uncertain conditions are constructed, respectively. Solve by calling the solver Gurobi (9-1-0). In order to ensure the rigor and scientificity of the experiment, all algorithms are operated in the same computing environment (Windows 10, Intel (R) Core (TM) i5-8300H CPU @2. 3

Journal of Mathematics 9
algorithm framework and calculation steps of the model are shown in Algorithm 1.  Table 3. e analysis found that the length of the time period has a positive correlation with the calculation time; that is, the longer the time, the longer the calculation time of the model. Secondly, the calculation time of different models is slightly different. Among them, the calculation time of the equalweight model is the shortest, the calculation time of the TS-MIP model is in the middle, and the calculation time of the TS-RO model is the longest. e increase in computing time reflects the increase in computing volume, which means that the computing volume and complexity of the TS-RO model are also the largest.

Autocorrelation Analysis.
e long memory of financial securities asset profits refers to the significant autocorrelation of distant time intervals in the time series of profits; that is, historical events will continue to affect the future. Since stock securities data has obvious long memory, historical data information can be used to predict future profits and other related parameters. In this section, the parameters obtained are normalized, and the correlation effects can be compared more clearly. In this section, using the autocorrelation coefficient method, research and analysis found that the income of the industrial average index has significant long memory, as shown in Figures 5 and 6. e autocorrelation function is a measure of correlation, that is, a measure of similarity, which is the correlation between the function and the function itself. When there are periodic components in the function, the maximum value of the autocorrelation function can well reflect this periodicity. Cross-correlation is the similarity between two functions. When both functions have the same periodic component, the maximum value can also reflect this periodic component. From the perspective of linear space, correlation operation is actually an inner product operation, and the inner product of two vectors in linear space represents the projection of one vector to another vector, indicating the similarity of the (i) Input Measurement data (ii) Initialization: Input the initial value; Setting parameter value boundary; (iii) Step 1: (iv) For TS-MIP model: Define variable type; Set probability function; (v) else TS-RO model (vi) Define the variable type; Generate random number; Set the safety parameters; (vii) End (viii) Step 2: While (ix) Input ε, ξ { } ∈ U Bj , U Bj , do step 3; Otherwise: re-step 1; (x) End while (xi) Step 3: Initialize (xii) Input Parameter constraints; Variable constraints; (xiii) End (xiv) Step two vectors, so the correlation operation reflects this kind of similarity. From Figures 5 and 6, we can find that the fluctuation of the curve tends to be flat. For the autocorrelation graph test, stationary series have short-term correlation. is property indicates that, for stationary series, only recent series values usually have a more obvious influence on the current value. e farther apart the past value, the smaller the influence on the current value. As the number of delay periods increases, the autocorrelation coefficient of a stationary series will decay relatively quickly to zero and fluctuate randomly around zero, while the autocorrelation coefficient of a nonstationary series decays slowly. is is the use of autocorrelation graphs, the standard for the stationarity test.

Influence of Safety Parameters.
To ensure the unbiased and scientific nature of the experiment, the parameters are fixed.
e model under the condition of deterministic information is the TS-MIP model. With the increase of security parameters, the parameters in the model such as rate of profit, diversity, skewness, information entropy, and CVaR are not affected. In the environment of uncertain risk preference, the model is the TS-RO model. e parameter diversity, skewness, and information entropy are not disturbed by uncertainty. Under the environment of uncertain risk appetite, the risk attitude of investment has changed. Here, through the method of robust optimization, the relevant risk preference range and boundary are constructed with the help of uncertain sets. e benefits of important parameters, CVaR, and total revenue are significantly affected by safety parameters. Figure 7 describes the impact of security parameters on A: revenue and B: diversity. It can be seen from Figure 7 that, under deterministic information conditions, changes in  security parameters will not have an impact on revenue and diversity. e figure shows that the influence curve of the TS-MIP model is a horizontal straight line. Of course, the deterministic TS-MIP model cannot cope with the problem of portfolio optimization under uncertain conditions. Under conditions of uncertain information, changes in security parameters have a positive impact on profits, but not on the diversity of investment portfolios. Specifically, as the level of security parameters increases, investors' investment income also shows an increasing trend. at is, when the risk is controllable, the rate of profit on investment is higher, and the investment ratio is larger. Figure 8 describes the impact of security parameters on C: skewness and D: information entropy.
It can be seen from Figure 8 that, under deterministic information conditions, changes in security parameters will not have an impact on skewness and information entropy. e figure shows that the influence curve of the TS-MIP model is a horizontal straight line. Of course, the deterministic TS-MIP model cannot cope with the problem of portfolio optimization under uncertain conditions. Under uncertain conditions, changes in security parameters will not have an impact on skewness and information entropy.
is shows that it is not the controllability of risk that affects investor confidence, but other deeper factors. Figure 9 describes the impact of safety parameters on E : CVaR and F: total benefits. From the change trend of the curve in Figure 9, it can be found that, under certain information conditions, changes in safety parameters will not have an impact on CVaR and overall benefits. e figure shows that the influence curve of the TS-MIP model is a horizontal straight line. Under uncertain conditions, changes in safety parameters will have a significant impact on CVaR and overall benefits. As the security parameters increase, the risk of investment shows an increasing trend, which is often referred to as a robust price, which is the price paid to resist risks. But, at the same time, the increase in safety parameters also makes the overall benefit show an increasing trend, which can increase investors' investment confidence when they choose investment.

Journal of Mathematics 13
cons of stocks and securities. e Sharpe ratio (ShR) is used to help investors understand the profit on investment related to their risk. Unlike the ShR, the Sortino ratio (SoR) is used to evaluate the excess profit of a portfolio given a downside risk. e Treynor ratio (TrR) represents a risk-adjusted profit based on systemic risk. Generally speaking, the greater the value of the Sharpe/Sortino/Treynor ratio, the greater the risk-adjusted profit, and the more attractive the risk-adjusted profit for rational investors.
ShR is an indicator proposed by William to research and measure fund performance [42]. is indicator is not only a standardized indicator for fund performance evaluation, it has been successfully applied in many fields as well. e purpose of the ShR is to calculate how much excess profit will be generated per unit of total risk assumed by the portfolio. When all assets in the portfolio are risk assets, the Sharpe ratio applies. e formula for calculating the ShR is Among them, E(Rp i ) is the expected annualized profit of the investment portfolio, R f is the annualized risk-free interest rate, and σp i is the standard deviation of the annualized profit of the investment portfolio. e Sharpe ratio represents how much excess profit investors can get for each additional risk point. If it is greater than 1, it means that the fund's profit is higher than the volatility risk; if it is less than 1, it means that the operational risk of the fund is greater than the rate of profit.
In this way, the Sharpe ratio of each investment portfolio can be calculated, that is, the ratio of investment profits to more risks. e higher the Sharpe ratio, the better the portfolio. rough experimental verification, it is found ( Table 4) that when L � 30, the equal weight method is the lowest (11), the TS-MIP model is in the middle (ShR � 0.5004), and the TS-RO model is the best (ShR � 0.5407). Compared with the equal weight method, the Sharpe value of the TS-RO model increased by 18.97%. In addition, in each model, as the time period increases (L � 30 ⟶ L � 60 ⟶ L � 90), the Sharpe ratio gradually increases. is law shows that longterm investment is due to short-term investment, which can provide decision-making suggestions for investors' investment cycle planning.
SoR is the standard for quantitatively dealing with the trade-off between the profit and risk of investment plans and the final selection of investment plans. Its calculation formula is as follows: , Among them, R pi is the profit rate of the investment portfolio, which is replaced by the average value of the profit rate of the investment plan obtained by the simulation. r i is the minimum profit required by investors of 2%. δ i (R, MARR) is the risk that the actual rate of profit is lower than the average value, that is, the downside risk of the rate of profit, MARR is the lowest acceptable rate of profit, and MARR can be the risk-free rate or 0. e SoR is a measure that is more in line with investors who are more sensitive to the decline in asset value. e higher the ratio, the higher the profit rate by the fund if it bears the same unit of downside risk. e result verification in Table 5 found that, taking L � 60 as an example, the equal weight method is the lowest (SoR � 0.4758), the TS-MIP model is in the middle (SoR � 0.5012), and the TS-RO model is the best (SoR � 0.5578). Compared with the equal weight method, the SoR of the TS-RO model has an increase of 8.20%. In addition, in each model, as the time period grows (L � 30 ⟶ L � 60 ⟶ L � 90), the SoR is gradually increasing, further verifying the conclusions obtained by the Sharpe Ratio. It should be pointed out that risk is the uncertainty of the result.
is uncertainty includes situations where the actual rate of profit is lower than expected and situations where the actual rate of profit is higher than expected. From the perspective of project investors, it is undoubtedly beneficial for the actual rate of profit to be higher than the expected value (i.e., is uncertainty brings unexpectedly high profits to investors. erefore, we should not pay attention to these risks in the investment but should pay attention to the risk that the actual rate of profit is lower than the expected value of the investment decision.
TrR is the ratio of the value of the fund's profit rate exceeding the risk-free interest rate to the systemic risk. TrR measures the excess profit that the fund receives from the systemic risk of the unit. e larger the TrR, the higher the risk-adjusted profit.
e TrR is based on the fact that nonsystematic risks have been completely diversified; that is, it is believed that the portfolio of assets held by the fund has fully diversified the risks of individual stocks or industries. TrR is suitable for evaluating nonsystematic risk of completely diversified funds, such as large-cap index funds.
e numerator of the Treynor ratio is still the excess profit of the asset portfolio, E(Rp i ) is the expected   annualized profit of the portfolio, R f is the annualized riskfree interest rate, and the denominator becomes systemic risk β pi . Its economic meaning is that every unit of systemic risk is assumed. For risk, r i represents the profit of a single stock, r m represents the market profit, and σ 2 m represents the variance of the market profit.
As shown in Table 6, through experimental verification, when L � 90, the equal weight method is the lowest (TrR � 0.3985), the TS-MIP model is in the middle (TrR � 0.4367), and the TS-RO model is the best (TrR � 0.4719). Compared with the equal weight method, the TrR of the TS-RO model increased by 7.34%. In addition, in each model, as the time period increases (L � 30 ⟶ L � 60 ⟶ L � 90), TrR is gradually increasing, which further verifies the conclusions obtained by ShR and TrR. Regarding the excess profit the investment portfolio can get, the greater the value of the TrR, the stronger the ability of the fund manager. e TrR applies to a fully diversified investment portfolio, at which time nonsystematic risks have been completely diversified, and only systemic risks in the market are considered [43,44].

Conclusion
Research on investment portfolio issues can provide investors with more robust investment plans, and the uncertainty in it is a key factor affecting investment performance. Aiming at the investment portfolio problem, this paper comprehensively considers the five dimensions of profit, diversity, skewness, information entropy, and conditional risk value and constructs a two-stage mixed integer programming (TS-MIP) model. However, the deterministic TS-MIP model cannot cope with the problem of uncertain information. erefore, this paper constructs a two-stage robust optimization (TS-RO) model by introducing robust optimization theory.
In terms of case experiments, this paper uses data crawler technology to obtain actual data from real websites for analysis and verifies the effectiveness of the proposed model in dealing with uncertain problems. e comparison of models found that, compared with the traditional equal weight model, the investment benefits of the TS-MIP model and the TS-RO model proposed in this paper have been improved. Among them, the Sharpe ratio, Sortino ratio, and Treynor ratio have the largest increase of 19.30%, 8.25%, and 7.34%, respectively. Combined with the results of empirical analysis, this paper analyzes the investment decisions of investors and puts forward some suggestions to investors. e content and contributions of this paper mainly include the following: first, in response to the uncertainty of the rate of profit, this paper uses historical data as the basis to predict the rate of profit and express the uncertainty scenario. Second, after the analysis of the mean-variance model, this paper uses the two-stage integer programming theory to establish a portfolio model that maximizes profits, minimizes risks, and considers both profits and risks. ird, the empirical analysis of the model using the data of 10 stock indexes in my country's stock market shows that the model is feasible and effective, giving investment decision-makers a simple, clear, and intuitive guidance. Fourth, relevant suggestions are made to investors. Investors should strengthen their ability to obtain relevant information and be able to identify and analyze the information and then use relevant technologies to predict stock profits. Moreover, conservative, prudent, and aggressive investors must consider their own circumstances when investing and should not invest blindly.

Data Availability
No data were used to support this study.

Conflicts of Interest
e authors declare that they have no conflicts of interest.