Best practices for portfolio optimization by quantum computing, experimented on real quantum devices
Abstract In finance, portfolio optimization aims at finding optimal investments maximizing a trade-off between return and risks, given some constraints. Classical formulations of this quadratic optimization problem have exact or heuristic solutions, but the complexity scales up as the market dimensi...
Main Authors: | , , , , |
---|---|
Format: | Article |
Language: | English |
Published: |
Nature Portfolio
2023-11-01
|
Series: | Scientific Reports |
Online Access: | https://doi.org/10.1038/s41598-023-45392-w |
_version_ | 1797630170180354048 |
---|---|
author | Giuseppe Buonaiuto Francesco Gargiulo Giuseppe De Pietro Massimo Esposito Marco Pota |
author_facet | Giuseppe Buonaiuto Francesco Gargiulo Giuseppe De Pietro Massimo Esposito Marco Pota |
author_sort | Giuseppe Buonaiuto |
collection | DOAJ |
description | Abstract In finance, portfolio optimization aims at finding optimal investments maximizing a trade-off between return and risks, given some constraints. Classical formulations of this quadratic optimization problem have exact or heuristic solutions, but the complexity scales up as the market dimension increases. Recently, researchers are evaluating the possibility of facing the complexity scaling issue by employing quantum computing. In this paper, the problem is solved using the Variational Quantum Eigensolver (VQE), which in principle is very efficient. The main outcome of this work consists of the definition of the best hyperparameters to set, in order to perform Portfolio Optimization by VQE on real quantum computers. In particular, a quite general formulation of the constrained quadratic problem is considered, which is translated into Quadratic Unconstrained Binary Optimization by the binary encoding of variables and by including constraints in the objective function. This is converted into a set of quantum operators (Ising Hamiltonian), whose minimum eigenvalue is found by VQE and corresponds to the optimal solution. In this work, different hyperparameters of the procedure are analyzed, including different ansatzes and optimization methods by means of experiments on both simulators and real quantum computers. Experiments show that there is a strong dependence of solutions quality on the sufficiently sized quantum computer and correct hyperparameters, and with the best choices, the quantum algorithm run on real quantum devices reaches solutions very close to the exact one, with a strong convergence rate towards the classical solution, even without error-mitigation techniques. Moreover, results obtained on different real quantum devices, for a small-sized example, show the relation between the quality of the solution and the dimension of the quantum processor. Evidences allow concluding which are the best ways to solve real Portfolio Optimization problems by VQE on quantum devices, and confirm the possibility to solve them with higher efficiency, with respect to existing methods, as soon as the size of quantum hardware will be sufficiently high. |
first_indexed | 2024-03-11T11:04:23Z |
format | Article |
id | doaj.art-7078d5a92a494c4988b710bbe3bae3d8 |
institution | Directory Open Access Journal |
issn | 2045-2322 |
language | English |
last_indexed | 2024-03-11T11:04:23Z |
publishDate | 2023-11-01 |
publisher | Nature Portfolio |
record_format | Article |
series | Scientific Reports |
spelling | doaj.art-7078d5a92a494c4988b710bbe3bae3d82023-11-12T12:18:15ZengNature PortfolioScientific Reports2045-23222023-11-0113111410.1038/s41598-023-45392-wBest practices for portfolio optimization by quantum computing, experimented on real quantum devicesGiuseppe Buonaiuto0Francesco Gargiulo1Giuseppe De Pietro2Massimo Esposito3Marco Pota4Institute for High Performance Computing and Networking (ICAR), National Research Council of Italy (CNR)Institute for High Performance Computing and Networking (ICAR), National Research Council of Italy (CNR)Institute for High Performance Computing and Networking (ICAR), National Research Council of Italy (CNR)Institute for High Performance Computing and Networking (ICAR), National Research Council of Italy (CNR)Institute for High Performance Computing and Networking (ICAR), National Research Council of Italy (CNR)Abstract In finance, portfolio optimization aims at finding optimal investments maximizing a trade-off between return and risks, given some constraints. Classical formulations of this quadratic optimization problem have exact or heuristic solutions, but the complexity scales up as the market dimension increases. Recently, researchers are evaluating the possibility of facing the complexity scaling issue by employing quantum computing. In this paper, the problem is solved using the Variational Quantum Eigensolver (VQE), which in principle is very efficient. The main outcome of this work consists of the definition of the best hyperparameters to set, in order to perform Portfolio Optimization by VQE on real quantum computers. In particular, a quite general formulation of the constrained quadratic problem is considered, which is translated into Quadratic Unconstrained Binary Optimization by the binary encoding of variables and by including constraints in the objective function. This is converted into a set of quantum operators (Ising Hamiltonian), whose minimum eigenvalue is found by VQE and corresponds to the optimal solution. In this work, different hyperparameters of the procedure are analyzed, including different ansatzes and optimization methods by means of experiments on both simulators and real quantum computers. Experiments show that there is a strong dependence of solutions quality on the sufficiently sized quantum computer and correct hyperparameters, and with the best choices, the quantum algorithm run on real quantum devices reaches solutions very close to the exact one, with a strong convergence rate towards the classical solution, even without error-mitigation techniques. Moreover, results obtained on different real quantum devices, for a small-sized example, show the relation between the quality of the solution and the dimension of the quantum processor. Evidences allow concluding which are the best ways to solve real Portfolio Optimization problems by VQE on quantum devices, and confirm the possibility to solve them with higher efficiency, with respect to existing methods, as soon as the size of quantum hardware will be sufficiently high.https://doi.org/10.1038/s41598-023-45392-w |
spellingShingle | Giuseppe Buonaiuto Francesco Gargiulo Giuseppe De Pietro Massimo Esposito Marco Pota Best practices for portfolio optimization by quantum computing, experimented on real quantum devices Scientific Reports |
title | Best practices for portfolio optimization by quantum computing, experimented on real quantum devices |
title_full | Best practices for portfolio optimization by quantum computing, experimented on real quantum devices |
title_fullStr | Best practices for portfolio optimization by quantum computing, experimented on real quantum devices |
title_full_unstemmed | Best practices for portfolio optimization by quantum computing, experimented on real quantum devices |
title_short | Best practices for portfolio optimization by quantum computing, experimented on real quantum devices |
title_sort | best practices for portfolio optimization by quantum computing experimented on real quantum devices |
url | https://doi.org/10.1038/s41598-023-45392-w |
work_keys_str_mv | AT giuseppebuonaiuto bestpracticesforportfoliooptimizationbyquantumcomputingexperimentedonrealquantumdevices AT francescogargiulo bestpracticesforportfoliooptimizationbyquantumcomputingexperimentedonrealquantumdevices AT giuseppedepietro bestpracticesforportfoliooptimizationbyquantumcomputingexperimentedonrealquantumdevices AT massimoesposito bestpracticesforportfoliooptimizationbyquantumcomputingexperimentedonrealquantumdevices AT marcopota bestpracticesforportfoliooptimizationbyquantumcomputingexperimentedonrealquantumdevices |