Skip to main content

Reverse quantum annealing approach to portfolio optimization problems


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 2000QTM. 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.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3


  1. 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.

  2. 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).

  3. 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 Jij/2 to preserve the classical value of the objective function.

  4. Many options are possible, since the duration of the three phases can be chosen arbitrarily within limited but wide ranges.

  5. 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 ai coefficients have not been coarse-grained in buckets.

  6. 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 si (i.e., the Nc spins ferromagnetically coupled during embedding—see Eq. (5) and Ref. King and McGeoch 2014).

  7. For the largest problems studied, according to Hamerly et al. (2018), there might be an advantage in varying τ, but this is usually a small prefactor. See also Appendix 3 for results on a limited set of instances.

  8. 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.

  9. Programming time, post-programming thermalization time, readout time; respectively 7.575 ms, 1 ms, 124.98 μs for the current experiments.

  10. 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).


  • 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

    Google Scholar 

  • 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

    Article  Google Scholar 

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

    Article  MathSciNet  Google Scholar 

  • 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

    Article  Google Scholar 

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

    Book  Google Scholar 

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

    Article  Google Scholar 

  • 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

    Google Scholar 

  • 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

    Article  MathSciNet  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  MathSciNet  Google Scholar 

  • 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

    Google Scholar 

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

    Article  Google Scholar 

  • 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

    Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • Ohkuwa M, Nishimori H, Lidar D (2018) Reverse annealing for the fully connected p-spin model. Phys Rev A 98:022314

    Article  Google Scholar 

  • Ottaviani 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

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

    Article  Google Scholar 

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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

Download references


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 2000QTM, 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

Correspondence to Davide Venturelli.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.


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.


Appendix 1. Geometric Brownian motion

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

$$ dS(t) = \mu S(t) dt + \sigma S(t) dB(t) , $$

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:

$$ S(t) = S(0) \exp \left( \left( \mu - \frac{1}{2}\sigma^2 \right)t + \sigma B(t)\right) . $$

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:

$$ S(t_{n}) = S(t_{n-1}) \exp \left( \left( \mu - \frac{1}{2}\sigma^2 \right){\Delta} t + \sigma z_{n} \sqrt{{\Delta} t} \right) , $$

where tn = tn− 1 + Δt and zn 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.

Fig. 4
figure 4

Chimera Chip of DW2000Q. Each gray dot represents an active qubit (missing dots are broken qubits), the black shaded square is representative of one unit cell. The embedding for an instance (N = 42) is highlighted: blue bonds are ferromagnetic couplings set to JF, while red and pink bonds represent logical couplings (Jij in Eq. (6))

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.

Fig. 5
figure 5

Time-to-solution (99% confidence level) for different trun (median over 10 instances)

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 JF and sp and the best TTS is selected, instance by instance.

Fig. 6
figure 6

Time-to-solution (99% confidence level) as a function of annealing parameter sp. Results for a single instance, N = 42, τ = 1 µs. Circles point out to the best found (JF, sp) for these three illustrative cases

Rights and permissions

Reprints and Permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Venturelli, D., Kondratyev, A. Reverse quantum annealing approach to portfolio optimization problems. Quantum Mach. Intell. 1, 17–30 (2019).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: