## Abstract

We investigate a hybrid quantum-classical solution method to the mean-variance portfolio optimization problems. Starting from real financial data statistics and following the principles of the Modern Portfolio Theory, we generate parametrized samples of portfolio optimization problems that can be related to quadratic binary optimization forms programmable in the analog D-Wave Quantum Annealer 2000Q^{TM}. The instances are also solvable by an industry-established genetic algorithm approach, which we use as a classical benchmark. We investigate several options to run the quantum computation optimally, ultimately discovering that the best results in terms of expected time-to-solution as a function of number of variables for the hardest instances set are obtained by seeding the quantum annealer with a solution candidate found by a greedy local search and then performing a reverse annealing protocol. The optimized reverse annealing protocol is found to be more than 100 times faster than the corresponding forward quantum annealing on average.

### Similar content being viewed by others

## Notes

Collateralized Synthetic Obligation (CSO) is a type of Collateralized Debt Obligation (CDO) where credit exposure to the reference names is provided in synthetic form via single name Credit Default Swaps (CDS). A typical CSO references between 100 and 125 equally weighted names.

Note that the graph is not ideal, there is a set of 17 qubits that have not been calibrated successfully and are unoperable (see Fig. 4 in Appendix 2).

In the actual embedding employed, it might happen that some pairs of logical variables

*i*,*j*could have two pairs that can be coupled, instead of one. In that case, we activate both couplings at a strength*J*_{ij}/2 to preserve the classical value of the objective function.Many options are possible, since the duration of the three phases can be chosen arbitrarily within limited but wide ranges.

We note that optimal portfolios constructed through minimization of objective function (2) and the number of asset constraints with QUBO coefficients given by Table 1 have typically better Sharpe ratios than alternative portfolios constructed from the individually best assets where the

*a*_{i}coefficients have not been coarse-grained in buckets.This algorithm is inspired by the routine provided by D-Wave Systems to decode the binary value of a set of qubit measurements that are originally associated to a single logical variable

*s*_{i}(i.e., the*N*_{c}spins ferromagnetically coupled during embedding—see Eq. (5) and Ref. King and McGeoch 2014).We believe that the non-monotonic behavior for

*N*= 54 is not of fundamental significance but it is due to the finite small size of our instance set for reverse annealing.Programming time, post-programming thermalization time, readout time; respectively 7.575 ms, 1 ms, 124.98 μs for the current experiments.

The reported median TTS on these runs seems to be in general faster than the results in the main paper. This could be due to finite statistics effect or to general drift in performance of the machine over time, since the runs relative to Fig. 5 were performed more than a month earlier when the machine was under low utilization. The effective temperature of the machine can vary of few milliKelvins over time for uncontrollable factors, and this is known to affect the performance of quantum annealing (Boixo et al. 2016).

## References

Adame J, McMahon PL (2018) Inhomogeneous driving in quantum annealers can result in orders-of-magnitude improvements in performance. arXiv:1301.1880

Albash T, Lidar D (2018) Demonstration of a scaling advantage for a quantum annealer over simulated annealing. Phys Rev X 8(3):031016

Boixo S, Smelyanskiy VN, Shabani A, Isakov S, Dykman M, Denchev VS, Amin MH, Smirnov AY, Mohseni M, Hv Neven (2016) Computational multiqubit tunnelling in programmable quantum annealers. Nat Commun 7:10327

Boothby T, King AD, Roy A (2016) Fast clique minor generation in chimera qubit connectivity graphs. Quantum Inf Process 15(1):495–508

Brandao FGSL, Svore KM (2017) Quantum speed-ups for solving semidefinite programs. In: 2017 IEEE 58th annual symposium on foundations of computer science (FOCS). IEEE

Chancellor N (2017) Modernizing quantum annealing using local searches. New J Phys 19(2):023024

Cornuejols G, Tütüncü R (2006) Optimization methods in finance. Cambridge University Press, Cambridge

Darolles S, Gourieroux C (2010) Conditionally fitted sharpe performance with an application to hedge fund rating. J Bank Financ 34(3):578–593

Denchev VS, Boixo S, Isakov SV, Ding N, Babbush R, Smelyanskiy V, Martinis J, Neven H (2016) What is the computational value of finite-range tunneling Phys Rev X 6(3):031015

Fernando KV (2000) Practical portfolio optimization. The Numerical Algorithms Group, Ltd White Paper

Hadfield S, Wang Z, O’Gorman B, Rieffel EG, Venturelli D, Biswas R (2019) From the quantum approximate optimization algorithm to a quantum alternating operator ansatz. Algorithms 12(2):34

Hamerly R, Inagaki T, McMahon PL, Venturelli D, Marandi A, Onodera T, Ng E, Langrock C, Inaba K, Honjo T et al (2018) Experimental investigation of performance differences between coherent ising machines and a quantum annealer. arXiv:1805.05217

Hull JC, Basu S (2016) Options, futures, and other derivatives. Pearson Education India

Job J, Lidar D (2018) Test-driving 1000 qubits. Quantum Sci Technol 3(3):030501

Johnson MW, Amin MHS, Gildert S, Lanting T, Hamze F, Dickson N, Harris R, Berkley AJ, Johansson J, Bunyk P et al (2011) Quantum annealing with manufactured spins. Nature 473(7346):194

Johnson MC, Giesecke R, McMahon K, Su PV (2016) Quantum-annealing computer method for financial portfolio optimization. US20170372427A1 QC-Ware Corp. Patent application

Karimi H, Rosenberg G (2017) Boosting quantum annealer performance via sample persistence. Quantum Inf Process 16(7):166

Kechedzhi K, Smelyanskiy V, McClean JR, Denchev VS, Mohseni M, Isakov S, Boixo S, Altshuler B, Neven H (2018) Efficient population transfer via non-ergodic extended states in quantum spin glass. arXiv:1807.04792

Kellerer H, Mansini R, Speranza MG (2000) Selecting portfolios with fixed costs and minimum transaction lots. Ann Oper Res 99(1–4):287–304

King AD, McGeoch CC (2014) Algorithm engineering for a quantum annealing platform. arXiv:1410.2628

King J, Yarkoni S, Nevisi MM, Hilton JP, McGeoch CC (2015) Benchmarking a quantum annealing processor with the time-to-target metric. arXiv:1508.05087

Kondratyev A, Giorgidze G (2017) Evolutionary algos for mva optimisation. Risk 30(12):136–141

Kshatriya S, Prasanna PK (2018) Genetic algorithm-based portfolio optimization with higher moments in global stock markets. Risk 20(4):1–26

Lin D, Li X, Li M (2005) A genetic algorithm for solving portfolio optimization problems with transaction costs and minimum transaction lots. In: International Conference on Natural Computation. Springer, pp 808–811

Mandra S, Katzgraber HG (2018) A deceptive step towards quantum speedup detection. Quantum Science and Technology

Markowitz H (1952) Portfolio selection. J Financ 7(1):77–91

Marshall J, Venturelli D, Hen I, Rieffel EG (2018) The power of pausing: advancing understanding of thermalization in experimental quantum annealers. arXiv:1810.05881

Marzec M (2016) Portfolio optimization: applications in quantum computing. In: Handbook of high-frequency trading and modeling in Finance. Wiley, pp 73–106

Mott A, Job J, Vlimant J-R, Lidar D, Spiropulu M (2017) Solving a higgs optimization problem with quantum annealing for machine learning. Nature 550(7676):375

Oh KJ, Kim TY, Min S (2005) Using genetic algorithm to support portfolio optimization for index fund management. Expert Syst Appl 28(2):371–379

Ohkuwa M, Nishimori H, Lidar D (2018) Reverse annealing for the fully connected

*p*-spin model. Phys Rev A 98:022314Ottaviani D, Amendola A (2018) Low rank non-negative matrix factorization with d-wave 2000q. arXiv:1808.08721

Perdomo-Ortiz A, Fluegemann J, Biswas R, Smelyanskiy VN (2015) A performance estimator for quantum annealers: gauge selection and parameter setting. arXiv:1503.01083

Rebentrost P, Lloyd S (2018) Quantum computational finance: quantum algorithm for portfolio optimization. arXiv:1811.03975

Rønnow TF, Wang Z, Job J, Boixo S, Isakov S, Wecker D, Martinis J, Lidar D, Troyer M (2014) Defining and detecting quantum speedup. Science 345(6195):420–424

Rosenberg G, Haghnegahdar P, Goddard P, Carr P, Wu K, López De Prado M (2016) Solving the optimal trading trajectory problem using a quantum annealer. IEEE J Sel Top Sign Proces 10(6):1053–1060

Sharpe WF (1966) Mutual fund performance. J Bus 39(1):119–138

Sortino FA, Van Der Meer R (1991) Downside risk. J Portf Manag 17(4):27–31

Stollenwerk T, O’Gorman B, Venturelli D, Mandrà S, Rodionova O, Ng H, Sridhar B, Rieffel EG, Biswas R (2019) Quantum annealing applied to de-conflicting optimal trajectories for air traffic management. In: IEEE transactions on intelligent transportation systems

Tran TT, Do M, Rieffel EG, Frank J, Wang Z, O’Gorman B, Venturelli D, Beck JC (2016) A hybrid quantum-classical approach to solving scheduling problems. In: Ninth annual symposium on combinatorial search

Venturelli D, Mandra S, Knysh S, OǴorman B, Biswas R, Smelyanskiy V (2015a) Quantum optimization of fully connected spin glasses. Phys Rev X 5(3):031040

Venturelli D, Marchand DJJ, Rojo G (2015b) Quantum annealing implementation of job-shop scheduling. arXiv:1506.08479

Vinci W, Albash T, Lidar DA (2016) Nested quantum annealing correction. NPJ Quantum Inf 2:16017

## Acknowledgements

The collaboration between USRA and Standard Chartered Bank has been supported by the USRA Cycle 3 Program that allowed the use of the D-Wave Quantum Annealer 2000Q^{TM}, and by funding provided by NSF award no. 1648832 obtained in collaboration with QC-Ware. We acknowledge QC-Ware and specifically thank Eric Berger, for facilitating the collaboration and contributing to the runs on the D-Wave machine. D.V. acknowledges general support from NASA Ames Research Center and useful discussions with QuAIL research team. A.K. would like to thank David Bell and USRA for the opportunity to conduct research on the quantum annealer at QuAIL.

## Author information

### Authors and Affiliations

### Corresponding author

## Ethics declarations

###
**Conflict of interest**

The authors declare that they have no conflict of interest.

### Disclaimer

The authors alone are responsible for the content and writing of the paper. The opinions expressed are those of the authors and do not necessarily reflect the views and policies of Standard Chartered Bank or the Universities Space Research Association. All figures are based on own calculations.

This paper is for information and discussion purposes only and does not constitute either an offer to sell or the solicitation of the offer to buy any security or any financial instrument or enter into any transaction or recommendation to acquire or dispose of any investment.

## Additional information

### Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Appendices

### Appendix 1. Geometric Brownian motion

A geometric Brownian motion (GBM) is a stochastic process *S*(*t*) that satisfies the following stochastic differential equation (SDE):

where *t* is continuous time and *B*(*t*) is a Brownian motion. GBM is widely used to model asset prices. If a unit of time is 1 year, then *σ* is interpreted as an annualized volatility (standard deviation) of asset’s log-returns, which are assumed to be normally distributed. The drift coefficient *μ* controls deterministic component of the asset price process.

Integrating the process, we obtain:

Although GBM SDE can be used directly to simulate an asset process, it is better to use its solution to ensure that simulated asset prices do not turn negative—this may be the case for large enough time step. In our portfolio optimization example Δ*t* = 1 month and we use the following discretization scheme for a single asset price process:

where *t*_{n} = *t*_{n− 1} + Δ*t* and *z*_{n} is a standard normal random variable. Asset prices from the *N*-asset portfolio are jointly simulated using the same scheme but correlated standard normal random variables (*z*^{(1)},…,*z*^{(N)}) are constructed via Cholesky decomposition of the correlation matrix *ρ*.

### Appendix 2. Chimera graph of DW2000Q and embedding

In Fig. 4, we show the layout of the chip used for the experiments, belonging to the machine D-Wave 2000Q hosted at NASA Ames Research Center.

### Appendix 3. More details on parameter setting for reverse annealing

Figure 5 displays median TTS results obtained for the mapping schemes provided by Table 1 and annealing times 1 µs and 10 µs, obtained for the first 10 instances of the benchmark ensamble on an independent set of runs with respect to the results presented in Fig. 3.^{Footnote 10} It is clear that the choice of *τ* = 1 µs is the most advantageous.

In Fig. 6, we show on an example how the optimal parameter setting is performed to generate data in Figs. 2 and 3. Scans are performed for different *J*_{F} and *s*_{p} and the best TTS is selected, instance by instance.

## Rights and permissions

## About this article

### Cite this article

Venturelli, D., Kondratyev, A. Reverse quantum annealing approach to portfolio optimization problems.
*Quantum Mach. Intell.* **1**, 17–30 (2019). https://doi.org/10.1007/s42484-019-00001-w

Received:

Accepted:

Published:

Issue Date:

DOI: https://doi.org/10.1007/s42484-019-00001-w