Investment portfolio optimization method and device, electronic equipment and storage medium
By transforming the mean-variance portfolio model into two sub-problems and randomly selecting populations in the solution space for environmental selection, the problem of NP problems in portfolio optimization is solved, and more efficient global optimal solution search and better portfolio solution discovery is achieved.
Patent Information
- Application Number
- CN202411734708.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-14
AI Technical Summary
The existing technology is difficult to effectively solve the NP problem in portfolio optimization problems, resulting in inefficient calculations and inaccurate results in large-scale and complex portfolio problems.
By transforming the mean-variance portfolio model into two sub-problems and randomly selecting populations in the solution space for environmental selection, a user-selectable portfolio solution is generated.
It realizes searching for global optimal solution sets in the entire solution space, discovering better portfolio solutions, and adapting to portfolio problems of different sizes and complexities.
Smart Images

Figure CN119624657A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of investment technology, and in particular to an investment portfolio optimization method, device, electronic equipment and storage medium. Background Art
[0002] Portfolio optimization is the process of selecting the best asset allocation from all portfolios under consideration based on some objective. The objective usually includes maximizing expected returns and minimizing financial risk. Factors considered may include tangible factors such as assets, liabilities, earnings or other fundamentals, and intangible factors such as selective divestment. Investment diversification is an effective portfolio optimization method that spreads investments into different securities in different fields, companies, enterprises, locations and governments. In practice, because the focus is on individual securities rather than the relationship between securities, applying this strategy alone may ignore the impact on the overall situation. In decades of research and development, researchers have modeled portfolio optimization problems into different mathematical models from different perspectives. Portfolio optimization problems are often NP problems. The ever-increasing problem size constrains the computational efficiency of the exact solution method and makes the calculation results of the exact solution method inaccurate.
[0003] However, banks use financial technology to promote portfolio optimization, helping them to better manage risks, diversify investments to reduce overall risks, optimize investment allocations, ensure capital security, further obtain higher investment returns, and improve banks' profitability. In addition, solving portfolio optimization problems is conducive to banks expanding the coverage of investment markets, improving the transparency and information symmetry of financial markets, increasing the inclusiveness of financial services, promoting social equity and economic development, and enhancing the stability of financial markets. Therefore, it is crucial to improve the accuracy of portfolio optimization. Summary of the invention
[0004] The present invention provides an investment portfolio optimization method, device, electronic device and storage medium, which can search the entire solution space and find the global optimal solution set, so as to find a better investment portfolio solution.
[0005] According to one aspect of the present invention, there is provided a method for optimizing an investment portfolio, comprising:
[0006] In response to a portfolio optimization event being triggered, transforming the mean-variance portfolio model into a first sub-problem and a second sub-problem;
[0007] A first population and a second population are randomly selected from the solution space involved in the mean-variance investment portfolio model; wherein the solution space is a set of investment portfolio solutions composed of various investment portfolio solutions involved in the mean-variance investment portfolio model, and both the first population and the second population are sets composed of NP investment portfolio solutions randomly selected from the solution space;
[0008] Performing environmental selection on the first population based on the first sub-problem to determine a first target population, and performing environmental selection on the second population based on the second sub-problem to determine a second target population;
[0009] Performing environmental selection on the first target population based on the mean-variance investment portfolio model to determine a third target population, and performing environmental selection on the second target population based on the mean-variance investment portfolio model to determine a fourth target population;
[0010] The third target population and the fourth target population are combined to generate a user-selectable population.
[0011] According to another aspect of the present invention, there is provided an investment portfolio optimization device, comprising:
[0012] A sub-problem determination module, for transforming the mean-variance portfolio model into a first sub-problem and a second sub-problem in response to a portfolio optimization event being triggered;
[0013] A population extraction module, used for randomly extracting a first population and a second population from the solution space involved in the mean-variance investment portfolio model; wherein the solution space is a set of investment portfolio solutions composed of various investment portfolio solutions involved in the mean-variance investment portfolio model, and the first population and the second population are both sets composed of NP investment portfolio solutions randomly extracted from the solution space;
[0014] A sub-problem population selection module, configured to perform environmental selection on the first population based on the first sub-problem to determine a first target population, and perform environmental selection on the second population based on the second sub-problem to determine a second target population;
[0015] A combination model population selection module, configured to perform environmental selection on the first target population based on the mean-variance investment portfolio model to determine a third target population, and perform environmental selection on the second target population based on the mean-variance investment portfolio model to determine a fourth target population;
[0016] The user selectable population generation module is used to merge the third target population and the fourth target population to generate a user selectable population.
[0017] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0018] at least one processor; and
[0019] a memory communicatively connected to the at least one processor; wherein,
[0020] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can perform the investment portfolio optimization method according to any embodiment of the present invention.
[0021] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the investment portfolio optimization method described in any embodiment of the present invention when executed.
[0022] The investment portfolio optimization scheme of the embodiment of the present invention, in response to the investment portfolio optimization event being triggered, transforms the mean-variance investment portfolio model into a first sub-problem and a second sub-problem; randomly extracts a first population and a second population in the solution space involved in the mean-variance investment portfolio model; wherein the solution space is a set of investment portfolio solutions composed of various investment portfolio solutions involved in the mean-variance investment portfolio model, and the first population and the second population are both sets composed of NP investment portfolio solutions randomly extracted from the solution space; performs environmental selection on the first population based on the first sub-problem to determine a first target population, and performs environmental selection on the second population based on the second sub-problem to determine a second target population; performs environmental selection on the first target population based on the mean-variance investment portfolio model to determine a third target population, and performs environmental selection on the second target population based on the mean-variance investment portfolio model to determine a fourth target population; and merges the third target population with the fourth target population to generate a user-selectable population. The technical solution provided by the embodiment of the present invention can not only search the entire solution space and find the global optimal solution set, so as to discover a better investment portfolio solution, but also is not affected by the scale, complexity and uncertainty of the problem and can adapt to different investment portfolio problems.
[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 A flow chart of an investment portfolio optimization method provided in Embodiment 1 of the present invention;
[0026] Figure 2 A schematic diagram of a process for determining the next generation population of a first population and the next generation population of a second population provided by an embodiment of the present invention;
[0027] Figure 3 A schematic diagram of a process for determining a next-generation target population of a first target population and a next-generation target population of a second target population provided by an embodiment of the present invention;
[0028] Figure 4 A schematic diagram of the structure of an investment portfolio optimization device provided in Embodiment 2 of the present invention;
[0029] Figure 5 A schematic diagram of the structure of an electronic device for implementing the investment portfolio optimization method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] Embodiment 1
[0033] Figure 1 A flow chart of a method for optimizing an investment portfolio is provided for the first embodiment of the present invention. This embodiment is applicable to the case of optimizing an investment portfolio. The method can be executed by an investment portfolio optimization device. The investment portfolio optimization device can be implemented in the form of hardware and / or software. The investment portfolio optimization device can be configured in an electronic device. Figure 1 As shown, the method includes:
[0034] S110 . In response to a portfolio optimization event being triggered, transforming the mean-variance portfolio model into a first sub-problem and a second sub-problem.
[0035] In an embodiment of the present invention, when a portfolio optimization instruction input by a user is received, it is determined that a portfolio optimization event is triggered. In response to the portfolio optimization event being triggered, a mean-variance portfolio model is obtained, and the mean-variance portfolio model is transformed into a first sub-problem and a second sub-problem. Portfolio optimization is the process of selecting the best asset allocation scheme from all considered portfolios according to certain objectives. In an embodiment of the present invention, the portfolio optimization problem can be modeled as a two-objective optimization problem, that is, a multi-objective optimization problem of maximizing investment returns while minimizing risks. Therefore, the determined mean-variance portfolio model (that is, the portfolio optimization problem) is:
[0036] Minimize F(x)=<f1(x),f2(x)>
[0037]
[0038] Among them, f1 and f2 represent the two objective functions of the portfolio multi-objective optimization problem. i Represents the decision variable, that is, the i-th investment portfolio, which includes the ratio of each investment tool in the investment portfolio. σ i,j represents the covariance between the i-th and j-th portfolio options. i represents the expected return of the ith investment portfolio. The objective function f1 represents the total risk of the portfolio, and the objective function f2 represents the negative of the expected return. D represents the number of decision variables.
[0039] There are two difficulties in solving the current portfolio optimization problem (i.e., the mean-variance portfolio model): (1) There are two objectives in the portfolio optimization problem, and it is difficult to optimize both objectives simultaneously; (2) The strategy adopted by the method throughout the optimization process should be biased. The method should advocate enhancing the diversity of decision variables in the early stage of the optimization solution, and enhancing the convergence of decision variables in the late stage of the optimization solution process. Therefore, for the dual-objective optimization problem of portfolio optimization, the original problem (mean-variance portfolio model) is transformed into two sub-problems, namely the first sub-problem and the second sub-problem. In the first sub-problem, the objective function f2 is multiplied by a parameter a greater than 1 to strengthen the solution preference for the objective function f1; in the second sub-problem, the objective function f1 is multiplied by a parameter b greater than 1 to strengthen the solution preference for the objective function f2. Among them, the first sub-problem is:
[0040] Minimize F1(x)=<f1(x),f2'(x)>
[0041]
[0042] The second sub-problem is:
[0043] Minimize F2(x)=<f1'(x),f2(x)>
[0044]
[0045] S120. Randomly extract a first population and a second population from the solution space involved in the mean-variance investment portfolio model; wherein the solution space is a set of investment portfolio solutions consisting of various investment portfolio solutions involved in the mean-variance investment portfolio model, and the first population and the second population are both sets consisting of NP investment portfolio solutions randomly extracted from the solution space.
[0046] In the embodiment of the present invention, all possible investment portfolios are determined, and the investment portfolio set consisting of all investment portfolios is used as the solution space of the mean-variance investment portfolio model. NP investment portfolios are randomly selected from the solution space of the mean-variance investment portfolio model to form a first population P1; similarly, NP investment portfolios are randomly selected from the solution space of the mean-variance investment portfolio model to form a second population P2. Wherein, NP is an integer greater than or equal to 2. It can be understood that both the first population P1 and the second population P2 are sets consisting of NP investment portfolios randomly selected from the solution space of the mean-variance investment portfolio model.
[0047] S130: Perform environmental selection on the first population based on the first sub-problem to determine a first target population, and perform environmental selection on the second population based on the second sub-problem to determine a second target population.
[0048] In the embodiment of the present invention, the first population is selected for the environment based on the first sub-problem, that is, each investment portfolio scheme in progress of the first population is evaluated based on the first sub-problem, the evaluation value is determined, the investment portfolio scheme with a good evaluation value is retained, the investment portfolio scheme with a poor evaluation value is eliminated, and the first target population is formed based on the investment portfolio scheme with a good evaluation value. Wherein, the evaluation of each investment portfolio scheme in progress of the first population based on the first sub-problem to determine the evaluation value can be understood as taking each investment portfolio scheme in progress of the first population as an independent variable, and taking the result of the dependent variable calculated by the first sub-problem as the corresponding evaluation value. Similarly, the second population is selected for the environment based on the second sub-problem, that is, the evaluation of each investment portfolio scheme in progress of the second population is evaluated based on the second sub-problem to determine the evaluation value, the investment portfolio scheme with a good evaluation value is retained, the investment portfolio scheme with a poor evaluation value is eliminated, and the second target population is formed based on the investment portfolio scheme with a good evaluation value. Wherein, the evaluation of each investment portfolio scheme in progress of the second population based on the second sub-problem to determine the evaluation value can be understood as taking each investment portfolio scheme in progress of the second population as an independent variable, and taking the result of the dependent variable calculated by the second sub-problem as the corresponding evaluation value.
[0049] Optionally, performing environmental selection on the first population based on the first subproblem to determine a first target population, and performing environmental selection on the second population based on the second subproblem to determine a second target population, including: respectively determining a first offspring population of the first population and a second offspring population of the second population; merging the first population, the first offspring population, and the second offspring population, and performing environmental selection on the merged population based on the first subproblem to generate a next generation population of the first population; merging the second population, the first offspring population, and the second offspring population, and performing environmental selection on the merged population based on the second subproblem to generate a next generation population of the second population; if the population generation determined based on the first subproblem and the population generation determined based on the second subproblem are both greater than or equal to a first preset generation threshold, the last generation population determined based on the first subproblem is used as the first target population, and the last generation population determined based on the second subproblem is used as the second target population.
[0050] Optionally, if the population generation number determined based on the first subproblem and the population generation number determined based on the second subproblem are both greater than or equal to a first preset generation threshold, then before taking the last generation population determined based on the first subproblem as the first target population, and taking the last generation population determined based on the second subproblem as the second target population, it also includes: judging whether the population generation number determined based on the first subproblem and the population generation number determined based on the second subproblem are both greater than or equal to the first preset generation threshold, if not, updating the first population based on the next generation population of the first population, updating the second population based on the next generation population of the second population, and returning to execute respectively determining the first offspring population of the first population and the second offspring population of the second population, until the population generation number determined based on the first subproblem and the population generation number determined based on the second subproblem are both greater than or equal to the first preset generation threshold.
[0051] Exemplarily, the first offspring population O1 of the first population P1 and the second offspring population O2 of the second population P2 may be determined according to the following formula:
[0052] x new,i =x i +λ*(x1-x2)+μ*(x1-x2)
[0053] Taking the first offspring population O1 of the first population P1 as an example, the first population P1 is traversed. Assume that the decision variable (i.e., investment portfolio plan) currently traversed in the population P1 is x i , randomly select two different decision variables x1 and x2 from the population P1, and then generate a new decision variable according to the above formula as an element in the first offspring population O1 of the first population P1, λ and μ are random values uniformly distributed in [0,1].
[0054] The first population P1, the first offspring population O1 of the first population P1 and the second offspring population O2 of the second population P2 are merged, that is, the union P1∪O1∪O2 of the first population P1, the first offspring population O1 and the second offspring population O2 is calculated. Based on the first subproblem, each element (that is, each investment portfolio plan) in the merged population P1∪O1∪O2 is evaluated, the evaluation value is determined, and the first NP investment portfolio plans with higher evaluation values are retained by the fast non-dominated sorting method as the next generation population of the first offspring population O1. Similarly, the second population P2, the first offspring population O1 of the first population P1 and the second offspring population O2 of the second population P2 are merged, that is, the union P2∪O1∪O2 of the second population P2, the first offspring population O1 and the second offspring population O2 is calculated. Based on the second sub-problem, each element (that is, each investment portfolio plan) in the merged population P2∪O1∪O2 is evaluated, the evaluation value is determined, and the first NP investment portfolio plans with higher evaluation values are retained as the next generation population of the second offspring population O2 through the fast non-dominated sorting method. For example, Figure 2 A schematic diagram of a process for determining the next generation population of a first population and the next generation population of a second population provided by an embodiment of the present invention.
[0055] It can be understood that the population generation number determined based on the first subproblem in the above manner (that is, the population generation number of the first population) is the same as the population generation number determined based on the second subproblem (that is, the population generation number of the second population). Among them, the population generation number refers to the process of fully completing a round of reproduction, crossover, mutation, and environmental selection steps of the multi-objective optimization evolutionary algorithm and generating the next generation of parent populations. It is called one round of iteration of the algorithm, referred to as a generation. Therefore, it is judged whether the population generation number determined based on the first subproblem and the population generation number determined based on the second subproblem are both greater than or equal to the first preset generation threshold. If not, the first population is updated based on the next generation population of the first population (that is, the next generation population of the first population is used as the new first population), and the second population is updated based on the next generation population of the second population (that is, the next generation population of the second population is used as the new second population), and the execution is returned to determine the first offspring population of the first population and the second offspring population of the second population, that is, the execution is looped. Figure 2 The operation of determining the next generation population of the first population and the next generation population of the second population is shown until the population generation number determined based on the first sub-problem and the population generation number determined based on the second sub-problem are both greater than or equal to the first preset generation threshold. Wherein, the maximum running generation number for portfolio optimization can be set as MaxGen, and the running generation number for determining the first target population and the second target population (that is, the first preset generation threshold) can be set to K*MaxGen, where K is greater than 0 and less than 1.
[0056] In an embodiment of the present invention, when the population generation number determined based on the first subproblem and the population generation number determined based on the second subproblem are both greater than or equal to the first preset algebraic threshold, the last generation population determined based on the first subproblem (that is, the last generation population of the first population) is used as the first target population, and the last generation population determined based on the second subproblem (that is, the last generation population of the second population) is used as the second target population.
[0057] S140. Perform environmental selection on the first target population based on the mean-variance investment portfolio model to determine a third target population, and perform environmental selection on the second target population based on the mean-variance investment portfolio model to determine a fourth target population.
[0058] In the embodiment of the present invention, the first target population is selected for environment based on the mean-variance investment portfolio model, that is, each investment portfolio scheme in progress of the first target population is evaluated based on the mean-variance investment portfolio model, the evaluation value is determined, the investment portfolio scheme with good evaluation value is retained, the investment portfolio scheme with poor evaluation value is eliminated, and the third target population is formed based on the investment portfolio scheme with good evaluation value. Similarly, the second target population is selected for environment based on the mean-variance investment portfolio model, that is, each investment portfolio scheme in progress of the second target population is evaluated based on the mean-variance investment portfolio model, the evaluation value is determined, the investment portfolio scheme with good evaluation value is retained, the investment portfolio scheme with poor evaluation value is eliminated, and the fourth target population is formed based on the investment portfolio scheme with good evaluation value. It can be understood that the investment portfolio optimization process is divided into a first information exchange stage and a second information exchange stage, wherein the determination of the first target population and the second target population in S130 can be regarded as the first information exchange stage, and the determination of the third target population and the fourth target population in S140 can be regarded as the second information exchange stage. The first target population and the second target population determined in the first information exchange stage are used as the two initial parent populations in the second information exchange stage, and the two initial parent populations are respectively subjected to environmental selection based on the mean-variance portfolio model to generate the third target population and the fourth target population.
[0059] Optionally, performing environmental selection on the first target population based on the mean-variance investment portfolio model to determine a third target population, and performing environmental selection on the second target population based on the mean-variance investment portfolio model to determine a fourth target population, including: respectively determining a first target offspring population of the first target population and a second target offspring population of the second target population; performing environmental selection on the first target population, the first target offspring population, and the second target offspring population based on the mean-variance investment portfolio model to determine a next-generation target population of the first target population; performing environmental selection on the second target population, the first target offspring population, and the second target offspring population based on the mean-variance investment portfolio model to determine a next-generation target population of the second target population; if the number of generations of the offspring population of the first target population determined based on the mean-variance investment portfolio model and the number of generations of the offspring population determined for the second target population are both greater than or equal to a second target preset generation threshold, taking the last generation population of the first target population as the third target population, and taking the last generation population of the second target population as the fourth target population.
[0060] Optionally, before taking the last generation of the first target population as the third target population and the last generation of the second target population as the fourth target population if the number of generations of the offspring population of the first target population determined based on the mean-variance investment portfolio model and the number of generations of the offspring population of the second target population determined are both greater than or equal to the second target preset generation threshold, the method further includes: judging whether the number of generations of the offspring population of the first target population determined based on the mean-variance investment portfolio model and the number of generations of the offspring population of the second target population determined are both greater than or equal to the second target preset generation threshold, and if not, updating the first target population based on the next generation target population of the first target offspring population, updating the second target population based on the next generation target population of the second target offspring population, and returning to execute respectively determining the first target offspring population of the first target population and the second target offspring population of the second target population, until the number of generations of the offspring population of the first target population determined based on the mean-variance investment portfolio model and the number of generations of the offspring population of the second target population determined are both greater than or equal to the second target preset generation threshold.
[0061] For example, the formula x new,i =x i+λ*(x1-x2)+μ*(x1-x2) to respectively determine the first target offspring population of the first target population and the second target offspring population of the second target population. Based on the mean-variance investment portfolio model, the first target offspring population, the first target offspring population, and the second target offspring population are subjected to environmental selection to determine the next generation target population of the first target population; based on the mean-variance investment portfolio model, the second target population, the first target offspring population, and the second target offspring population are subjected to environmental selection to determine the next generation target population of the second target population. Optionally, performing environmental selection on the first target population, the first target offspring population and the second target offspring population based on the mean-variance investment portfolio model to determine the next generation target population of the first target population includes: merging the first target population, the first target offspring population and the second target offspring population, and performing environmental selection on the merged population based on the mean-variance investment portfolio model to generate a first intermediate population; merging the first intermediate population with the first target population, and performing environmental selection on the merged population based on the mean-variance investment portfolio model to generate the next generation target population of the first target population. Optionally, performing environmental selection on the second target population, the first target offspring population and the second target offspring population based on the mean-variance investment portfolio model to determine the next generation target population of the second target population, including: merging the second target population, the first target offspring population and the second target offspring population, and performing environmental selection on the merged population based on the mean-variance investment portfolio model to generate a second intermediate population; merging the second intermediate population with the second target population, and performing environmental selection on the merged population based on the mean-variance investment portfolio model to generate the next generation target population of the second target population.
[0062] Exemplarily, the first target population is recorded as P1', the second target population is recorded as P2', the first target offspring population of the first target population is recorded as O1', and the second target offspring population of the second target population is recorded as O2'. The first target population P1', the first target offspring population O1' and the second target offspring population O2' are merged, that is, the union P1'∪O1'∪O2' of the first target population P1', the first target offspring population O1' and the second target offspring population O2' is calculated. Based on the mean-variance investment portfolio model, each element (that is, each investment portfolio plan) of the merged population P1'∪O1'∪O2' is evaluated to determine the evaluation value, and the first NP investment portfolio plans with higher evaluation values are retained by the fast non-dominated sorting method to generate the first intermediate population TP1. The first intermediate population TP1 is merged with the first target population P1', that is, the union TP1∪P1' of the first target population P1' and the first intermediate population TP1 is calculated, and each element (that is, each investment portfolio plan) of the merged population TP1∪P1' is evaluated based on the mean-variance investment portfolio model to determine the evaluation value, and the first NP investment portfolio plans with higher evaluation values are retained through the fast non-dominated sorting method to generate the next generation target population of the first target population P1'. Similarly, the second target population P2', the first target offspring population O1' and the second target offspring population O2' are merged, that is, the union P2'∪O1'∪O2' of the second target population P2', the first target offspring population O1' and the second target offspring population O2' is calculated. Based on the mean-variance portfolio model, each element (that is, each investment portfolio plan) of the merged population P2'∪O1'∪O2' is evaluated to determine the evaluation value, and the first NP investment portfolio plans with higher evaluation values are retained through a fast non-dominated sorting method to generate a second intermediate population TP2. The second intermediate population TP2 is merged with the second target population P2', that is, the union TP2∪P2' of the second target population P2' and the second intermediate population TP2 is calculated, and each element (that is, each investment portfolio plan) of the merged population TP2∪P2' is evaluated based on the mean-variance portfolio model to determine the evaluation value, and the first NP investment portfolio plans with higher evaluation values are retained through a fast non-dominated sorting method to generate the next generation target population of the second target population P2'. Exemplarily, Figure 3 A schematic diagram of a process for determining a next-generation target population of a first target population and a next-generation target population of a second target population provided by an embodiment of the present invention.
[0063] It can be understood that the number of generations of the offspring population of the first target population determined based on the mean-variance investment portfolio model in the above manner is the same as the number of generations of the offspring population of the second target population determined based on the mean-variance investment portfolio model. Therefore, it is determined whether the number of generations of the offspring population of the first target population determined based on the mean-variance investment portfolio model and the number of generations of the offspring population of the determined second target population are both greater than or equal to the second target preset generation threshold. If not, the first target population is updated based on the next generation target population of the first target population (that is, the next generation target population of the first target population is used as the new first target population), and the second target population is updated based on the next generation target population of the second target population (that is, the next generation target population of the second target population is used as the new second target population), and the execution is returned to determine the first target offspring population of the first target population and the second target offspring population of the second target population, that is, the execution is looped. Figure 3 The operation of determining the next generation target population of the first target population and the next generation target population of the second target population shown in the figure is performed until the generation of the offspring population of the first target population determined based on the mean-variance portfolio model and the generation of the offspring population of the second target population determined are both greater than or equal to the second target preset generation threshold. Wherein, the maximum running generation for portfolio optimization can be set as MaxGen, and the running generation for determining the third target population and the fourth target population (that is, the second preset generation threshold) can be set to (1-K)*MaxGen, where K is greater than 0 and less than 1.
[0064] If the number of offspring populations of the first target population determined based on the mean-variance portfolio model and the number of offspring populations of the second target population determined are both greater than or equal to the second target preset generation threshold, the last generation population of the first target population will be used as the third target population, and the last generation population of the second target population will be used as the fourth target population.
[0065] S150: Merge the third target population and the fourth target population to generate a user-selectable population.
[0066] In the embodiment of the present invention, the third target population is merged with the fourth target population, that is, the union of the third target population and the fourth target population is calculated, and the union of the third target population and the fourth target population is used as the user selectable population. The user can select a suitable investment portfolio scheme in the user selectable population as needed.
[0067] The investment portfolio optimization method of the embodiment of the present invention, in response to the investment portfolio optimization event being triggered, transforms the mean-variance investment portfolio model into a first sub-problem and a second sub-problem; randomly extracts a first population and a second population in the solution space involved in the mean-variance investment portfolio model; wherein the solution space is a set of investment portfolio solutions composed of various investment portfolio solutions involved in the mean-variance investment portfolio model, and the first population and the second population are both sets composed of NP investment portfolio solutions randomly extracted from the solution space; performs environmental selection on the first population based on the first sub-problem to determine a first target population, and performs environmental selection on the second population based on the second sub-problem to determine a second target population; performs environmental selection on the first target population based on the mean-variance investment portfolio model to determine a third target population, and performs environmental selection on the second target population based on the mean-variance investment portfolio model to determine a fourth target population; and merges the third target population and the fourth target population to generate a user-selectable population. The technical solution provided by the embodiment of the present invention can not only search the entire solution space and find the global optimal solution set, so as to discover a better investment portfolio solution, but also is not affected by the scale, complexity and uncertainty of the problem and can adapt to different investment portfolio problems.
[0068] Embodiment 2
[0069] Figure 4 This is a structural diagram of an investment portfolio optimization device provided in Embodiment 2 of the present invention.
[0070] like Figure 4 As shown, the device comprises:
[0071] A sub-problem determination module 410, for transforming the mean-variance portfolio model into a first sub-problem and a second sub-problem in response to a portfolio optimization event being triggered;
[0072] A population extraction module 420 is used to randomly extract a first population and a second population from the solution space involved in the mean-variance investment portfolio model; wherein the solution space is a set of investment portfolio solutions consisting of various investment portfolio solutions involved in the mean-variance investment portfolio model, and the first population and the second population are both sets consisting of NP investment portfolio solutions randomly extracted from the solution space;
[0073] A sub-problem population selection module 430 is used to perform environmental selection on the first population based on the first sub-problem to determine a first target population, and to perform environmental selection on the second population based on the second sub-problem to determine a second target population;
[0074] A combination model population selection module 440 is used to perform environmental selection on the first target population based on the mean-variance investment portfolio model to determine a third target population, and to perform environmental selection on the second target population based on the mean-variance investment portfolio model to determine a fourth target population;
[0075] The user selectable population generating module 450 is configured to merge the third target population and the fourth target population to generate a user selectable population.
[0076] Optionally, the sub-problem selection population module is used to:
[0077] respectively determining a first offspring population of the first population and a second offspring population of the second population;
[0078] Merging the first population, the first offspring population, and the second offspring population, and performing environmental selection on the merged population based on the first subproblem to generate a next generation population of the first population;
[0079] Merging the second population, the first offspring population, and the second offspring population, and performing environmental selection on the merged population based on the second sub-problem to generate a next generation population of the second population;
[0080] If the population generation number determined based on the first sub-problem and the population generation number determined based on the second sub-problem are both greater than or equal to a first preset algebraic threshold, the last generation population determined based on the first sub-problem will be used as the first target population, and the last generation population determined based on the second sub-problem will be used as the second target population.
[0081] Optionally, also include:
[0082] The first loop judgment module is used to determine whether the population generation determined based on the first subproblem and the population generation determined based on the second subproblem are both greater than or equal to the first preset generation threshold before taking the last generation population determined based on the first subproblem as the first target population and the last generation population determined based on the second subproblem as the second target population. If not, update the first population based on the next generation population of the first population, update the second population based on the next generation population of the second population, and return to execute the determination of the first offspring population of the first population and the second offspring population of the second population, respectively, until the population generation determined based on the first subproblem and the population generation determined based on the second subproblem are both greater than or equal to the first preset generation threshold.
[0083] Optionally, the combined model selection population module includes:
[0084] a target offspring population determining unit, configured to respectively determine a first target offspring population of the first target population and a second target offspring population of the second target population;
[0085] A first next-generation target population determination unit, configured to perform environmental selection on the first target population, the first target offspring population, and the second target offspring population based on the mean-variance investment portfolio model to determine the next-generation target population of the first target population;
[0086] A second next-generation target population determination unit, configured to perform environmental selection on the second target population, the first target offspring population, and the second target offspring population based on the mean-variance investment portfolio model to determine the next-generation target population of the second target population;
[0087] The combination model selects a population unit, which is used to use the last generation population of the first target population as the third target population and the last generation population of the second target population as the fourth target population if the number of offspring population generations of the first target population determined based on the mean-variance investment portfolio model and the number of offspring population generations of the second target population determined are both greater than or equal to a second target preset generation threshold.
[0088] Optionally, the first next-generation target population determination unit is used to:
[0089] Merging the first target population, the first target offspring population, and the second target offspring population, and performing environmental selection on the merged population based on the mean-variance portfolio model to generate a first intermediate population;
[0090] The first intermediate population is merged with the first target population, and environmental selection is performed on the merged population based on the mean-variance portfolio model to generate a next generation target population of the first target population.
[0091] Optionally, the second next-generation target population determination unit is used to:
[0092] Merging the second target population, the first target offspring population, and the second target offspring population, and performing environmental selection on the merged population based on the mean-variance portfolio model to generate a second intermediate population;
[0093] The second intermediate population is merged with the second target population, and environmental selection is performed on the merged population based on the mean-variance portfolio model to generate a next generation target population of the second target population.
[0094] Optionally, also include:
[0095] The second loop judgment module is used for judging whether the number of offspring populations of the first target population determined based on the mean-variance investment portfolio model and the number of offspring populations of the second target population determined are both greater than or equal to the second target preset generation threshold before taking the last generation population of the first target population as the third target population and the last generation population of the second target population as the fourth target population if both are greater than or equal to the second target preset generation threshold; if not, updating the first target population based on the next generation target population of the first target offspring population, updating the second target population based on the next generation target population of the second target offspring population, and returning to respectively determine the first target offspring population of the first target population and the second target offspring population of the second target population, until both the number of offspring populations of the first target population determined based on the mean-variance investment portfolio model and the number of offspring populations of the second target population determined are greater than or equal to the second target preset generation threshold.
[0096] The investment portfolio optimization device provided in the embodiment of the present invention can execute the investment portfolio optimization method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0097] Embodiment 3
[0098] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0099] like Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0100] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0101] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a portfolio optimization method.
[0102] In some embodiments, the portfolio optimization method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the portfolio optimization method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the portfolio optimization method in any other suitable manner (e.g., by means of firmware).
[0103] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0104] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0105] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0106] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0107] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0108] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0109] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0110] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A portfolio optimization method, characterized in that: include: In response to a portfolio optimization event being triggered, transforming the mean-variance portfolio model into a first sub-problem and a second sub-problem; A first population and a second population are randomly selected from the solution space involved in the mean-variance investment portfolio model; wherein the solution space is a set of investment portfolio solutions composed of various investment portfolio solutions involved in the mean-variance investment portfolio model, and both the first population and the second population are sets composed of NP investment portfolio solutions randomly selected from the solution space; Performing environmental selection on the first population based on the first sub-problem to determine a first target population, and performing environmental selection on the second population based on the second sub-problem to determine a second target population; Performing environmental selection on the first target population based on the mean-variance investment portfolio model to determine a third target population, and performing environmental selection on the second target population based on the mean-variance investment portfolio model to determine a fourth target population; The third target population and the fourth target population are combined to generate a user-selectable population.
2. The method according to claim 1, characterized in that Performing environmental selection on the first population based on the first sub-problem to determine a first target population, and performing environmental selection on the second population based on the second sub-problem to determine a second target population, including: respectively determining a first offspring population of the first population and a second offspring population of the second population; Merging the first population, the first offspring population, and the second offspring population, and performing environmental selection on the merged population based on the first subproblem to generate a next generation population of the first population; Merging the second population, the first offspring population, and the second offspring population, and performing environmental selection on the merged population based on the second sub-problem to generate a next generation population of the second population; If the population generation number determined based on the first sub-problem and the population generation number determined based on the second sub-problem are both greater than or equal to a first preset algebraic threshold, the last generation population determined based on the first sub-problem will be used as the first target population, and the last generation population determined based on the second sub-problem will be used as the second target population.
3. The method according to claim 2, characterized in that If the population generation number determined based on the first sub-problem and the population generation number determined based on the second sub-problem are both greater than or equal to a first preset generation threshold, the last generation population determined based on the first sub-problem is used as the first target population, and the last generation population determined based on the second sub-problem is used as the second target population, the method further includes: Determine whether the population generation number determined based on the first subproblem and the population generation number determined based on the second subproblem are both greater than or equal to a first preset generation threshold; if not, update the first population based on the next generation population of the first population, update the second population based on the next generation population of the second population, and return to execute the determination of the first offspring population of the first population and the second offspring population of the second population, respectively, until the population generation number determined based on the first subproblem and the population generation number determined based on the second subproblem are both greater than or equal to the first preset generation threshold.
4. The method according to claim 1, characterized in that Performing environmental selection on the first target population based on the mean-variance investment portfolio model to determine a third target population, and performing environmental selection on the second target population based on the mean-variance investment portfolio model to determine a fourth target population, including: respectively determining a first target offspring population of the first target population and a second target offspring population of the second target population; Performing environmental selection on the first target population, the first target offspring population, and the second target offspring population based on the mean-variance investment portfolio model to determine the next generation target population of the first target population; Performing environmental selection on the second target population, the first target offspring population, and the second target offspring population based on the mean-variance investment portfolio model to determine the next generation target population of the second target population; If the number of offspring populations of the first target population determined based on the mean-variance investment portfolio model and the number of offspring populations of the second target population determined are both greater than or equal to the second target preset generation threshold, the last generation population of the first target population is used as the third target population, and the last generation population of the second target population is used as the fourth target population.
5. The method according to claim 4, characterized in that Performing environmental selection on the first target population, the first target offspring population, and the second target offspring population based on the mean-variance investment portfolio model to determine the next generation target population of the first target population includes: Merging the first target population, the first target offspring population, and the second target offspring population, and performing environmental selection on the merged population based on the mean-variance portfolio model to generate a first intermediate population; The first intermediate population is merged with the first target population, and environmental selection is performed on the merged population based on the mean-variance portfolio model to generate a next generation target population of the first target population.
6. The method according to claim 4, characterized in that Performing environmental selection on the second target population, the first target offspring population, and the second target offspring population based on the mean-variance investment portfolio model to determine the next generation target population of the second target population includes: Merging the second target population, the first target offspring population, and the second target offspring population, and performing environmental selection on the merged population based on the mean-variance portfolio model to generate a second intermediate population; The second intermediate population is merged with the second target population, and environmental selection is performed on the merged population based on the mean-variance portfolio model to generate a next generation target population of the second target population.
7. The method according to claim 4, characterized in that If the number of offspring populations of the first target population determined based on the mean-variance portfolio model and the number of offspring populations of the second target population determined are both greater than or equal to a second target preset generation threshold, the last generation population of the first target population is used as the third target population, and the last generation population of the second target population is used as the fourth target population, the method further includes: Determine whether the number of offspring populations of the first target population determined based on the mean-variance investment portfolio model and the number of offspring populations of the second target population determined are both greater than or equal to a second target preset algebra threshold; if not, update the first target population based on the next generation target population of the first target offspring population, update the second target population based on the next generation target population of the second target offspring population, and return to execute the determination of the first target offspring population of the first target population and the second target offspring population of the second target population, respectively, until the number of offspring populations of the first target population determined based on the mean-variance investment portfolio model and the number of offspring populations of the second target population determined are both greater than or equal to a second target preset algebra threshold.
8. An investment portfolio optimization device, characterized in that: include: A sub-problem determination module, for transforming the mean-variance portfolio model into a first sub-problem and a second sub-problem in response to a portfolio optimization event being triggered; A population extraction module, used for randomly extracting a first population and a second population from the solution space involved in the mean-variance investment portfolio model; wherein the solution space is a set of investment portfolio solutions composed of various investment portfolio solutions involved in the mean-variance investment portfolio model, and the first population and the second population are both sets composed of NP investment portfolio solutions randomly extracted from the solution space; A sub-problem population selection module, configured to perform environmental selection on the first population based on the first sub-problem to determine a first target population, and perform environmental selection on the second population based on the second sub-problem to determine a second target population; A combination model population selection module, configured to perform environmental selection on the first target population based on the mean-variance investment portfolio model to determine a third target population, and perform environmental selection on the second target population based on the mean-variance investment portfolio model to determine a fourth target population; The user selectable population generation module is used to merge the third target population and the fourth target population to generate a user selectable population.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the portfolio optimization method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the investment portfolio optimization method according to any one of claims 1 to 7 when executed.