laitimes

Original | Application of quantum approximation optimization algorithm in China's stock market

Original | Application of quantum approximation optimization algorithm in China's stock market
Original | Application of quantum approximation optimization algorithm in China's stock market

Author | Wu Yongfei Ji Ruipu Wang Yanbo Ma Yin

Original | Application of quantum approximation optimization algorithm in China's stock market

On October 16, 2020, General Secretary Xi Jinping stressed when presiding over the 24th collective study of the Political Bureau of the CPC Central Committee: "We must fully understand the importance and urgency of promoting the development of quantum science and technology, strengthen the strategic planning and systematic layout of quantum science and technology, grasp the general trend, and play a good game of chess." "With the advent of the era of quantum technology, quantum computers, quantum encrypted communications, quantum algorithms, quantum computing materials and storage, quantum financial markets and many other fields have flourished. Among them, quantum computers, as the foundation of computing power in the new era of subversive challenges to classical computers, have made a series of breakthroughs on a global scale in recent years; however, the research of quantum algorithms that can truly give soul to quantum computing is still a blue ocean waiting to be developed. This paper focuses on the innovative application of quantum algorithms in China's financial market, with a view to helping the acceleration of the era of quantum financial technology.

Overview of quantum algorithms

As early as the 1990s, the development of quantum algorithms has gradually emerged. In 1994, Peter Shor of MIT Bell Labs proposed the Shor algorithm for large integer mass factorization, which could theoretically crack a 2048-bit strength RSA key in 100 seconds, while using a classical computer could take 1 billion years; two years later, Lov K. Grover of Bell Labs proposed the Grover search algorithm. A 256-bit key can be cracked in about 2128 iterations, which is a square-level acceleration compared to classical computers. Subsequently, the research of quantum algorithms has gradually developed, and relevant achievements have emerged in various research directions.

In terms of quantum neural network algorithms. In 1995, Subhash C. Kak proposed the concept of quantum neural computing; in 2000, Nobuyuki Matsui studied neural networks for quantum gate circuits; and in 2006, On Sunday, Gui studied quantum sensors.

In terms of quantum financial algorithms. In 2004, Chen Zeqian quantified the classical Black-Scholes-Merton equation from the perspective of continuous equations of quantum mechanics such as the Schrödinger equation, opening a chapter in the combination of quantum mechanical algorithms and the financial field; in 2020, on the basis of quantum technology, Wu Yongfei et al. proposed the concept of quantum financial technology and the "6M" framework for quantum technology applied to the financial field, emphasizing that quantum technology should focus on quantum algorithms, calculations, and computing power. To propose a feasible framework methodology for the batch introduction of quantum technology into the field of financial technology.

In terms of quantum approximation optimization algorithms. In 2014, the Quantum Approximate Optimization Algorithm (QAOA) was proposed by Edward Farhi et al. QAOA algorithm is a hybrid algorithm of classical computing and quantum computing, which can be used to solve problems such as combinatorial optimization problems and maximum segmentation problems. The algorithm has a significant acceleration effect when solving some NP-hard problems, and can give an approximate solution to the problem at polynomial complexity. The core idea of QAOA algorithm is to gradually iterate from the ground state of the initial Hamiltonian amount to the ground state of the Hamiltonian amount of the target problem through the quantum thermal optimization algorithm; in this process, the parameters of the quantum insulation algorithm need to be gradually optimized, and the optimization process of the parameters is mainly completed in classical computing, and the thermal evolution process is completed in quantum computing. In principle, the QAOA algorithm needs to complete the operation on the general-purpose quantum computer, that is, the quantum computer is required to be able to implement a Turing-complete quantum gate operation; however, limited by the physical implementation of the general-purpose quantum computer, it is currently stuck at the scale of dozens of qubits, and in recent years, there have been some other architecture quantum computing schemes, such as the Coherent Ising Machine, which has a stronger acceleration effect specifically for the combination optimization problem. At the same time, the experimental scale can be increased to tens of thousands of qubits.

Take the classic scenario of the largest segmentation problem applicable to QAOA as an example: suppose that there are four subjects A, B, C, and D that need to be divided, and the correlation tightness between them is expressed by weights, as shown in Figure 1.

Original | Application of quantum approximation optimization algorithm in China's stock market

Figure 1 Simplified maximum segmentation problem

Four bodies now need to be assigned into two combinations, with the aim of minimizing correlation within each combination and having the greatest correlation between combinations (i.e. intra-combination weight and minimum, intercomposition weight and maximum). Taking Figure 1 as an example, if you place AC in one combination and BD in another combination, since the weights of AC and BD are zero, under this allocation, the sum of the weights in the combination is zero, and the sum of the weights between the combinations is 4, which is a solution to the largest partition problem.

When solving using the QAOA algorithm, according to the principle of QAOA, if the Hamiltonian quantity of the target problem can be obtained, its corresponding ground state is the solution of the target problem. Therefore, the Hamiltonian amount of the target problem can be obtained by adiabatic evolution algorithm from the initial Hamiltonian quantity gradually.

Original | Application of quantum approximation optimization algorithm in China's stock market
Original | Application of quantum approximation optimization algorithm in China's stock market

Figure 2 An example of a quantum circuit diagram that solves the largest segmentation problem

Empirical demonstration of the application of quantum approximation optimization algorithms in the stock market

In view of the large number of optimization problems such as asset portfolio allocation and portfolio construction in the financial market, QAOA algorithm shows great application potential in the financial market. Take the stock portfolio optimization based on QAOA algorithm as an example: it is proposed to select M stocks from N stocks, and combine the selected stocks with equal weight to construct an equity asset strategy. The risk of the portfolio can be measured by the volatility of the desired rate of return. Where the expected return can be calculated from the closing price of each stock, the fluctuation can be calculated by the covariance matrix of the closing price between the selected stocks. Therefore, drawing on the idea of solving the largest segmentation problem from the QAOA algorithm, a specific combination can be found so that the correlation between the stocks in the portfolio is as small as possible under the premise of achieving the desired return target, so as to reduce the risk and optimize the performance of the portfolio.

Original | Application of quantum approximation optimization algorithm in China's stock market

In the empirical analysis, wuliangye (000858), Guizhou Moutai (600519), Hengli Hydraulics (601100), Mango Supermedia (300413), BGI Gene (300676), and Hongya CNC (002833) were collected from January 1, 2018 to April 1, 2021, and the experimental environment of quantum computer was simulated based on IBM Quantum Experience According to the different degrees of risk appetite of investors (i.e., risk aversion, risk neutrality and risk appetite), 3 of the 6 stocks are selected, and the equity portfolio is generated based on the QAOA algorithm. When constructing the portfolio, this article uses form translation to calculate the stock positions for the next quarter from the stock data of the past four quarters, that is, using the daily closing price data of 6 stocks from January 1, 2018 to December 31, 2018, and generating the mean and covariance matrix as the expectations, so as to calculate the positions held from January 1, 2019 to March 31, 2019, and determine which three stocks to choose as the combination for the quarter.

Table 1 The results of the combinatorial optimization problem are solved using the QAOA algorithm

Original | Application of quantum approximation optimization algorithm in China's stock market

The experimental results show that Table 1 represents the qubit bits, the selected stock, the objective function values, and the probability values calculated by the quanta from left to right. Each of the 6 qubits represents a stock (a qubit of 1 indicates that the stock is selected to enter the portfolio; if it is 0, the stock is not selected). In the first case, the qubit is 1 is q1, q2, q3 three (qubits are calculated from q0), indicating that the stocks that choose to enter the portfolio correspond to 600519, 601100, 300413 in turn. In the time period in Table 1, the constructed portfolio is the equal-weight combination of the three stocks, and the net value of subsequent portfolios is calculated accordingly.

In order to calculate the long-term effect of the quantum algorithm, a total of 10 combined position calculations were performed in this paper, and the dates of recalculation and position exchange were 2019-01-01, 2019-04-01, 2 0 1 9 - 0 7 - 0 1, 2 0 1 9 - 1 0 - 1, 2 0 2 0 - 1 - 0 1, 2 0 2 0 - 4 - 1, 2020-07-01, 2020-10-01, 2021-01-01 and 2021-04-01, with a total time span of three years. Perform 100 quantum calculations in each time period, take the three qubits with the highest probability as the result of this calculation, calculate the weighted yield as the quarterly income and record the conversion to a net value curve. In order to verify the effectiveness of the strategy, the control group selected a combination that held 6 stocks on average at the same time, and also recorded the current rate of return.

Original | Application of quantum approximation optimization algorithm in China's stock market
Original | Application of quantum approximation optimization algorithm in China's stock market
Original | Application of quantum approximation optimization algorithm in China's stock market

Figure 3 The combination selected using the QAOA algorithm compares to the equity of the average holding portfolio

From the perspective of portfolio net value, under different investor risk preference scenarios, the quantum QAOA algorithm is compared with the net value of the control group. In Figure 3, orange represents the combined net value of the shares in the equal weighted holding pool, and red represents the net value calculated using the QAOA algorithm, with the abscissa as the trade date and the vertical coordinate as the simulated trade net value initially being 1. The results showed that in the environment of investor risk aversion (q=0.15), investor risk neutrality (q=0.5), and investor risk appetite (q=0.85), the combinations screened by the quantum QAOA algorithm performed better than the control group in the long run compared with the control group that held stocks with equal weight. And with the rise of investors' risk appetite, the portfolio performance of the quantum QAOA algorithm has also continued to improve.

Table 2 Comparison of combinations selected using the QAOA algorithm with the average holding combination evaluation index

Original | Application of quantum approximation optimization algorithm in China's stock market

From the perspective of combination indicators, under different investor risk preference scenarios, the quantum QAOA algorithm is compared with the control group for the four dimensions of return (RET), accumulated return (ACC), Sharp Ratio and Sortino ratio. The results showed that the combination of quantum QAOA algorithms in the risk-averse environment was slightly lower than that of the control group, and the combination of quantum QAOA algorithms was better than that of the control group in the remaining indicators.

epilogue

In the era of quantum financial technology, quantum algorithms have shown great prospects in the financial industry with their unique advantages. In the field of financial investment, the allocation and combination of assets has always been the focus of the industry and academia. This paper focuses on the application of quantum algorithm in China's A-share market, and explores the quantization improvement of intelligent decision-making in financial investment by applying the quantum approximation optimization algorithm to stock portfolio allocation. The quantum algorithm used in this paper can not only be used as a step in the allocation of classical large-scale assets to quickly screen out a basket of assets as an asset pool; in the future, it is also expected to explore a branch of the asset allocation method, considering holding specific assets screened by quantum algorithms for direct investment. Limited by the current number of qubits, the quantum QAOA algorithm is temporarily difficult to process massive financial market data. In the future, with the increasing number of qubits in quantum computers, quantum algorithms will be further combined with classical asset allocation models to bring greater value to individual and institutional investors in stocks, funds or large asset investments.

(Longying Zhida (Beijing) Technology Co., Ltd. Big Data Center Yang Xuan, Wang Yiduo, Xu Qi, Shi Jie, and Gong Yafei also contributed to this article.) )

Author Affilications: Huaxia Bank Co., Ltd., Dandong City Center Branch of Chinese Minmin Bank, Longying Zhida (Beijing) Technology Co., Ltd., Beijing Bose Quantum Technology Co., Ltd

Editor-in-Charge: Liu Biao

Original | Application of quantum approximation optimization algorithm in China's stock market

【Editor Recruitment】

Resume delivery email:

[email protected]

Inquiries:

010-62631958

Long-term effectiveness

Original | Application of quantum approximation optimization algorithm in China's stock market