Quantum computing investment portfolio optimization method and device based on graph decomposition

Through the quantum computing method based on graph decomposition and selecting the optimization method according to the sparsity of the covariance matrix, the efficiency and accuracy problems of the quantum approximate optimization algorithm under large-scale asset numbers are solved, and efficient investment in small-bit subcomputers is achieved. Combination optimization.

CN118608293APending Publication Date: 2024-09-06CCB FINTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410636968.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

When the existing technology solves the Markowitz mean variance model, the calculation time of the classical algorithm is slow, and the quantum approximate optimization algorithm (QAOA) cannot satisfy the investment portfolio optimization of large-scale asset numbers on a noisy quantum computer, and the solution accuracy is low.

Method used

A quantum computing method based on graph decomposition is used to determine the optimization method by obtaining the sparsity of the covariance matrix. If the sparsity is less than the threshold, the portfolio objective function is mapped to the maximum partitioning problem of the graph, divided into subgraphs and restored; if the sparsity is If the degree is greater than the threshold, the node information is transferred to the connected nodes, the solution variables are reduced, and the two-layer quantum approximate optimization algorithm QAOA is used for optimization.

Benefits of technology

Efficiently solving the multivariable Markowitz mean variance model problem on a small-bit quantum computer reduces the number of qubits required, improves the solution speed and accuracy, and enables efficient and accurate investment portfolio optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118608293A
    Figure CN118608293A
Patent Text Reader

Abstract

The invention discloses a quantum computing portfolio optimization method and device based on graph decomposition, and relates to the field of artificial intelligence, and the method comprises the steps: obtaining a covariance matrix of the stock income of a user; the sparseness of the matrix is determined, and a to-be-optimized portfolio objective function is determined according to the income expectation and the parameters; if the sparseness is smaller than a sparseness threshold value, a two-layer QAOA algorithm is adopted to obtain a preliminary optimal solution, then optimization is further carried out through an iteration method to obtain a final optimal solution, and if the sparseness is larger than the threshold value, node information of a graph corresponding to the target function is transferred to a connected node to obtain a final optimal solution; optimizing the objective function in a mode of reducing the solving variable to a preset bit number to obtain an optimal solution; and recommending an optimal investment scheme to the user according to the optimal solution. According to the method, the number of quantum bits required for calling the quantum QAOA solver can be reduced, the solving complexity is reduced, the solving speed and precision are improved, and the optimal investment scheme is efficiently and accurately recommended to the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a quantum computing investment portfolio optimization method and device based on graph decomposition. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.

[0003] The portfolio optimization problem is described as follows: An investor uses a fixed amount of money to buy some securities for investment and sells them after the expiration. He needs to make investment decisions, screen out high-quality securities from the many securities in the market, and allocate investment funds to the selected securities. The investor's decision is based on: the highest rate of return while ensuring the lowest risk. This financial investment problem can be mathematically modeled by the Markowitz variance mean model. The algorithm proposed in this technology is used to solve the Markowitz variance mean model to obtain the best investment return plan.

[0004] Existing technologies are divided into two categories: one is the Lagrange multiplier algorithm of the classical algorithm, which solves the Markowitz variance mean model to obtain the best investment return plan. The other is the quantum approximate optimization algorithm (QAOA), which solves the best investment return plan by mapping the classical problem into the quantum circuit.

[0005] The existing general technologies have the following disadvantages: when the existing classical Lagrange multiplier method solves the Markowitz variance mean model, when the sample size is huge, the calculation time is slow; due to the current limitations of quantum computer hardware development, current noisy quantum computers can only run quantum approximate optimization algorithms (QAOA) with fewer variables, which cannot meet the quantum accelerated solution of investment portfolio optimization problems with a large number of assets, and the solution accuracy is also low. Summary of the invention

[0006] An embodiment of the present invention provides a quantum computing portfolio optimization method based on graph decomposition, which is used to reduce the number of quantum bits required to call a quantum QAOA solver. The method includes:

[0007] Obtain the covariance matrix of the user's stock returns, expected returns, and parameters that constitute the portfolio objective function;

[0008] Determine the sparsity of the covariance matrix, and determine the portfolio objective function to be optimized based on the expected return and the parameters that constitute the portfolio objective function;

[0009] If the sparsity is less than a preset sparsity threshold, the portfolio objective function is optimized by a first optimization method; if the sparsity is greater than the preset sparsity threshold, the portfolio objective function is optimized by a second optimization method to obtain an optimal solution determined by optimizing the portfolio objective function; the first optimization method is: mapping the portfolio objective function to the maximum partitioning problem of the graph, partitioning the original graph into multiple subgraphs and then restoring the original graph, wherein a two-layer quantum approximate optimization algorithm QAOA is used to obtain a preliminary optimal solution, and then an iterative optimization method is used to obtain a final optimal solution; the second optimization method is: transferring the node information of the graph corresponding to the portfolio objective function to the connected nodes to reduce the solution variables to a preset number of bits;

[0010] The best investment plan is recommended to the user according to the optimal solution determined by optimizing the portfolio objective function.

[0011] The embodiment of the present invention also provides a quantum computing portfolio optimization device based on graph decomposition, which is used to reduce the number of quantum bits required to call a quantum QAOA solver. The device includes:

[0012] An acquisition unit, used to obtain the covariance matrix of the user's stock returns, the expected return, and the parameters constituting the objective function of the investment portfolio;

[0013] A determination unit, used to determine the sparsity of the covariance matrix, and determine the portfolio objective function to be optimized according to the expected return and the parameters constituting the portfolio objective function;

[0014] An optimization unit, configured to optimize the portfolio objective function by a first optimization method if the sparsity is less than a preset sparsity threshold, and optimize the portfolio objective function by a second optimization method if the sparsity is greater than the preset sparsity threshold, so as to obtain an optimal solution determined by optimizing the portfolio objective function; the first optimization method is: mapping the portfolio objective function to a maximum partitioning problem of a graph, partitioning the original graph into a plurality of subgraphs and then restoring the original graph, wherein a two-layer quantum approximate optimization algorithm QAOA is used to obtain a preliminary optimal solution, and then an iterative optimization method is used to obtain a final optimal solution; the second optimization method is: transferring node information of the graph corresponding to the portfolio objective function to connected nodes, so as to reduce the solution variables to a preset number of bits;

[0015] The best solution recommendation unit is used to recommend the best investment solution to the user according to the optimal solution determined by the objective function of optimizing the investment portfolio.

[0016] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned quantum computing portfolio optimization method based on graph decomposition when executing the computer program.

[0017] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which implements the above-mentioned quantum computing investment portfolio optimization method based on graph decomposition when executed by a processor.

[0018] An embodiment of the present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned quantum computing investment portfolio optimization method based on graph decomposition is implemented.

[0019] In the existing technology, only quantum approximate optimization algorithms (QAOA) with fewer variables can be run on current noisy quantum computers, which cannot meet the quantum accelerated solution of investment portfolio optimization problems with a large number of assets, and the solution accuracy is also low. In view of this technical problem, an embodiment of the present invention provides a quantum computing investment portfolio optimization scheme based on graph decomposition. When the scheme works: obtain the covariance matrix of the user's stock returns, the expected returns and the parameters constituting the investment portfolio objective function; determine the sparsity of the covariance matrix, and determine the investment portfolio objective function to be optimized according to the expected returns and the parameters constituting the investment portfolio objective function; if the sparsity is less than a preset sparsity threshold, optimize the investment portfolio objective function by a first optimization method, and if the sparsity is greater than the preset sparsity threshold, optimize the investment portfolio objective function by a second optimization method to obtain the optimal solution determined by the optimized investment portfolio objective function; the first optimization method is: map the investment portfolio objective function to the maximum partition problem of the graph, partition the original graph into multiple subgraphs and then restore it to the original graph, wherein a two-layer quantum approximate optimization algorithm QAOA is used to obtain a preliminary optimal solution, and then the final optimal solution is obtained by iterative optimization; the second optimization method is: transfer the node information of the corresponding graph of the investment portfolio objective function to the connected nodes to reduce the solution variables to a preset number of bits; and recommend the best investment plan to the user according to the optimal solution determined by the optimized investment portfolio objective function. Compared with the prior art, the beneficial technical effects of the quantum computing portfolio optimization solution based on graph decomposition provided by the embodiment of the present invention are:

[0020] First, the embodiment of the present invention introduces a quantum approximate optimization calculation method of graph decomposition, which can solve the multivariable Markowitz variance mean model problem on a quantum computer with a small number of bits; reduce the number of quantum bits required to call the quantum QAOA solver, reduce the solution complexity, and improve the solution speed and accuracy.

[0021] Secondly, the embodiment of the present invention proposes two graph partitioning / graph decomposition solution schemes, and selects a suitable graph decomposition method based on covariance sparsity as a judgment basis to reduce the solution complexity and improve the solution speed and accuracy.

[0022] In summary, the quantum computing investment portfolio optimization solution based on graph decomposition provided by the embodiment of the present invention can reduce the number of quantum bits required to call the quantum QAOA solver, reduce the complexity of the solution, improve the speed and accuracy of the solution, and can efficiently and accurately recommend the best investment plan to the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. 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. In the drawings:

[0024] Figure 1 It is a schematic diagram of the process of a quantum computing investment portfolio optimization method based on graph decomposition in an embodiment of the present invention;

[0025] Figure 2 It is a schematic diagram of the principle of quantum computing investment portfolio optimization based on graph decomposition in an embodiment of the present invention;

[0026] Figure 3 It is a schematic diagram of the principle of optimizing the objective function by mapping the objective function to the maximum partition problem of the graph in an embodiment of the present invention;

[0027] Figure 4 A schematic diagram of the principle of optimizing the objective function in an embodiment of the present invention by transferring node information of the objective function corresponding graph to connected nodes so as to reduce the solution variables to a preset number of bits;

[0028] Figure 5 It is a schematic diagram of the structure of a quantum computing portfolio optimization device based on graph decomposition in an embodiment of the present invention. DETAILED DESCRIPTION

[0029] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0030] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of laws and regulations.

[0031] The embodiment of the present invention relates to a quantum computing investment portfolio optimization scheme based on graph decomposition, which is a scheme for recommending the best investment plan to customers based on quantum computing investment portfolio optimization based on graph decomposition. The scheme first performs graph decomposition on a classical computer, and then uses a quantum computer to call the QAOA algorithm to solve the Markowitz variance mean model, and finally obtains a set of investment portfolio optimization schemes. The embodiment of the present invention provides two graph decomposition methods, and provides a judgment basis based on the sparsity of the mean square error matrix. A better decomposition method is selected according to the specific situation, and a method for using quantum computers to enhance investment portfolio optimization investment returns is provided under the current situation where the development of quantum computer hardware is limited.

[0032] Figure 1 : is a flow chart of a quantum computing portfolio optimization method based on graph decomposition in an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0033] Step 101: Obtain the covariance matrix of the user's stock returns, the expected returns, and the parameters constituting the portfolio objective function;

[0034] Step 102: Determine the sparsity of the covariance matrix, and determine the portfolio objective function to be optimized based on the expected return and the parameters constituting the portfolio objective function;

[0035] Step 103: if the sparsity is less than a preset sparsity threshold, the portfolio objective function is optimized by a first optimization method; if the sparsity is greater than the preset sparsity threshold, the portfolio objective function is optimized by a second optimization method to obtain an optimal solution determined by optimizing the portfolio objective function; the first optimization method is: mapping the portfolio objective function to the maximum partitioning problem of the graph, partitioning the original graph into multiple subgraphs and then restoring the original graph, wherein a two-layer quantum approximate optimization algorithm QAOA is used to obtain a preliminary optimal solution, and then an iterative optimization method is used to obtain a final optimal solution; the second optimization method is: transferring the node information of the graph corresponding to the portfolio objective function to the connected nodes, so as to reduce the solution variables to a preset number of bits;

[0036] Step 104: recommending the best investment plan to the user according to the optimal solution determined by optimizing the investment portfolio objective function.

[0037] The quantum computing investment portfolio optimization method based on graph decomposition provided by the embodiment of the present invention, when working: obtaining the covariance matrix of the user's stock returns, the expected return and the parameters constituting the investment portfolio objective function; determining the sparsity of the covariance matrix, and determining the investment portfolio objective function to be optimized according to the expected return and the parameters constituting the investment portfolio objective function; if the sparsity is less than a preset sparsity threshold, optimizing the investment portfolio objective function by a first optimization method, and if the sparsity is greater than the preset sparsity threshold, optimizing the investment portfolio objective function by a second optimization method, and obtaining the optimal solution determined by the optimized investment portfolio objective function; the first optimization method is: mapping the investment portfolio objective function to the maximum partition problem of the graph, partitioning the original graph into multiple subgraphs and then restoring the original graph, wherein a two-layer quantum approximate optimization algorithm QAOA is used to obtain a preliminary optimal solution, and then optimizing by an iterative method to obtain a final optimal solution; the second optimization method is: transferring the node information of the corresponding graph of the investment portfolio objective function to the connected nodes, so as to reduce the solution variables to a preset number of bits; and recommending the best investment plan to the user according to the optimal solution determined by the optimized investment portfolio objective function. Compared with the prior art, the beneficial technical effects of the quantum computing portfolio optimization solution based on graph decomposition provided by the embodiment of the present invention are:

[0038] First, the embodiment of the present invention introduces a quantum approximate optimization calculation method of graph decomposition, which can solve the multivariable Markowitz variance mean model problem on a quantum computer with a small number of bits; reduce the number of quantum bits required to call the quantum QAOA solver, reduce the solution complexity, and improve the solution speed and accuracy.

[0039] Secondly, the embodiment of the present invention proposes two graph partitioning / graph decomposition solution schemes, and selects a suitable graph decomposition method based on covariance sparsity as a judgment basis to reduce the solution complexity and improve the solution speed and accuracy.

[0040] In summary, the quantum computing investment portfolio optimization method based on graph decomposition provided by the embodiment of the present invention can reduce the number of quantum bits required to call the quantum QAOA solver, reduce the complexity of the solution, improve the speed and accuracy of the solution, and can efficiently and accurately recommend the best investment plan to the user. The quantum computing investment portfolio optimization method based on graph decomposition is introduced in detail below.

[0041] Part 1: In order to better understand how the present invention is implemented, the following basic financial knowledge is introduced:

[0042] Markowitz mean-variance model:

[0043]

[0044] Z i : The proportion of investment in each stock or bond, 0 or 1, σ ij: Covariance matrix of stock returns, μ i : Expected return, factor q sets the investor's risk preference attribute: q = 1 means that the investor wants to minimize the risk value, and q = 0 means that the investor only considers high-return investment options and does not care how high the risk is. In actual situations, the q value will be set between 0 and 1, rather than two extreme cases.

[0045] In actual investment problems, the investor's investment budget is fixed, so the optimization problem is subject to constraints: Therefore, the objective function of the optimization problem becomes:

[0046]

[0047] Part 2: Use the concept of graph to map the optimization objective function to the maximum cut problem of the graph, that is, each asset variable z i Corresponding to the nodes in the graph, the weights of the edges connecting the nodes in the graph correspond to the size of the covariance matrix variables between assets. The 0 and 1 of the asset investment ratio correspond to the maximum cut problem of the graph, which divides the nodes into two groups. Therefore, the objective function of asset optimization can be converted into the maximum cut problem of graph segmentation to solve.

[0048] Part III: Two QAOA algorithms based on graph decomposition solve the Markowitz mean-variance model and give the best investment plan.

[0049] Option 1: QAOA 2 +Iteration method, corresponding to Figure 2 "QAOA 2 +Iterative method to optimize the objective function".

[0050] Step 1: QAOA 2

[0051] Figure 3 It shows how to transform a graph partitioning problem with 40 nodes into a graph partitioning problem with 4 subgraphs, where the number of nodes in each subgraph is less than 15 (assuming that the number of bits of the quantum computer hardware or quantum simulator that can be directly used is 15). Therefore, each subgraph can be directly optimized and solved by the QAOA algorithm. Afterwards, the 4 subgraphs are restored to the original graph, forming an optimization problem with 4 nodes. The weight of the new graph needs to be calculated based on the number of edges connecting the subgraphs. If the number of nodes in the new graph is less than 15, the QAOA solver can be directly called to optimize and obtain the solution to the original problem.

[0052] From the above, it can be seen that in one embodiment, the first optimization method is used to optimize the portfolio objective function, including:

[0053] Convert the objective function to be optimized into an undirected graph containing M nodes, where M is a positive integer greater than 1;

[0054] An undirected graph with M nodes is divided into N sub-undirected graphs, where: the number of nodes in each sub-undirected graph is less than the number of bits of quantum computer hardware or quantum simulator, and N is a positive integer greater than 1;

[0055] Each sub-undirected graph is optimized and solved through the quantum approximate optimization algorithm QAOA;

[0056] The N sub-undirected graphs after optimization are restored to the original graph, forming a new graph of the optimization problem with N nodes. The weight of the new graph is calculated according to the number of edges connecting the sub-undirected graphs. The number of nodes in the new graph is less than the number of bits of the quantum computer hardware or quantum simulator.

[0057] The new graph is optimized and solved by the quantum approximate optimization algorithm QAOA to obtain an initial solution as the optimal solution determined by the optimized portfolio objective function.

[0058] In specific implementation, the above-mentioned specific implementation method of optimizing the investment portfolio objective function by mapping the investment portfolio objective function to the maximum partitioning problem of the graph can reduce the number of quantum bits required to call the quantum QAOA solver, reduce the solution complexity, improve the solution speed and accuracy, and can efficiently and accurately recommend the best investment plan to the user.

[0059] Step 2: Iteration

[0060] Generally speaking, for slightly more complex graphs, the previous step QAOA 2 The solution obtained is slightly inferior to the optimal solution, so the solution obtained in the previous step can be used as the initial solution and the input of this step of the iteration method. Fine-tuning can be performed through the iteration method to improve the algorithm's solution performance.

[0061] 1. Take the solution obtained in the first step as the initial solution.

[0062] 2. According to the variables, the objective function F A The ranking is as follows: the values ​​of the 40 nodes are flipped between 0 and 1 in turn, and then the change of the objective function is calculated. The 15 variables with the greatest impact are put into the QAOA optimizer for optimization, and the values ​​of the other 25 variables are kept unchanged.

[0063] 3. Repeat step 2 until convergence.

[0064] It can be seen from the above that, in one embodiment, the quantum computing investment portfolio optimization method based on graph decomposition may further include: iteratively performing the following operations to determine the optimal solution using the initial solution as the initial value, and performing the following operations in each iteration cycle:

[0065] Get the initial solution of the current cycle;

[0066] For the initial solution of the current cycle, the variables are sorted according to their influence on the objective function. The sorting method is as follows: flip the values ​​of M nodes between 0 and 1 in turn, calculate the change of the objective function, put the Q variables with the greatest influence on the objective function into the QAOA optimizer for optimization, and keep the values ​​of the other MQ variables unchanged. Q is a positive integer greater than 1.

[0067] If the iteration termination condition is reached according to the sorting result, the initial solution of the current cycle is taken as the optimal solution.

[0068] It can be seen from the above that, in one embodiment, the above-mentioned quantum computing investment portfolio optimization method based on graph decomposition may also include:

[0069] If it is determined according to the sorting result that the iteration termination condition has not been met, the initial solution of the current cycle is used as the initial solution of the next cycle, and the iteration steps are continued.

[0070] In specific implementation, the above-mentioned specific implementation method of iteratively executing the operation of determining the optimal solution using the initial solution as the initial value can reduce the number of quantum bits required to call the quantum QAOA solver, reduce the complexity of the solution, improve the speed and accuracy of the solution, and can efficiently and accurately recommend the best investment plan to the user.

[0071] Solution 2: Graph decomposition method, corresponding to Figure 2 "Graph Decomposition Method for Optimizing Objective Functions"

[0072] The idea of ​​graph decomposition is to convert the objective function into an objective function with fewer variables through mathematical formula derivation. The strategy is to reduce the variable to be solved by one each iteration, and iterate this step until the number of variables to be solved is reduced to an optimization problem with less than or equal to 15, and then call the QAOA optimization solver to solve it. The specific process is shown in the following 6-node diagram. Figure 4 As shown:

[0073] First, Figure 4 The nodes in are divided into three groups from left to right. By transferring the information of node 1 to the nodes 2, 3, and 4 connected to it, the objective function of 6 variables can be equivalently converted to an objective function of 5 variables.

[0074] As can be seen from the above, in one embodiment, the portfolio objective function is optimized by transferring the node information of the graph corresponding to the portfolio objective function to the connected nodes so as to reduce the solution variables to a preset number of bits, that is, the portfolio objective function is optimized by the second optimization method, including:

[0075] Convert the objective function to be optimized into an undirected graph containing R nodes, where R is a positive integer greater than 1;

[0076] Take an undirected graph with R nodes as the initial graph and perform the following iterative solution operation:

[0077] Get the initial graph of the current period;

[0078] The information of any node in the initial graph of the current cycle is transferred to multiple nodes connected to the node, and an undirected graph of R-1 nodes is obtained, so as to convert the objective function of R variables into an objective function of R-1 variables;

[0079] When the number of nodes of the undirected graph of R-1 nodes is less than the number of bits of the quantum computer hardware or quantum simulator, the QAOA optimization solver is called to solve and obtain the optimal solution determined by the optimized portfolio objective function.

[0080] It can be seen from the above that, in one embodiment, the above-mentioned quantum computing investment portfolio optimization method based on graph decomposition may also include:

[0081] When the number of nodes in the undirected graph of R-1 nodes is greater than the number of bits of the quantum computer hardware or quantum simulator, the undirected graph of R-1 nodes is used as the initial graph of the next cycle, and the operation of the next cycle is continued.

[0082] In specific implementation, the above-mentioned method of transferring the node information of the graph corresponding to the portfolio objective function to the connected nodes to optimize the specific implementation method of the portfolio objective function in a manner of reducing the solution variables to a preset number of bits can reduce the number of quantum bits required to call the quantum QAOA solver, reduce the solution complexity, improve the solution speed and accuracy, and can achieve efficient and accurate recommendation of the best investment plan to the user.

[0083] Part 4: Combination Figure 2 The process shown introduces all the steps of the above process

[0084] Step 1: Input the covariance matrix of stock returns, expected returns, and all parameters that constitute the target optimization function.

[0085] Step 2: Calculate the sparsity of the covariance matrix and the subsequent objective function to be optimized, and determine the sparsity.

[0086] Step 3: If the sparsity is less than 70%, then option 1 (QAOA) will be adopted 2 + iterative method) to optimize the objective function. If the sparsity is greater than 70%, then scheme 2 (graph decomposition method) will be used to optimize the objective function.

[0087] Step 4: Output the best investment plan based on the optimal solution obtained through optimization.

[0088] It can be seen from the above that, in one embodiment, the preset sparsity threshold value ranges from 65% to 75%.

[0089] In specific implementation, the sparsity threshold value range is 65% to 75%, which can reduce the number of quantum bits required to call the quantum QAOA solver, reduce the complexity of the solution, improve the speed and accuracy of the solution, and can efficiently and accurately recommend the best investment plan to the user.

[0090] It can be seen from the above that, in one embodiment, the value of the preset sparsity threshold is 70%.

[0091] In specific implementation, the sparsity threshold value of 70% can reduce the number of quantum bits required to call the quantum QAOA solver, reduce the complexity of the solution, improve the speed and accuracy of the solution, and can efficiently and accurately recommend the best investment plan to users.

[0092] In one embodiment, the above-mentioned quantum computing investment portfolio optimization method based on graph decomposition may also include: adjusting the preset sparsity threshold after a preset period of time.

[0093] In specific implementation, after a preset period of time, adjusting the preset sparsity threshold can reduce the number of quantum bits required to call the quantum QAOA solver, reduce the complexity of the solution, and improve the speed and accuracy of the solution.

[0094] In summary, the beneficial technical effects of the quantum computing portfolio optimization method based on graph decomposition provided by the embodiment of the present invention are:

[0095] First, by proposing two graph partitioning / graph decomposition solutions, the number of quantum bits required to call the quantum QAOA solver is reduced, thereby solving portfolio optimization problems with more assets;

[0096] Second, it is proposed to use covariance sparsity as the basis for judgment, select the appropriate decomposition scheme according to the correlation between assets, reduce the complexity of solution and obtain better investment plans, so as to efficiently and accurately recommend the best investment plan to users.

[0097] The present invention also provides a quantum computing investment portfolio optimization device based on graph decomposition in an embodiment, as described in the following embodiment. Since the principle of solving the problem by the device is similar to that of the quantum computing investment portfolio optimization method based on graph decomposition, the implementation of the device can refer to the implementation of the quantum computing investment portfolio optimization method based on graph decomposition, and the repeated parts will not be repeated.

[0098] Figure 5 Schematic diagram of the structure of a quantum computing portfolio optimization device based on graph decomposition in an embodiment of the present invention. Figure 5 As shown, the device comprises:

[0099] Acquisition unit 01, used to obtain the covariance matrix of the user's stock returns, the expected return and the parameters constituting the objective function of the investment portfolio;

[0100] Determination unit 02, used to determine the sparsity of the covariance matrix, and determine the portfolio objective function to be optimized according to the expected return and the parameters constituting the portfolio objective function;

[0101] The optimization unit 03 is used to optimize the portfolio objective function by a first optimization method if the sparsity is less than a preset sparsity threshold, and optimize the portfolio objective function by a second optimization method if the sparsity is greater than the preset sparsity threshold, so as to obtain an optimal solution determined by optimizing the portfolio objective function; the first optimization method is: mapping the portfolio objective function to the maximum partitioning problem of the graph, partitioning the original graph into multiple subgraphs and then restoring the original graph, wherein a two-layer quantum approximate optimization algorithm QAOA is used to obtain a preliminary optimal solution, and then an iterative optimization method is used to obtain a final optimal solution; the second optimization method is: transferring the node information of the graph corresponding to the portfolio objective function to the connected nodes, so as to reduce the solution variables to a preset number of bits;

[0102] The best solution recommendation unit 04 is used to recommend the best investment solution to the user according to the optimal solution determined by the objective function of optimizing the investment portfolio.

[0103] In one embodiment, the portfolio objective function is optimized using a first optimization method, including:

[0104] The objective function to be optimized is converted into an undirected graph with M nodes, where M is a positive integer greater than 1; an undirected graph with M nodes is divided into N sub-undirected graphs, where: the number of nodes in each sub-undirected graph is less than the number of bits of the quantum computer hardware or quantum simulator, and N is a positive integer greater than 1;

[0105] Each sub-undirected graph is optimized and solved through the quantum approximate optimization algorithm QAOA;

[0106] The N sub-undirected graphs after optimization are restored to the original graph, forming a new graph of the optimization problem with N nodes. The weight of the new graph is calculated according to the number of edges connecting the sub-undirected graphs. The number of nodes in the new graph is less than the number of bits of the quantum computer hardware or quantum simulator.

[0107] The new graph is optimized and solved by the quantum approximate optimization algorithm QAOA to obtain an initial solution as the optimal solution determined by the optimized portfolio objective function.

[0108] In one embodiment, optimizing the portfolio objective function using the first optimization method may further include: iteratively performing the following operations to determine the optimal solution using the initial solution as the initial value, and performing the following operations in each iteration cycle:

[0109] Get the initial solution of the current cycle;

[0110] For the initial solution of the current cycle, the variables are sorted according to their influence on the objective function. The sorting method is as follows: flip the values ​​of M nodes between 0 and 1 in turn, calculate the change of the objective function, put the Q variables with the greatest influence on the objective function into the QAOA optimizer for optimization, and keep the values ​​of the other MQ variables unchanged. Q is a positive integer greater than 1.

[0111] If the iteration termination condition is reached according to the sorting result, the initial solution of the current cycle is taken as the optimal solution.

[0112] In one embodiment, optimizing the investment portfolio objective function using the first optimization method may further include:

[0113] If it is determined according to the sorting result that the iteration termination condition has not been met, the initial solution of the current cycle is used as the initial solution of the next cycle, and the iteration steps are continued.

[0114] In one embodiment, the portfolio objective function is optimized by transferring the node information of the graph corresponding to the portfolio objective function to the connected nodes so as to reduce the solution variables to a preset number of bits, that is, optimizing the portfolio objective function by the second optimization method includes:

[0115] Convert the objective function to be optimized into an undirected graph containing R nodes, where R is a positive integer greater than 1;

[0116] Take an undirected graph with R nodes as the initial graph and perform the following iterative solution operation:

[0117] Get the initial graph of the current period;

[0118] The information of any node in the initial graph of the current cycle is transferred to multiple nodes connected to the node, and an undirected graph of R-1 nodes is obtained, so as to convert the objective function of R variables into an objective function of R-1 variables;

[0119] When the number of nodes of the undirected graph of R-1 nodes is less than the number of bits of the quantum computer hardware or quantum simulator, the QAOA optimization solver is called to solve and obtain the optimal solution determined by the optimized portfolio objective function.

[0120] In one embodiment, the portfolio objective function is optimized by transferring node information of a graph corresponding to the portfolio objective function to connected nodes so as to reduce the solution variables to a preset number of bits, and the method may further include:

[0121] When the number of nodes in the undirected graph of R-1 nodes is greater than the number of bits of the quantum computer hardware or quantum simulator, the undirected graph of R-1 nodes is used as the initial graph of the next cycle, and the operation of the next cycle is continued.

[0122] In one embodiment, the preset sparsity threshold value ranges from 65% to 75%.

[0123] In one embodiment, the preset sparsity threshold value is 70%.

[0124] In one embodiment, the above-mentioned quantum computing investment portfolio optimization device based on graph decomposition may also include: a threshold adjustment unit, used to adjust the preset sparsity threshold after a preset period of time.

[0125] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned quantum computing portfolio optimization method based on graph decomposition when executing the computer program.

[0126] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which implements the above-mentioned quantum computing investment portfolio optimization method based on graph decomposition when executed by a processor.

[0127] An embodiment of the present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned quantum computing investment portfolio optimization method based on graph decomposition is implemented.

[0128] In the existing technology, only quantum approximate optimization algorithms (QAOA) with fewer variables can be run on current noisy quantum computers, which cannot meet the quantum accelerated solution of investment portfolio optimization problems with a large number of assets, and the solution accuracy is also low. In view of this technical problem, an embodiment of the present invention provides a quantum computing investment portfolio optimization scheme based on graph decomposition. When the scheme works: obtain the covariance matrix of the user's stock returns, the expected returns and the parameters constituting the investment portfolio objective function; determine the sparsity of the covariance matrix, and determine the investment portfolio objective function to be optimized according to the expected returns and the parameters constituting the investment portfolio objective function; if the sparsity is less than a preset sparsity threshold, optimize the investment portfolio objective function by a first optimization method, and if the sparsity is greater than the preset sparsity threshold, optimize the investment portfolio objective function by a second optimization method to obtain the optimal solution determined by the optimized investment portfolio objective function; the first optimization method is: map the investment portfolio objective function to the maximum partition problem of the graph, partition the original graph into multiple subgraphs and then restore it to the original graph, wherein a two-layer quantum approximate optimization algorithm QAOA is used to obtain a preliminary optimal solution, and then the final optimal solution is obtained by iterative optimization; the second optimization method is: transfer the node information of the corresponding graph of the investment portfolio objective function to the connected nodes to reduce the solution variables to a preset number of bits; and recommend the best investment plan to the user according to the optimal solution determined by the optimized investment portfolio objective function. Compared with the prior art, the beneficial technical effects of the quantum computing portfolio optimization solution based on graph decomposition provided by the embodiment of the present invention are:

[0129] First, the embodiment of the present invention introduces a quantum approximate optimization calculation method of graph decomposition, which can solve the multivariable Markowitz variance mean model problem on a quantum computer with a small number of bits; reduce the number of quantum bits required to call the quantum QAOA solver, reduce the solution complexity, and improve the solution speed and accuracy.

[0130] Secondly, the embodiment of the present invention proposes two graph segmentation / graph decomposition solution schemes, and selects the appropriate graph decomposition method based on covariance sparsity as the judgment basis, thereby reducing the solution complexity and improving the solution speed and accuracy, so as to efficiently and accurately recommend the best investment plan to users.

[0131] In summary, the quantum computing portfolio optimization solution based on graph decomposition provided by the embodiment of the present invention can reduce the number of quantum bits required to call the quantum QAOA solver, reduce the solution complexity, and improve the solution speed and accuracy.

[0132] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0133] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0134] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0135] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0136] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A quantum computing portfolio optimization method based on graph decomposition, characterized in that: include: Obtain the covariance matrix of the user's stock returns, expected returns, and parameters that constitute the portfolio objective function; Determine the sparsity of the covariance matrix, and determine the portfolio objective function to be optimized based on the expected return and the parameters that constitute the portfolio objective function; If the sparsity is less than a preset sparsity threshold, the portfolio objective function is optimized by a first optimization method; if the sparsity is greater than the preset sparsity threshold, the portfolio objective function is optimized by a second optimization method to obtain an optimal solution determined by optimizing the portfolio objective function; the first optimization method is: mapping the portfolio objective function to the maximum partitioning problem of the graph, partitioning the original graph into multiple subgraphs and then restoring the original graph, wherein a two-layer quantum approximate optimization algorithm QAOA is used to obtain a preliminary optimal solution, and then an iterative optimization method is used to obtain a final optimal solution; the second optimization method is: transferring the node information of the graph corresponding to the portfolio objective function to the connected nodes to reduce the solution variables to a preset number of bits; The best investment plan is recommended to the user according to the optimal solution determined by optimizing the portfolio objective function.

2. The method according to claim 1, characterized in that The investment portfolio objective function is optimized using a first optimization method, including: Convert the objective function to be optimized into an undirected graph containing M nodes, where M is a positive integer greater than 1; An undirected graph with M nodes is divided into N sub-undirected graphs, where: the number of nodes in each sub-undirected graph is less than the number of bits of quantum computer hardware or quantum simulator, and N is a positive integer greater than 1; Each sub-undirected graph is optimized and solved through the quantum approximate optimization algorithm QAOA; The N sub-undirected graphs after optimization are restored to the original graph, forming a new graph of the optimization problem with N nodes. The weight of the new graph is calculated according to the number of edges connecting the sub-undirected graphs. The number of nodes in the new graph is less than the number of bits of the quantum computer hardware or quantum simulator. The new graph is optimized and solved by the quantum approximate optimization algorithm QAOA to obtain an initial solution as the optimal solution determined by the optimized portfolio objective function.

3. The method according to claim 2, characterized in that Also includes: The following operations are performed iteratively using the initial solution as the initial value to determine the optimal solution. The following operations are performed in each iteration cycle: Get the initial solution of the current cycle; For the initial solution of the current cycle, the variables are sorted according to their influence on the objective function. The sorting method is as follows: flip the values ​​of M nodes between 0 and 1 in turn, calculate the change of the objective function, put the Q variables with the greatest influence on the objective function into the QAOA optimizer for optimization, and keep the values ​​of the other MQ variables unchanged. Q is a positive integer greater than 1. If the iteration termination condition is reached according to the sorting result, the initial solution of the current cycle is taken as the optimal solution.

4. The method according to claim 3, characterized in that Also includes: If it is determined according to the sorting result that the iteration termination condition has not been met, the initial solution of the current cycle is used as the initial solution of the next cycle, and the iteration steps are continued.

5. The method according to claim 1, characterized in that The second optimization method is used to optimize the portfolio objective function, including: Convert the objective function to be optimized into an undirected graph containing R nodes, where R is a positive integer greater than 1; Take an undirected graph with R nodes as the initial graph and perform the following iterative solution operation: Get the initial graph of the current period; The information of any node in the initial graph of the current cycle is transferred to multiple nodes connected to the node, and an undirected graph of R-1 nodes is obtained, so as to convert the objective function of R variables into an objective function of R-1 variables; When the number of nodes of the undirected graph of R-1 nodes is less than the number of bits of the quantum computer hardware or quantum simulator, the QAOA optimization solver is called to solve and obtain the optimal solution determined by the optimized portfolio objective function.

6. The method according to claim 5, characterized in that Also includes: When the number of nodes in the undirected graph of R-1 nodes is greater than the number of bits of the quantum computer hardware or quantum simulator, the undirected graph of R-1 nodes is used as the initial graph of the next cycle, and the operation of the next cycle is continued.

7. The method according to claim 1, characterized in that The preset sparsity threshold value ranges from 65% to 75%.

8. The method according to claim 7, characterized in that The preset sparsity threshold value is 70%.

9. The method according to claim 1, characterized in that Also includes: After a preset period of time, the preset sparsity threshold is adjusted.

10. A quantum computing portfolio optimization device based on graph decomposition, characterized in that: include: An acquisition unit, used to obtain the covariance matrix of the user's stock returns, the expected return, and the parameters constituting the objective function of the investment portfolio; A determination unit, used to determine the sparsity of the covariance matrix, and determine the portfolio objective function to be optimized according to the expected return and the parameters constituting the portfolio objective function; An optimization unit, configured to optimize the portfolio objective function by a first optimization method if the sparsity is less than a preset sparsity threshold, and optimize the portfolio objective function by a second optimization method if the sparsity is greater than the preset sparsity threshold, so as to obtain an optimal solution determined by optimizing the portfolio objective function; the first optimization method is: mapping the portfolio objective function to a maximum partitioning problem of a graph, partitioning the original graph into a plurality of subgraphs and then restoring the original graph, wherein a two-layer quantum approximate optimization algorithm QAOA is used to obtain a preliminary optimal solution, and then an iterative optimization method is used to obtain a final optimal solution; the second optimization method is: transferring node information of the graph corresponding to the portfolio objective function to connected nodes, so as to reduce the solution variables to a preset number of bits; The best solution recommendation unit is used to recommend the best investment solution to the user according to the optimal solution determined by the objective function of optimizing the investment portfolio.

11. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 9 is implemented.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

13. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.