Eneko Osaba, Guillaume Gelabert, Esther Villar-Rodriguez,
Antón Asla and Izaskun Oregi
11institutetext: TECNALIA, Basque Research and Technology Alliance (BRTA), 48160 Derio, Spain.
11email: eneko.osaba@tecnalia.com,
22institutetext: Serikat - Consultoría y Servicios Tecnológicos, 48009 Bilbao, Spain.
33institutetext: Corresponding Author
A Quantum Computing-based System for Portfolio Optimization using Future Asset Values and Automatic Reduction of the Investment Universe
Abstract
One of the problems in quantitative finance that has received the most attention is the portfolio optimization problem. Regarding its solving, this problem has been approached using different techniques, with those related to quantum computing being especially prolific in recent years. In this study, we present a system called Quantum Computing-based System for Portfolio Optimization with Future Asset Values and Automatic Universe Reduction (Q4FuturePOP), which deals with the Portfolio Optimization Problem considering the following innovations: i) the developed tool is modeled for working with future prediction of assets, instead of historical values; and ii) Q4FuturePOP includes an automatic universe reduction module, which is conceived to intelligently reduce the complexity of the problem. We also introduce a brief discussion about the preliminary performance of the different modules that compose the prototypical version of Q4FuturePOP.
keywords:
Quantum Computing, Portfolio Optimization Problem, Quantum Annealer, D-Wave, Optimization1 Introduction
The present work aims to describe a quantum computing (QC, [1]) based system for solving the portfolio optimization problem (POP, [2]). Briefly explained, the POP intends to find the optimum asset allocation with the objective of i) maximizing the expected return and ii) minimizing the financial risk. More specifically, and following the Markowitz POP formulation, the financial risk is calculated based on the diversification of the built portfolio [3]. Following this philosophy, the system tends to distribute the whole budget into different and uncorrelated assets rather than investing large amounts of money into the highest expected, albeit correlated, returns.
Formally described, the problem to be solved counts with i) a group of assets ; ii) a dataset , in which is a list of historical values of an asset , representing a specific day within the complete period of days, and iii) a total budget.
Thus, the objective is to find the most promising assets in which to invest this budget, considering that i) all must be invested and ii) the proportion of that can be allocated to each asset is conditioned by the variable . More concretely, and considering as the proportion of invested on the asset , this can be represented as the summation of any proportions in , Furthermore, it should be deemed that . With this notation in mind, the goal is to find the that maximizes the total expected return while minimizing the financial risk.
The system described in this paper, coined Quantum Computing-based System for Portfolio Optimization with Future Asset values and automatic universe reduction (Q4FuturePOP), is a QC-based scheme for dealing with the considering the following innovations:
-
•
Future projected values: most of the QC based techniques proposed in the literature solve the using as input historical dataset values for [4]. In other words, developed solvers select the appropriate considering the past values of the group of available assets. On the contrary, for Q4FuturePOP, the input dataset is composed of future predictions to try to account for realistic environments in the formulation. Using this input, Q4FuturePOP builds the complete dataset used for formulating the problem considering future projected values of . Thus, the chosen by the system is based on future predictions instead of historical values.
-
•
Automatic universe reduction: in order to calculate in a more efficient way, a search space reduction mechanism has been implemented in Q4FuturePOP. This mechanism works as follows: first, Q4FuturePOP takes as input the complete universe of . With this set of assets, the system conducts a number of preliminary executions which are used by Q4FuturePOP for detecting a subgroup of promising assets. After these preliminary executions, Q4FuturePOP builds an alternative , which is a subgroup of (). Using this newly generated , the problem is finally executed, and the obtained outcomes are returned to the user. Thanks to this procedure, the complexity of the problem to solve is automatically decreased, allowing the system to reach a higher level of accuracy.
The rest of the paper is structured as follows. Section 2 presents a brief overview of the background related to QC and POP. In Section 3, the inputs and outputs of Q4FuturePOP are described for the sake of understandability. After that, in Section 4, the whole system is described. Then, in Section 5, we discuss the preliminary performance of Q4FuturePOP. Section 6 finishes this work by outlining some of the planned future work.
2 Related Work
The first POP-focused paper including real quantum experiments was published in 2015, in which the authors solved the problem using a prototype of the D-Wave’s quantum annealer [5]. With only 512 qubits at their disposal, the authors worked with a pool of 15 assets in which to invest. A second study focused on this topic was presented in 2017, exploring a specific investment case related to the Abu Dhabi Securities Exchange [6]. In the following years, some interesting theoretical papers appeared, exploring different formulations and their possible resolutions using quantum approaches. Examples of this scientific trend can be found in [7] and [8]. These papers, published in 2018 and 2019, respectively, theorize the implementation of two algorithms without actually testing them on real quantum devices.
Also in 2019, some advanced approaches were presented. In [9], for example, the authors employ a hybrid algorithm in which the quantum module is executed by the D-Wave 2000Q computer in order to improve the solutions found by a classical greedy algorithm. In the same year, the first paper focused on gate-based quantum computers was published, in which the authors present a Quantum Approximate Optimization Algorithm [10].
Particularly interesting are the papers [11] and [12], published by Chicago Quantum in 2020. In the first of these papers, the authors demonstrated how a hybrid solver can promisingly solve portfolios of up to 33 assets. In [12] a similar approach is proposed, in which the number of assets considered rises to 60 using another hybrid technique. Finally, in [13], the same authors managed to solve problems with a size of 134 assets, making use of the D-Wave Advantage System, composed of 5436 qubits.
Since 2021, the study of the POP through the quantum paradigm has experienced a significant increase. In [14], for example, a variant of the problem known as minimum holding time is solved by the D-Wave quantum annealer, considering a universe of 50 assets in which to invest. In [15], the authors present a problem in which different investment bands are deemed, allowing the fixing of a maximum permissible risk. Furthermore, a quantum-gate-based method was presented in [16], where a hybrid algorithm called NISQ-HHL is proposed.
The study presented in [17] is especially interesting for this paper. That work consists of a detailed analysis of the parameterization of the D-Wave’s annealer. To do so, the authors use POP as a benchmarking problem, presenting a formulation of the problem that allows an investment granularity adapted to the user’s needs. This study has proved to be interesting from a mathematical point of view since the formulation employed in this study is the one embraced in our work. Finally, it is worth highlighting the study presented in [18], where different quantum solvers are proposed based on both the quantum gate paradigm and the annealer. The authors of that work carried out different tests in a dynamic environment, solving problems with up to 52 assets.
As can be seen, the research conducted in recent years has been prolific. This section has attempted to briefly outline this vibrant activity. Being aware that the full state of the art is much broader, we refer interested readers to works as [19].
3 Inputs and Outputs of Q4FuturePOP
Now, let’s define some notation and terms in order to properly understand how Q4FuturePOP operates. From now on, we use the superscripts h for the historical data and f for the predicted future data. Furthermore, the daily return of an asset at day is , resulting in representing the daily returns of in .
Thus, Q4FuturePOP receives as inputs i) , which contains all the historical values of assets during days, ii) a list , in which is the initial value of at the time Q4FuturePOP is executed (in most cases, ); and iii) , which is the list of predicted expected returns. It should be highlighted that these values are given by an expert from the Spanish company Welzia Management111https://wz.welzia.com/.
Once the input is received, the module named Predicted Dataset Generation (PDG) builds the complete dataset , which is composed of all the projected future daily values of the whole in the period that goes from the moment in which the system is executed and the following days. All values in the generated must meet two requirements: i) , meaning that the covariance of the input daily returns is the same as that of the daily returns generated by PDG; and ii) the expected return of the prices build must be the same as . How is generated is described in Section 4.1.
As output, Q4FuturePOP returns i) the above-mentioned , containing the list of investment weights given to each ; ii) the expected return of the chosen portfolio ; iii) the risk associated with this portfolio ; and iv) the value. It should be considered that for the computation of outcomes ii, iii and iv, the Markowitz formulation of the has been used as a base.
4 Q4FuturePOP: Quantum Computing based System for Portfolio Optimization with Future Asset values and automatic universe reduction
Q4FuturePOP consists of three interconnected modules: PDG, Assets Universe Reduction Module (AUR) and the Quantum Computing Solver Module (QCS). A schematic description of Q4FuturePOP is depicted in Figure 1, in which the relationship of the three modules is represented.
In a nutshell, PDG is devoted to generating the complete dataset of future predicted values of . The second module, AUR, is in charge of intelligently reducing the complete into , while QCS is the module that solves the and provides both for AUR or for the final user (as seen in Figure 1). In the following subsections, we describe PDG, AUR and QCS in detail.
![]() |
4.1 Predicted Dataset Generation Module - PDG
To simulate future prices and eventually build , the PDG starts by generating a matrix composed of random values drawn from a standard normal distribution, finding a matrix and a bias such that . For finding both and , PDG follows two different procedures:
-
•
Finding . The Cholesky decomposition of the covariance matrix and stands that there exist, respectively, two unique lower triangular matrix and such that and . Considering that is an invertible matrix, which is highly probable since the random vectors that make up are independent by construction, we set . Thanks to this procedure, we meet our first constraint, as .
-
•
Finding . Let us consider and express the expected return as a function of the daily return. For an asset we have if and only if . Then, we use the Taylor-Young expansion of to find an approximation of as a polynomial . If then . Now, we take as a real root of the polynomial that respects the preceding constraint. If this root does not exist, the PDG cannot find a good solution. So, the PDG repeats this for all the assets in order to obtain .
After these values are calculated following this procedure, is reconstructed from the initial values to the predicted .
4.2 Quantum Computing Solver Module - QCS
Despite being the last module called along the workflow of Q4FuturePOP, it is appropriate to describe QCS here since it is employed also as part of the calculation made within AUR. In a nutshell, the QCS is the module in charge of taking a complete dataset of assets containing their daily values and solving the . We represent in Figure 2 a schematic description of QCS. As can be observed in that figure, this module is composed of three different components:
![]() |
QUBO Builder: the dealt by Q4FuturePOP is tackled by a QC device. More specifically, the system is built to solve the problem by means of a quantum annealer. This specific type of device natively solves QUBO problems. For this reason, the first component of QCS has the objective of gathering the input dataset and modeling the problem correctly. More specifically, for building the corresponding QUBO, we define the following Hamiltonian based on the formulation described in [17]:
(1) |
where
(2) |
(3) |
(4) |
considering that represents the expected return for an asset , and is a binary variable that is 1 if the asset has a . Furthermore, the values , and are float multipliers employed to weight each term.
Quantum annealing solver: this is the central component of QCS, and where the call to the quantum device is made. As depicted in Figure 2, QCS receives as input the problem modeled as a QUBO. This problem is tackled by a quantum annealer device, such as the ones provided by D-Wave: Advantadge_System6.1 or Advantadge2_prototype1.1. Quantum-inspired alternatives, such as the Fujitsu Digital Annealer, are also eligible for being part of QCS as QUBO solver. Also, hybrid approaches such as Leap’s hybrid Binary Quadratic Model Solver of D-Wave can be embraced in this module. This component returns a list of binary values, which represents the solution to the QUBO ingested by the QC device.
Results Interpreter: the solution provided by the quantum device is not directly interpretable for the final user. For this reason, this last component oversees the obtaining of the string of binary values provided by the quantum annealer and calculates the variables that will be returned as outcomes.
Thus, the QCS module is called in two different phases in the complete workflow of Q4FuturePOP. On the one hand, the QCS is called by AUR module in the process of asset universe reduction. In this iterative procedure, the QCS is executed different times, using as input the complete dataset . Through these repetitive runs, AUR aims to detect the most interesting assets for conducting a search space reduction of the (more details in Section 4.3). On the other hand, the QCS is called in the last stage of the complete Q4FuturePOP execution, using as input the reduced , and with the goal of obtaining the final , , and (calculated as /).
4.3 Assets Universe Reduction Module - AUR
The motivation behind the implementation of the AUR module is to face the limitations of current quantum annealers. Despite all the research and developments made in the field, current quantum computers suffer from limitations such as a finite number of qubits or noisy processes that impact the performance of quantum solvers [20]. For this reason, the actual stage of QC field is known as NISQ era [21].
Under this rationale, the main objective of AUR module is to decrease the complexity of the problem at hand by building a reduced sub-instance of the problem. Thus, with a smaller solution space, the system is able to reach higher-quality and more robust solutions. The AUR works as follows:
-
1.
The AUR receives as input the complete set of data generated by the previously described PDG module.
-
2.
AUR solves the problem using the QCS module (detailed in Section 4.2) and as input. Despite QCS provides more information, it just stores the identifiers of the assets to which any proportion of has been allocated. Thus, AUR generates a list which is a subgroup of ().
-
3.
Until the number of execution conducted by AUR is less than , step 2 is repeated.
-
4.
Once the process is finished, AUR builds a reduction of considering the information of all the assets in , and discarding all the data related to assets that have not been deemed in any of the executions conducted by step 2.
Lastly, for helping the understanding of AUR module, we depict a schematic description of AUR in Figure 3, representing also the relation with QCS module.
![]() |
5 Discussion on the preliminary performance
At this moment, Q4FuturePOP is in a prototypical stage of development, waiting to be completely validated as a whole system. Anyway, each module has been checked separately. On the one hand, the PDG has been successfully tested using a pool of predicted values provided by Welzia Management. In any case, due to extension constraints and the fact that this paper is more focused on QC, we will deepen the validation of the PDG module in a future research paper.
On the other hand, AUR and QCS modules have been jointly checked using a dataset also provided by Welzia Management. This dataset contains the daily values of 53 different assets over 12 years (from 01/01/2010 to 13/12/2022). Welzia Management also provided us with a set of historical portfolios chosen by the company’s experts. Thus, using the dataset as input and the historical portfolios as baseline, six different use cases have been built for validation. Each of these instances consists of an excerpt of the complete dataset, with a depth ranging from 12 to 28 months. Therefore, for each use case, AUR+QCS modules of Q4FuturePOP have been run 6 independent times, and the results provided have been compared with the portfolios built by the experts. Also, it should be noted here that the quantum solver used for the conducted tests is the Advantadge_System6.2 of D-Wave, comprised of 5610 qubits and 40134 couplers spread over a Pegasus topology.
The results of this preliminary experimentation are depicted in Table 1, in which we represent the time frame that compose each dataset, the number of available assets, and the outcomes provided by both the experts and AUR+QCS. Each instance is coined as UCX_Y_Z, where is the ID of the dataset, the time frame measured in months, and the amount of assets deemed. Finally, it should be noted that both the employed datasets as well as the complete set of results obtained by AUR+QCS are available upon reasonable request.
Analyzing the results obtained by AUR+QCS modules, it should be noted that they have proved to be promising. These results have been approved by the experts from Welzia Management after several technical meetings. These meetings, and the fact of having the help of these experts, have been a really enriching point in the development of Q4FuturePOP. This is so since quantum-based solutions are usually analyzed from a purely academic point of view. That is, the solutions provided by the systems are usually analyzed based solely on their ratio. Although this ratio is a good indication of the quality of a solution, it does not represent the reality of the industry. High ratios can lead to triumphalist conclusions, which eventually clash with the reality of an industry with volatility that is difficult to perceive by a computer (whether quantum or classical). This is why an expert’s judgment when generating a portfolio is an absolutely necessary factor.
Instance | Time Frame | Assets | Expert Results | AUR+QCS Results | ||
UC1_12_45 | 31/01/2018 - 31/01/2019 | 45 | 22.56% | 2.95 | 25.89% | 5.85 |
UC2_12_43 | 05/05/2017 - 05/05/2018 | 43 | 12.95% | 3.76 | 19,30% | 5.51 |
UC3_24_38 | 01/01/2018 - 01/01/2020 | 35 | 14.05% | 4.08 | 17,63% | 6.01 |
UC4_28_38 | 24/01/2017 - 24/05/2019 | 38 | 11.64% | 8.99 | 8.62% | 5.96 |
UC5_15_40 | 01/05/2018 - 01/08/2019 | 40 | 15.06% | 6.53 | 14.50% | 4.12 |
UC6_20_53 | 09/04/2021 - 09/12/2022 | 53 | 2.81% | 12,31 | 6.37% | 11.62 |
All in all, the solutions achieved by the proposed system have proven to be promising, offering better results than the experts in some cases. In any case, as has been described, the fact that they present ratios higher than the portfolios proposed by Welzia Management does not imply that in practice they are better than the latter. Even so, Welzia Management has valued very positively the results obtained by AUR+QCS, being aware of the value that a platform of these characteristics can have in its day to day operation, acting as an assistant in their decision making processes.
6 Conclusions and Future Work
In this paper, a quantum-based approach for solving the well-known Portfolio Optimization Problem has been presented, coined as Q4FuturePOP. Two are the main innovations inherent to the system proposed: i) Q4FuturePOP is modeled for working with future prediction of assets instead of historical values; and ii) Q4FuturePOP includes an automatic universe reduction module, which is conceived to intelligently reduce the complexity of the problem. Along with the description of the system, we have also introduced a brief discussion about the preliminary performance of the different modules that compose the prototypical version of the tool.
Several research lines stem directly from the findings reported in this work. The first, and most obvious, is the validation of the complete system. Other future work includes the fine-tuning of the parameters that involve the generation of the POP’s QUBO. Also, other quantum-based solvers apart from the ones provided by D-Wave are planned to be tested.
Acknowledgments
This work was supported by the Spanish CDTI through Proyectos I+D Cervera 2021 Program (QOptimiza project, 095359). This work was also supported by the Basque Government through ELKARTEK program (BRTA-QUANTUM project, KK-2022/00041). The authors thank Miguel Uceda, Welzia’s Invesment Director, for his assistance and for providing the data employed for the tests conducted.
References
- [1] L. Gyongyosi and S. Imre, “A survey on quantum computing technology,” Computer Science Review, vol. 31, pp. 51–71, 2019.
- [2] A. Thakkar and K. Chaudhari, “A comprehensive survey on portfolio optimization, stock price and trend prediction using particle swarm optimization,” Archives of Computational Methods in Engineering, vol. 28, pp. 2133–2164, 2021.
- [3] F. Becker, M. Gürtler, and M. Hibbeln, “Markowitz versus michaud: Portfolio optimization strategies reconsidered,” The European Journal of Finance, vol. 21, no. 4, pp. 269–291, 2015.
- [4] D. Herman, C. Googin, X. Liu, A. Galda, I. Safro, Y. Sun, M. Pistoia, and Y. Alexeev, “A survey of quantum computing for finance,” arXiv preprint arXiv:2201.02773, 2022.
- [5] G. Rosenberg, P. Haghnegahdar, P. Goddard, P. Carr, K. Wu, and M. L. De Prado, “Solving the optimal trading trajectory problem using a quantum annealer,” in Proceedings of the 8th Workshop on High Performance Computational Finance, 2015, pp. 1–7.
- [6] N. Elsokkary, F. Khan, D. La Torre, T. Humble, and J. Gottlieb, “Financial portfolio management using adiabatic quantum optimization: the case of abu dhabi securities exchange,” in 2017 IEEE High Performance Extreme Computing Conference (HPEC), 2017, pp. 1–4.
- [7] P. Rebentrost and S. Lloyd, “Quantum computational finance: quantum algorithm for portfolio optimization,” arXiv preprint arXiv:1811.03975, 2018.
- [8] I. Kerenidis, A. Prakash, and D. Szilágyi, “Quantum algorithms for portfolio optimization,” in Proceedings of the 1st ACM Conference on Advances in Financial Technologies, 2019, pp. 147–155.
- [9] D. Venturelli and A. Kondratyev, “Reverse quantum annealing approach to portfolio optimization problems,” Quantum Machine Intelligence, vol. 1, no. 1-2, pp. 17–30, 2019.
- [10] M. Hodson, B. Ruck, H. Ong, D. Garvin, and S. Dulman, “Portfolio rebalancing experiments using the quantum alternating operator ansatz,” arXiv preprint arXiv:1911.05296, 2019.
- [11] J. Cohen, A. Khan, and C. Alexander, “Portfolio optimization of 40 stocks using the dwave quantum annealer,” arXiv preprint arXiv:2007.01430, 2020.
- [12] ——, “Portfolio optimization of 60 stocks using classical and quantum algorithms,” arXiv preprint arXiv:2008.08669, 2020.
- [13] J. Cohen and C. Alexander, “Picking efficient portfolios from 3,171 us common stocks with new quantum and classical solvers,” arXiv preprint arXiv:2011.01308, 2020.
- [14] S. Mugel, M. Abad, M. Bermejo, J. Sánchez, E. Lizaso, and R. Orús, “Hybrid quantum investment optimization with minimal holding period,” Scientific Reports, vol. 11, no. 1, p. 19587, 2021.
- [15] S. Palmer, S. Sahin, R. Hernandez, S. Mugel, and R. Orus, “Quantum portfolio optimization with investment bands and target volatility,” arXiv preprint arXiv:2106.06735, 2021.
- [16] R. Yalovetzky, P. Minssen, D. Herman, and M. Pistoia, “Nisq-hhl: Portfolio optimization for near-term quantum hardware,” arXiv preprint arXiv:2110.15958, 2021.
- [17] E. Grant, T. S. Humble, and B. Stump, “Benchmarking quantum annealing controls with portfolio optimization,” Physical Review Applied, vol. 15, no. 1, p. 014012, 2021.
- [18] S. Mugel, C. Kuchkovsky, E. Sanchez, S. Fernandez-Lorenzo, J. Luis-Hita, E. Lizaso, and R. Orus, “Dynamic portfolio optimization with real datasets using quantum processors and quantum-inspired tensor networks,” Physical Review Research, vol. 4, no. 1, p. 013006, 2022.
- [19] D. Herman, C. Googin, X. Liu, Y. Sun, A. Galda, I. Safro, M. Pistoia, and Y. Alexeev, “Quantum computing for finance,” Nature Reviews Physics, pp. 1–16, 2023.
- [20] A. Ajagekar, T. Humble, and F. You, “Quantum computing based hybrid solution strategies for large-scale discrete-continuous optimization problems,” Computers & Chemical Engineering, vol. 132, p. 106630, 2020.
- [21] J. Preskill, “Quantum Computing in the NISQ era and beyond,” Quantum, vol. 2, p. 79, Aug. 2018.