Quantum alternating operator ansatz with PSO optimizer for portfolio optimization problem
Wenjie Liu, Yue Ma, Yuchen Gu, Jiajun Cheng, Qingshan Wu · Applied Soft Computing · 2025
Recently, Quantum Approximate Optimization Algorithm (QAOA) and Quantum Alternating Operator ansatz (QAOAz) are utilized to solve the Mean Variance (MV) model for the portfolio optimization problem (QAOAz-MV), which shows performance advantages over classical algorithms on this huge search space. For the more complex and comprehensive risk parity (RP) model, a novel QAOAz solution (QAOAz-RP) is proposed. We begin by defining the RP model for the portfolio optimization problem. Next, we detail the QAOAz algorithm process, where the problem Hamiltonian with the ZZZZ term is derived, the corresponding quantum circuit is ingeniously constructed using the parity check method, and the whole quantum circuit containing the ring XY-mixer is given. Finally, to improve the optimization performance of QAOAz, a Particle Swarm Optimization (PSO) optimizer is introduced to tune the parameters of the quantum circuits, which is applicable to both QAOAz-MV and QAOAz-RP. The experiment conducted on multiple financial markets (e.g. Chinese, U.S., and European) demonstrate that PSO-QAOAz-RP is significantly better for portfolio optimization than ABC-LP, GWO, GA and QAOAz-RP on eight portfolios in all metrics. PSO-QAOAz-MV also has advantage for MV model over the quantum algorithms, including QAOA (improves approximate ratio by 54.79% on average) and QAOAz (improves approximate ratio by 15.38% on average). This study not only provides a breakthrough quantum solution for portfolio optimization, but also provides a reusable technology paradigm for the deep integration of quantum computing and financial engineering. • It is the first QAOAz solution for the RP model of portfolio optimization problem. • The problem Hamiltonian and quantum circuit are derived and ingeniously constructed. • A PSO optimizer is proposed to optimize the parameters of QAOAz’s quantum circuit. • Our QAOAz-RP and PSO-QAOAz-RP outperform state-of-the-art classical algorithms. • Our PSO optimizer is effective on both MV and RP models.