0% found this document useful (0 votes)
9 views12 pages

Articulo 2

This paper presents a study on dynamic portfolio optimization using quantum and quantum-inspired algorithms, implemented on various hardware platforms with real financial data. The authors compare the performance of classical solvers and quantum methods, including D-wave hybrid quantum annealing and tensor networks, in optimizing trading trajectories for an investment portfolio. The results indicate that D-wave hybrid and tensor networks can handle larger systems effectively, while the choice of the best algorithm depends on specific performance metrics.

Uploaded by

dragon2056789
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views12 pages

Articulo 2

This paper presents a study on dynamic portfolio optimization using quantum and quantum-inspired algorithms, implemented on various hardware platforms with real financial data. The authors compare the performance of classical solvers and quantum methods, including D-wave hybrid quantum annealing and tensor networks, in optimizing trading trajectories for an investment portfolio. The results indicate that D-wave hybrid and tensor networks can handle larger systems effectively, while the choice of the best algorithm depends on specific performance metrics.

Uploaded by

dragon2056789
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

PHYSICAL REVIEW RESEARCH 4, 013006 (2022)

Dynamic portfolio optimization with real datasets using quantum processors


and quantum-inspired tensor networks

Samuel Mugel,1 Carlos Kuchkovsky ,2 Escolástico Sánchez,2 Samuel Fernández-Lorenzo,2 Jorge Luis-Hita,2
Enrique Lizaso,3 and Román Orús 3,4,5
1
Multiverse Computing, Banting Institute, 100 College Street, ONRamp Suite 150, Toronto, Ontario M5G 1L5, Canada
2
BBVA Research & Patents, Calle Sauceda 28, 28050 Madrid, Spain
3
Multiverse Computing, Paseo de Miramón 170, E-20014 San Sebastián, Spain
4
Donostia International Physics Center, Paseo Manuel de Lardizabal 4, E-20018 San Sebastián, Spain
5
Ikerbasque Foundation for Science, Maria Diaz de Haro 3, E-48013 Bilbao, Spain

(Received 14 July 2020; revised 19 July 2021; accepted 19 November 2021; published 3 January 2022)

In this paper we tackle the problem of dynamic portfolio optimization, i.e., determining the optimal trading
trajectory for an investment portfolio of assets over a period of time, taking into account transaction costs and
other possible constraints. This problem is central to quantitative finance. After a detailed introduction to the
problem, we implement a number of quantum and quantum-inspired algorithms on different hardware platforms
to solve its discrete formulation using real data from daily prices over 8 years of 52 assets, and do a detailed
comparison of the obtained Sharpe ratios, profits, and computing times. In particular, we implement classical
solvers (Gekko, exhaustive), D-wave hybrid quantum annealing, two different approaches based on variational
quantum eigensolvers on IBM-Q (one of them brand-new and tailored to the problem), and for the first time
in this context also a quantum-inspired optimizer based on tensor networks. In order to fit the data into each
specific hardware platform, we also consider doing a preprocessing based on clustering of assets. From our
comparison, we conclude that D-wave hybrid and tensor networks are able to handle the largest systems, where
we do calculations up to 1272 fully-connected qubits for demonstrative purposes. Finally, we also discuss how
to mathematically implement other possible real-life constraints, as well as several ideas to further improve the
performance of the studied methods.

DOI: 10.1103/PhysRevResearch.4.013006

I. INTRODUCTION Parallel to the above, it has been understood recently that


quantum and quantum-inspired computing can help in solv-
In quantitative finance, portfolio optimization is the prob-
ing hard financial problems [2,3]. For instance, a quantum
lem of selecting the best distribution of assets that optimizes
computer should be able to solve more efficiently and with
some objective function [1]. Typically, this objective function
more accuracy problems related to pricing of financial deriva-
tries to maximize the expected returns and minimize the fi-
tives [4–6], prediction of financial crashes [7,8], detection of
nancial risk. The problem gets more complicated if we do
arbitrage cycles [9], credit scoring [10], and identification of
it dynamically, i.e., optimize the investment portfolio over a
several types of fraud, among many applications. Portfolio op-
series of consecutive trading days. In this dynamic portfolio
timization is no exception, as observed in several preexisting
optimization, the goal is to determine the optimal trading
studies [11,12]. Yet, to the best of our knowledge, none of
trajectory over the considered period of time, i.e., the optimal
these works aimed to solve the problem on real datasets, and
decisions that should be taken (or should have been taken) by a
no comparison has ever been done openly and democratically
broker in order to maximize the overall return at the end of the
between different methods and hardware platforms.
time period. The dynamic problem is more complex because
In this paper we implement several quantum and quantum-
transactions’ costs and transactions’ market impact must be
inspired algorithms for dynamic portfolio optimization, and
taken into account, as well as other possible constraints. In
run them for the first time (as fas as we are aware) with
practice, it is well known that this is an intractable problem
real data corresponding to daily prices over 8 years of 52
for generic instances.
assets. In particular, we implement D-wave hybrid quantum
annealing, a variational quantum eigensolver (VQE) on a
quantum processor of IBM-Q, a new VQE-inspired algo-
rithm, which we call “VQE constrained” also on IBM-Q,
and a quantum-inspired tensor network (TN) optimization
Published by the American Physical Society under the terms of the algorithm (which is also the first implementation of a TN
Creative Commons Attribution 4.0 International license. Further algorithm to solve a real and practical financial problem).
distribution of this work must maintain attribution to the author(s) We benchmark our algorithms using two classical methods: a
and the published article’s title, journal citation, and DOI. Gekko solver (a Python-based optimization suite [13]) and an

2643-1564/2022/4(1)/013006(12) 013006-1 Published by the American Physical Society


SAMUEL MUGEL et al. PHYSICAL REVIEW RESEARCH 4, 013006 (2022)

exhaustive solver. We expose how preprocessing is performed, Notice that ωtT t ωt is the variance of the portfolio return at
and reduce the problem’s dimensionality using a clustering time t. In practical situations, one typically measures risk at
algorithm. We then do a detailed comparison of all the results, time t in terms of the volatility, which is the square root of this
focusing on the obtained Sharpe ratios and computing times. variance. Nevertheless, Eq. (2) is a convenient way to quantify
From our comparison we conclude that, as of today, D-wave the risk in the dynamic setting since it makes the optimization
hybrid and tensor networks are able to handle the largest problem better behaved, being the prefactor 1/2 a convention.
systems, where we do calculations up to 1272 fully-connected The goal of modern portfolio theory is to find the trajectory,
qubits for demonstrative purposes. Interestingly, we see that which maximizes returns for a fixed risk. It is common to
there is no clear answer as to which is the “best” algorithm request the total investment at any given time is fixed, i.e.,
and/or hardware platform to deal with large systems, as this
depends strongly on different figures of merit. 
N

This paper is organized as follows. In Sec. II we give ωn,t = K ∀t, (3)


an overview of the dynamic portfolio optimization problem. n=1

We show how it can be expressed quadratic unconstrained with K the total investment [14]. Let us define at this step the
binary optimization (QUBO) problem, and discuss the dif- normalized weigths
ferences between the continuous and discrete formulations.
In Sec. III we give a very brief overview of the D-wave ωn,t
ωn,t ≡ , (4)
hybrid, VQE, and TN algorithms. In Sec. IV we expose the K
data-preparation procedure, which reduces the problem’s di- so that their sum at every time t is equal to one. In terms
mensionality by identifying irrelevant assets and performing of these normalized weigths, the problem can be solved by
clusterization. Section V compares results obtained using the finding the trajectory {ωti , . . . , ωt f }, which minimizes:
Gekko, exhaustive, D-wave hybrid, VQE, VQE-constrained,
and TN solvers. Section VI discusses industry relevant next 
tf
γ T
steps, such as the inclusion of more real-life constraints (e.g, H= −μtT ωt + ω t ωt + ρ(uT ωt − 1)2 . (5)
market impact, exact linear transaction costs, and the so-called t=ti
2 t
10 − 5 − 40 rule) and potential performance improvements.
Finally, in Sec. VII we wrap up and conclude. By analogy to quantum mechanics, we shall refer to the
above cost function H as Hamiltonian. γ is the risk aversion,
which tunes the eagerness of the investor to explore risky
II. PROBLEM OVERVIEW trajectories, and ρ is a Lagrange multiplier that imposes the
The dynamic portfolio optimization problem can be ex- constraint in Eq. (3) as a penalty term. We have introduced
pressed in a form amenable to a quantum computer. In what the N-dimensional vector u, with un = 1 ∀n, which makes the
follows, we present the problem in some technical detail. constraint in Eq. (3) more compact. The Lagrange multiplier
Where possible, we use the notation of [11]. ρ is fine-tuned in order to satisfy Eq. (3).
Note that Eq. (5) can also be written as

A. Optimal dynamic portfolio 


tf
H= ht , (6)
1. Generalities
t=ti
In the dynamic version of the so-called Modern Portfolio
Theory (or Mean Variance Analysis), we deal with the issue of with
allocating weigths to a number of assets over a period of time, γ T
ht ≡ −μtT ωt + ω t ωt + ρ(uT ωt − 1)2 . (7)
in order to maximize the overall return at the end of the period. 2 t
More specifically, for N assets we consider an N-dimensional Thus, the Hamiltonian is diagonal in time. This implies that
vector of weigths ωt . Each of its component ωn,t is the weigth the optimal trading trajectory is simply the concatenation of
of asset n at time t = ti , ti + 1, . . . , t f , where ti and t f are the optimal portfolios at each time t. As we will see in the
respectively the initial and final trading (rebalancing) times, following, if this is the case, then the problem can be solved
being the number of trading steps Nt = t f − ti + 1. We also analytically (in the continuous variable limit). This is not
define μt , assets’ forecast returns at time t, and t , the assets’ the case when the objective function has terms correlating
covariance at time t. μt is a N-length vector while t is and different times with each other.
N × N matrix. For a given trading trajectory (i.e., a given set Note that the ωn,t are interpreted as a percentage of the
of vectors {ωti , . . . , ωt f }), the overall return is given by total investment. For instance, having ωn,t = 0.1 means that
we invest a 10% of our total amount K in asset n at time t. Ad-

tf
ditionally, one may also introduce a cap K  on the maximum
Return ≡ μtT ωt , (1)
amount that can be invested for each asset, i.e., ωn,t  K  /K.
t=ti
We measure the quality of a portfolio by the so-called
and the risk of the trajectory is defined as Sharpe ratio.
t f
t=t μ ωt
T
1 T
tf
Risk ≡ ω t ωt . (2) Sharpe ≡  i t , (8)
2 t=t t tf
ω
t=ti t
T ω
t t
i

013006-2
DYNAMIC PORTFOLIO OPTIMIZATION WITH REAL … PHYSICAL REVIEW RESEARCH 4, 013006 (2022)

This quantifies the amount of return per unit of risk of trading given by the expression
trajectory. Notice that the numerator is the Return, and not the
Profit, which would imply removing all possible additional 
tf
 T 
Profit ≡ μt ωt − λ(ωt )2 , (13)
costs (such as transaction costs, to be discussed later). Notice t=ti
also that, for example, one rebalancing step, the denominator
is the normalized volatility, understood as the square root of i.e., the percentual returns minus the percentual costs.
the variance of the normalized returns. A large Sharpe ratio
means a large return for the risk that is assumed, whereas a B. Continuous versus discrete formulations
ratio close to zero means the opposite, and a negative ratio In this article, we chose to discuss the portfolio optimiza-
means losses instead of profits. tion problem with discrete variables, which is more relevant
to big industry players, as investment funds typically trade in
2. Transaction costs large, discrete amounts. In this section, we will briefly discuss
The problem stated above is simplistic as it does not ac- the case where the asset allocations ωn,t can be approximated
count for transaction costs. These frequently are comparable by continuous variables. This problem is comparatively sim-
to the profit incurred by a given portfolio. The transaction pler, as it gives us access to the full toolbox of differential
costs are typically a percentage of the transaction (whether calculus.
buying or selling assets). They can be expressed in terms of
unnormalized weigths as 1. Continuous asset allocations
When no transaction costs are present, the problem can

tf

tf

N
actually be solved exactly. The minimization of Eq. (6) can
Cost ≡ νt |ωt | = νnt |ωn,t+1 − ωn,t |, (9)
then be written as
t=ti t=ti n=1
∂H ∂ht
with νnt the cost percentage (e.g., νnt = 0.001 for 10 basis = = 0 ∀t, (14)
∂ωtT ∂ωtT
points (BPS), meaning a cost of the 0.1% of the total amount
of the transaction). The objective function, which accounts for which, using μtT ωt = (μtT ωt + ωtT μt )/2 [15], amounts to
these costs in terms of normalized weigths is given by 1 γ
− μt − ρu + t + ρu · uT ωt = 0. (15)
 tf
γ 2 2
H= −μtT ωt + ωtT t ωt + νt |ωt | + ρ(uT ωt − 1)2 . Therefore, the optimal solution at time t is given by
t=ti
2
γ −1 1
(10) ωt = t + ρu · uT μt + ρu , (16)
2 2
Note that this is not of the form in Eq. (6), since ωt correlates and the optimal dynamic portfolio is just the concatenation of
times t and t + 1. the optimal portfolios at each time t. For completeness, one
The (percentual) transaction costs are not polynomial in could also get an equation for the multiplier ρ:
the variables ωn,t because of the absolute value function. This
could limit the applicability of some quantum optimization ∂H ∂ht
= = 0 ∀t, (17)
methods. To get around this problem, we can Taylor-expand ∂ρ ∂ρ
the absolute value, in a way similar to the expansion in Ref. [7] which in the end simply implies:
for a step-function. Alternatively, we could introduce ancillary
qubits to treat this problem exactly, as explained in Sec. VI. uT ωt = 1. (18)
Here, we choose to approximate Eq. (9) by a parabola in the This is nothing but the condition in Eq. (3), implying:
considered range of ωn,t :
  γ −1 1
K uT t + ρu · uT μt + ρu = 1, (19)
νt |ωt | ≈ ωt t ωt , ωn,t ∈ 0,
T
, (11) 2 2
K
which is indeed an equation for ρ at each time t. In practice,
with t the best matrix of transaction costs at time t that is though, it is much easier to simply use Eq. (16) for a suffi-
compatible and realistic with market conditions. This is an ciently large ρ, and check a posteriori that Eq. (3) is satisfied
excellent approximation to Eq. (9) when the ωn,t are discrete up to some degree of accuracy.
variables and K  /K is small. The cost function therefore re- When transaction costs are included, it is no longer possi-
duces to: ble to solve the problem analytically. In the continuous-time

tf limit, we can recast the problem as a set of nonlinearly cou-
γ T
H= −μtT ωt + ω t ωt + λ(ωt )2 + ρ(uT ωt − 1)2 , pled ordinary differential equations. To do so, we notice that
t=ti
2 t in the discrete formulation the increment in time t between
two consecutive time steps is t = 1. The continuous-time
(12)
limit can then be taken as t → 0, implying
with λ the optimal parabolic coefficient for the transaction 
tf tf
ωt
costs, as discussed above. Finally, let us remark that in this t → dt, → ω̇, (20)
setting, the percentual profits of the trading trajectory are t=ti ti t

013006-3
SAMUEL MUGEL et al. PHYSICAL REVIEW RESEARCH 4, 013006 (2022)

with ω̇ the time derivative of the vector of asset allocations ω, with x ∈ {0, 1}Ntot the bit vector and Q ∈ RNtot ×Ntot the corre-
which is now a vector field. In this limit, the cost function is sponding QUBO matrix, which can be easily derived from
given by Eqs. (12) and (25). To solve this problem on a quantum
tf computer, we quantize Eq. (26) by promoting the bit variables
S= L(ω, ω̇, t )dt. (21) {xn,t,q } to qubit operators {x̂n,t,q } with eigenstates |0 and |1.
ti Our conclusion at this step is that the portfolio optimization
We will refer to S as the action and L(ω, ω̇, t ) as the La- problem, with discrete investments, as happen in real life, is a
grangian, by analogy to physics. The Lagrangian is obtained natural problem for quantum and quantum-inspired methods.
by taking the continuous-time limit of the cost function H, Its formulation is directly a QUBO, by construction, without
Eq. (12). Finding the optimal trading trajectory thus reduces the need of further mapping the problem to anything else:
to a conventional functional minimization problem. Our goal we can feed this problem to a quantum or quantum-inspired
is to find the time path of ω, which minimizes the action S: solver as is.

δS 3. Discrete problem complexity


= 0. (22)
δω Note that, by applying the transformation xi = (1 + si )/2,
As is well known, the solution to this equation corresponds to Eq. (26) can be mapped to finding the ground state of an Ising
the Euler-Lagrange equations for the Lagrangian, i.e., spin glass:
∂L d ∂L tot −1
N
− = 0. (23) H= Ji j si s j ,
∂ω dt ∂ ω̇ (27)
i, j=0
For a specific problem at hand, it is easy to write the La-
grangian and unfold the above equation, resulting in a set where the si = ±1 are spin variables. The couplings Ji j can be
of nonlinearly coupled ordinary differential equations for the derived from Eq. (26).
asset allocations ωn (t ) with initial conditions at t = ti . In this Ising spin-glasses are known to be NP-Hard in the generic
limit, one can thus solve the dynamic portfolio optimization case [16], demonstrating that the portfolio optimization prob-
problem using the wide variety of algorithms for systems of lem can be computationally costly. This is true even when
coupled differential equations. As an example, for Eq. (12) the there are no transaction costs. The optimal trading trajectory
Lagrangian is given by is then the concatenation of optimal portfolios at each time
γ step t. Finding the optimal trajectory there means solving Nt
L(ω, ω̇, t ) = −μT ω + ωT ω + λ(ω̇)2 + ρ(uT ω − 1)2 , independent optimization problems for N × Nq bits each. The
2
instantaneous problem is itself an Ising spin glass, which,
(24) in the worst case, may correspond to a hard instance (very
with ω, ω̇, μ and  being time dependent. much unlike in the continuous formulation, which is exactly
solvable!).
2. Discrete asset allocations
In industry, the rebalancing is done at discrete time steps III. METHODS OVERVIEW
t, and it is common for funds to trade assets in large, discrete In this paper we use a variety of methods and hardware
packages. implementations to solve the dynamic portfolio optimization
In this setting, the problem is naturally recast as a quadratic problem in its discrete formulation. These are the following:
unconstrained binary optimization (QUBO). For this, we (1) Classical: Gekko solver, exhaustive solver.
choose a binary encoding of each variable ωn,t in terms of (2) Quantum annealing: D-wave hybrid.
Nq bits xn,t,q . There are several options for this encoding, as (3) Quantum universal: VQE, VQE constrained.
discussed, e.g., in Ref. [11]. For simplicity in this paper we (4) Quantum inspired: TN solver.
choose to work with the binary encoding The classical methods were implemented as a benchmark
Nq −1 of the rest of the algorithms. Gekko is a library, which offers
1  q tools for non-convex, integer optimization problems [13]. The
ωn,t = 2 xn,t,q , (25)
K q=0 exhaustive solver is a brute-force search over valid configura-
tions of the minimum of the cost function. Let us now make a
where xn,t,q = 0, 1. By construction, we have that the maxi- brief overview of the rest of the methods.
mum investment per asset is K  = 2Nq − 1, which is naturally
included in the formalism. Investments go also in discrete A. D-wave hybrid
packages of amount 1. Substituting Eq. (25) into, e.g., (12)
results in a QUBO problem for the Ntot = N × Nt × Nq bit As is well known, quantum annealing is a type of quantum
variables, i.e., finding the optimal portfolio weigths at any algorithm based on the ideas of adiabatic quantum computa-
given time is therefore equivalent to finding the ground state tion [17], and is particularly well suited to solve optimization
(i.e., the minimum over the variables {xn,t,q }) of the classical problems. This process is similar to classical or simulated an-
Hamiltonian nealing, where thermal fluctuations allow the system to jump
between different local minima in the energy landscape. In
H = x T Qx (26) quantum annealing, the jumps are mainly driven by quantum

013006-4
DYNAMIC PORTFOLIO OPTIMIZATION WITH REAL … PHYSICAL REVIEW RESEARCH 4, 013006 (2022)

FIG. 1. Quantum circuit used for VQE and VQE-constrained algorithms. The system had 15 qubits on the whole, of which 12 were used
in the ansatz. The initial state was |0⊗12 . In the figure, single-site boxes are one-qubit y rotations, and the two-qubit gates are CNOTs (target
qubit being the large circle). In the end, measurements in the computational basis (boxes after the vertical dotted line) are performed on each
qubit and stored in a classical register (as shown by the arrows).

tunneling events, which allow for a more efficient exploration circuit consisted of 82 C-NOTs and 24 variational one-qubit
of the landscape of local minima, especially when the energy rotations, as shown in Fig. 1.
barriers are tall and narrow. Moreover, in order to tackle slightly-larger problems than
In this paper we used the quantum annealer provided by those reachable by plain-vanilla VQE, we implemented a new
D-wave, in particular the so-called D-wave 2000Q proces- and original approach, which we call VQE-constrained for
sor, which gives access to 2048 noncoherent qubits coupled dynamic portfolio optimization. The idea here is quite simple:
through the so-called chimera graph. This architecture allows use VQE to sample several low-energy states at every rebal-
us to solve problems for up to 65 fully-connected qubits, ancing time t, and then use a classical approach to find, which
due to embedding overheads. The D-wave hybrid algorithm combination of these provides the highest returns over the
uses a hybrid classical-quantum strategy to overcomes this whole trading time period. This approach is inspired by low-
limitation, allowing us to deal with much larger problems. In energy-subspace methods in physics. It follows the intuition
a nutshell, D-wave hybrid breaks down problems, which are that the optimal portfolio can be built in most cases from a
larger than the capability of the quantum processor into parts. combination of near-optimal states. Thus, we identify these
These are subsequently recombined to produce the solution. states using VQE (this is the computationally expensive part),
and then recombine them and estimate their associated profits
classically (which is computationally cheap). Our strategy
B. Variational quantum eigensolver here was to look for the best 10 solutions at each trading step
using VQE. Then, in the postprocessing, we tried all possible
The variational quantum eigensolver (VQE) [18] is a hy-
combinations until finding the one that mininized the cost
brid quantum-classical algorithm for optimization. The idea is
function.
to do a variational optimization of a quantum state in order to
obtain an approximation to the ground state of a Hamiltonian.
This idea is quite generic, but the point of the VQE algorithm
is that the ansatz quantum state is, itself, a real quantum state C. Tensor networks
that is implemented on a quantum processor by some quan- TNs are representations of complex quantum states based
tum circuit. The gates in the circuit depend on parameters, on their local entanglement structure [22,23]. Take for in-
which are the variational parameters of the algorithm. After stance a system of n qubits. Any wave function of the system
estimating the energy of the quantum state via sampling, the can be described inefficiently just by giving its O(2n ) coeffi-
parameters are then fine-tuned to lower the energy (using, e.g., cients in the computational basis. As such, these coefficients
conjugate gradient). After a number of iterations, the energy can be understood as a tensor with n indices, where each
converges, producing an approximation to the desired ground index takes two possible values (say, 0 and 1). We could then
state. The performance of VQE depends strongly on several think of replacing this huge, nasty tensor, by a network of
aspects, but most importantly on the choice of variational interconnected tensors with less coefficients, see Fig. 2 for an
quantum circuit. In some cases, the search for some com- example. This construction defines a TN, with each subsystem
plex ground states require of a strongly-entangling quantum in the figure corresponding in practice to the Hilbert space of a
circuit, in turn increasing the complexity of the algorithm. qubit. Constructed in this way, the TN depends on O(poly(n))
However, VQE is still a good option as an optimization tool in parameters only, assuming that the rank of the interconnecting
current noisy intermediate-scale quantum (NISQ) processors indices is upperbounded by a parameter D, which is called
[19]. “bond dimension”. Similarly, interconnecting indices in the
For the sake of this paper, we implemented VQE optimiza- network are also called “bond indices”, and provide the struc-
tion in the quantum processors of IBM-Q, up to 12 qubits. The ture of the many-body entanglement in the quantum state. Any
circuit ansatz for VQE optimization is shown in Fig. 1. It is D > 1 provides an entangled quantum state.
based on a strategy of strongly entangling layers, inspired by As is well known in physics, TNs are a natural tool to solve
the circuit-centric classifier design from Ref. [20], with single- optimization problems. People have been using them as an
qubit rotations around the y axis. In particular, we developed ansatz to approximate low-energy eigenstates of Hamiltoni-
our own VQE algorithm using Xanadu’s PennyLane library ans, and many algorithms have been invented to this aim (see,
for quantum machine learning [21], which is well suited to e.g., Ref. [23] and references therein). The idea here is that,
run on IBM’s quantum backend. Our variational quantum by mapping optimization problems to Hamiltonian eigenvalue

013006-5
SAMUEL MUGEL et al. PHYSICAL REVIEW RESEARCH 4, 013006 (2022)

at the expense of a very small error, since


   bare 2 
μn,t = log 1 + μbare
n,t ≈ μbare
n,t + μn,t . (30)

We used a dimensional reduction technique prior to ap-


plying our optimization routine. The motivation for this is
two-fold.
First, most algorithms cannot tackle the problem in its full
complexity. This is mainly true for the VQE algorithm, where
dimensional reduction methods are key to solving the problem
FIG. 2. The coefficient of the quantum state of n qubits is a tensor despite the processor’s limited resources. This contrasts with
with exponentially many coefficients in the system’s size. The inner the tensor networks and D-wave hybrid algorithms, which can
structure of this tensor is that of a tensor network, which is a network actually find close to optimal trajectories even when all of the
of tensors interconnected by ancillary indices that take into account problem’s variables are used.
the structure and amount of entanglement in the quantum state. Second, we found that even the highest performance opti-
We represent this here using diagrams, where shapes correspond to mization algorithms tend to get stuck in local minima when
tensors, lines to indices, and lines connecting shapes to contracted the number of variables is truly gigantic. Dimensional re-
(summed) common indices. The tensor network on the right-hand duction methods such as clustering serve the purpose of
side is an example of matrix product state. “Open”—uncontracted— discarding irrelevant degrees of freedom early.
lines in the tensor network correspond to the degrees of freedom of We have observed that assets, which simultaneously
the original physical qubit (for the case at hand, one line per qubit).
present low variance and low returns tend to not be part of the
optimal portfolio. Indeed, investing in these assets promises
problems, as done in quantum annealing, we can then use the consistently low returns. By discarding assets, which simul-
huge machinery of TN techniques and algorithms to solve the taneously have sub-average variance and sub-average returns,
optimization problem at hand. our dataset can be reduced from 52 down to 28 relevant assets.
In our case, we implemented an optimization strategy over Prior to clustering, we may also eliminate the noise in
the so-called matrix product states (MPS) [24]. This family of the data by applying a Hodrick-Prescott smoothing, which
states has been tested already in a variety of algorithms for extracts the data trend. We then compute the Euclidean dis-
many physical examples. For practical reasons, here we use tance in the data trend for each pair of assets. This allows
imaginary-time evolution as optimization method. Moreover, us to identify the degree of correlation between assets, which
in order to improve the performance, we also tailored the is represented as a dendogram in the diagram of Fig. 3. To
actual implementation of our optimization to the specifics of select the optimal number of clusters we wish to consider, we
our problem. plot the mean cluster variance versus the number of clusters
(Fig. 4). We can clearly see that, beyond 8 clusters, increasing
the number of clusters no longer significantly reduces the
IV. DATA PREPARATION mean cluster variance. We therefore take ≈6 − 8 as a reason-
As a first step, we benchmarked our different algorithms able choice of number of clusters for this dataset. The assets’
for the optimization problem using random data. Studying trend is shown in Fig. 5, grouped by cluster, for the case of
real data proved to be more challenging, given the shear size 6 clusters. We observe a good agreement in general for the
of the dataset and necessity to extract the data trend. Our assets within each cluster. Only one of the clusters shows a rel-
dataset consists of the daily values of 52 assets over 8 years. atively high variance between assets’ trends. We could always
Among these assets were government bonds, variable income address this issue by considering a larger number of clusters.
securities, fixed income securities, etc. Alternatively, we could also run several optimization rounds
The bare return for each asset is given by with variable numbers of clusters. By analogy to physics, we
actually renormalized the assets. Within this picture, the den-
Pn,t − Pn,t−1 drogram in Fig. 3 is nothing but the coarse-graining structure.
n,t ≡
μbare , (28)
Pn,t−1 In practice, after the clustering, the optimization is run over
a cost function of clusterized assets, i.e., at every time step,
with Pn,t the price at time t of asset n. Importantly, mathemat- the mean investment in each cluster n is the component ωn
ical expressions often call for the logarithmic returns instead of the investment vector. In this paper, we choose to equally
of the bare returns. These are defined as distribute the total investment in a cluster among all the assets
Pn,t   within the cluster, i.e., investing 10 on a cluster with 5 assets
μn,t ≡ log = log 1 + μbare
n,t . (29) means for us an investment of 10/5 on each asset belonging
Pn,t−1
to the cluster. Let us stress also that we only applied this
There are several reasons why logarithmic returns are pre- clustering for specific methods and hardware, namely, for the
ferred over the bare returns [25]. In particular they follow a ones that could not handle the full problem being analyzed
normal distribution, but most importantly for us, they are time (essentially VQE and VQE constrained, which run on limited
additive, and hence justify the sum in Eq. (1). In trading situ- quantum hardware).
ations, though, the bare returns are usually small (μbare
n,t 1), We will consider the portfolio rebalancing to happen once
implying that bare and logarithmic returns are interchangeable monthly, for the sake of concreteness. The returns between

013006-6
DYNAMIC PORTFOLIO OPTIMIZATION WITH REAL … PHYSICAL REVIEW RESEARCH 4, 013006 (2022)

FIG. 3. Dendogram showing possible data clusters. The Euclidean distance between the different time series is shown on the vertical axis.

transactions are calculated as the sum of returns during the built datasets of different sizes. We considered datasets of
course of that month. Note that we could have calculated them size XS, S, M, L, XL, and XXL, each of which pushes a
on the basis of a rolling average. This has the advantage of solver to its limit. The S dataset, for instance, is the maximal
eliminating daily fluctuations, which make it easier to extract system size, which the exhaustive solver could handle. Details
trends. On the flip side, the asset returns used in comparison of these datasets are shown in Table I. The risk aversion γ
would only approximately reflect the actual asset returns. represents a compromise between risk and returns. By tuning
The daily covariance is an estimate of the daily fluctuations this parameter, we can find the portfolio, which promises the
of a group of assets, encoded in the matrix t at time t. We highest returns for any fixed risk. The set of most profitable
estimate the covariance at time t based on the fluctuations portfolios for all risks is known as the efficient frontier. In
in assets’ returns over a window of the prior 20 business all simulations, and for the sake of simplicity, we set the risk
days. As a remark, notice also that clustered assets have, aversion parameter γ = 1.
by construction, low covariance (since similar assets—i.e., In Table II we show the comparison of Sharpe ratios ob-
those with large covariance—are the ones being clustered!). tained with the different methods and datasets, in Table III
In practice, this also means having a smaller risk factor in the we show the profits (i.e., returns minus transaction costs,
final cost function. percentual), and in Table IV we show an estimation of the
Once we get an optimal portfolio trajectory for clustered computational running time of our simulations. Entries were
effective assets, we unfold the investment by assuming an left blank when a dataset’s size exceed a solver’s capabilities.
equal investment on each asset forming each specific cluster. Note that the solution, which minimizes the cost function
From this we obtain the daily return on an equal investment in H does not always extremize the profit, returns, and Sharpe
each asset within each cluster, and in turn an overall trading ratio. For dataset M for instance, the TN simulation produces
trajectory in the original variables. a trajectory, which presents higher profits and Sharpe ratio
than other solvers, but is further away from the global minima.
V. RESULTS Another example is dataset L, for which Gekko produces the
largest profits, but the largest Sharpe ratio is obtained with
Let us now discuss the results obtained with the different
techniques [26]. To show the capabilities of each solver, we

FIG. 5. Effective assets after clustering, from 52 down to 6. Hor-


FIG. 4. Mean variance in each cluster versus the number of izontal axis is the period of time considered for this clustering (two
clusters. years).

013006-7
SAMUEL MUGEL et al. PHYSICAL REVIEW RESEARCH 4, 013006 (2022)

TABLE I. Specifics of the different datasets used for benchmarking the different algorithms and hardware platforms. Risk aversion for all
datasets is fixed to γ = 1 and transaction costs to λ = 1. Time steps Nt are measured in business months (i.e., not considering weekends due
to closure of some markets).

Param. XS S M L XL XXL
N 3 4 4 8 8 8
Nt 2 5 7 17 29 53
Nq 1 1 1 2 2 3
Ntot 6 20 28 272 464 1272
2Ntot 64 O(106 ) O(108 ) O(1081 ) O(10139 ) O(10382 )
K 2 3 3 5 10 15
K 1 1 1 3 3 7

TNs instead (see Tables II and III). In fact, the performance We have observed that the D-wave hybrid approach works
of Gekko is quite remarkable, sometimes even better than well for this problem, better in fact than a simple D-wave
quantum and quantum-inspired solutions depending on the approach (results not shown). Specifically, D-wave hybrid al-
metric, but unfortunately the method hits a memory wall lows us to solve problems up to 1272 fully-connected qubits in
around 500 qubits. In this sense, it would be nice to test also 171 seconds, which in our opinion is really fast. We conclude
the performance of other quantum-inspired solutions such as that hybrid classical-quantum approaches can be already quite
Fujitsu’s Digital Annealing, Microsoft QIO, and Amazon’s useful for quickly finding good-quality solutions to practical
Alpha-QUBO, as well as popular methods nowadays such as optimization problems. For the sake of comparison, the cur-
metaheuristics. Some of these techniques provide also a very rent version of our TN solver took 116 833 seconds in solving
good performance that would be worth analyzing. We leave the same problem running on a common laptop (a MacBook
this for future studies. Pro using Matlab), and a pure quantum-annealing approach in
Rosenberg et al. were able so study a system of 24 fully D-wave 2000Q would only have been able to solve up to 65
connected qubits at most (see Ref. [11] Table IV) using fully-connected qubits. We observe also that D-wave hybrid
the capabilities of D-wave’s processor from 2016. By way provides an interesting landscape of potential solutions, see
of comparison, with today’s D-wave hybrid as well as with for instance Table V, where we show the energies as well as
our TN algorithm we optimized up to 1272 fully-connected other relevant quantities computed by the algorithm for an
qubits, and didnot hit the limit of the two approaches. From optimization of 8 assets over 53 trading steps. As shown in
our experience, these two algorithms could well handle the that table, the different figures of merit are in fact different:
full dataset of 28 relevant assets without any clustering and for minimizing the energy does not necessarily, e.g., maximize
reasonable periods of time. The algorithms are under continu- profits.
ous development, but this already shows important progress in We notice that our quantum-inspired TN solver tends to
the performance and variety of portfolio optimization strate- approach the problem’s global minimum more reliably than
gies. D-wave hybrid in some cases. In the case of the M, L, and
Concerning universal quantum processors, we observed XL datasets, for instance, our TN algorithm returns solu-
good convergence of VQE for this problem in small datasets. tions, which have a larger Sharpe ratio and/or larger profits.
As can be seen from Tables II , III, and IV, a naive application Furthermore, for the XXL dataset the solution could still
of universal quantum processors such as IBM-Q still struggle be further improved by playing with different hyperparame-
to tackle optimization problems of commercially relevant di- ters and fine-tuning the algorithm further, which is currently
mensions. We were able to obtain good performance using work in progress. In any case, it is interesting to notice that
appropriate data preparation. Note, however, that universal whereas D-wave hybrid provides the largest profits for the
quantum processors have seen a phenomenal improvement XXL dataset, the largest Sharpe ratio is however given by the
over the past decade, such that we look forward to seeing TN solver. This deserves a deeper analysis, which we leave
progress in this area in the coming years. for future works.

TABLE II. Sharpe ratios computed by the different methods for the different datasets and time periods from Table I.

Method XS S M L XL XXL
VQE 3.59
Exhaustive 6.31 8.90
VQE constrained 6.31 6.04 4.81
Gekko 5.98 8.90 8.39 15.83 20.76
D-wave hybrid 5.98 8.90 8.39 7.47 9.70 12.16
Tensor networks 5.98 8.90 9.54 16.36 15.77 15.83

013006-8
DYNAMIC PORTFOLIO OPTIMIZATION WITH REAL … PHYSICAL REVIEW RESEARCH 4, 013006 (2022)

TABLE III. Profits (percentual) computed by the different methods for the different datasets and time periods from Table I.

Method XS S M L XL XXL
VQE 2.4%
Exhaustive 5.1% 13.9%
VQE constrained 5.1% 9.1% 7.1%
Gekko 5.8% 13.9% 13.6% 54.1% 71.6%
D-wave hybrid 5.8% 13.9% 13.6% 18.9% 29.3% 67.6%
Tensor networks 5.8% 13.9% 15.4% 38.2% 39.6% 39.7%

We anticipate that our TN results can still be largely im- with t a diagonal matrix of market impact coefficients.
proved, both in terms of accuracy and performance. Based Equation (31) can be interpreted as follows: The impact of
on our own estimations, we can reduce at least ≈100× the a trade in asset n at time t on the value of our portfolio is
runtime of our TN algorithm (see Sec. VI), as, in its present proportional to ωn,t , the amount of shares of asset n bought
version, the TN algorithm is not memory intensive. In fact, or sold, and to ωn,t , the amount of shares of asset n held at
acceleration of the TN code is possible at three levels: (i) soft- time t.
ware, (ii) hardware, and (iii) the algorithm itself. All in all, our Note that if we are buying asset n, ωn,t > 0, we expect
paper proves that TN solvers are a cheap and practical way to the asset’s value to increase. Our portfolio’s returns should
tackle large combinatorial optimization problems, compared then grow as ωn,t . The matrix t is therefore positive definite.
to other quantum and quantum-inspired approaches. Similarly, when selling, ωn,t < 0, and our portfolio’s returns
drop with ωn,t .
VI. NEXT STEPS
The resulting classical Hamiltonian including market im-
pact is therefore
Let us now discuss what would be the next steps to make
our algorithms better tailored to real-life situations, as well as 
tf
γ T
to improve their efficiency. H= −μtT ωt + ω t ωt + λ(ωt )2
t=ti
2 t
A. More constraints − ωtT t ωt + ρ(uT ωt − 1)2 , (32)
As we said in the introduction, the portfolio optimization
problem is central to quantitative finance. We have discussed again in terms of normalized weigths. Note that this Hamilto-
its dynamic version, where we search for an optimal trading nian is in the form of a QUBO.
trajectory given the price history of several assets. There exist As can be inferred from Eq. (31), this term is non-
many commercially relevant variations of this problem. In negligible only when (i) we have a large amount of the asset
this section, we will discuss three: the market impact, exact being traded in our portfolio, and (ii) the traded amount is
transaction costs, and the 10 − 5 − 40 rule. large.

1. Market impact
2. Exact linear transaction costs
Intuitively, when a large order is passed, it can affect the
As discussed in Sec. II, we would expect the transaction
market. For instance, a large “buy” order may increase the
costs to be linear in the absolute value of the transaction mag-
price of an asset because it signals high demand, whereas a
nitude. We approximated these by a parabola, as polynomial
large “sell” order may instead decrease it. This, of course,
expressions find a more natural formulation as a QUBO. That
would alter the optimal trading trajectory. As discussed in
option is cheap, fast, and works quite well for the accuracies
Ref. [11] this can be implemented as
that are normally considered. It is however possible to exactly

tf implement the linear transaction costs by introducing N × Nt
Market = ωtT t ωt , (31) extra ancillary qubits yn,t . This can be done by noticing that
t=ti the sign of the difference (ωn,t+1 − ωn,t ) in Eq. (11) can be

TABLE IV. Runtimes (in seconds) estimated for the different methods for the different datasets from Table I.

Method XS S M L XL XXL
VQE 278
Exhaustive 0.005 34
VQE constrained 123 412 490
Gekko 24 27 21 221 261
D-wave hybrid 8 39 19 52 74 171
Tensor networks 0.838 51 120 26649 82698 116833

013006-9
SAMUEL MUGEL et al. PHYSICAL REVIEW RESEARCH 4, 013006 (2022)

TABLE V. Example of landscape of computed solutions with D-wave hybrid, for an optimization of 8 assets over 53 trading steps, with
maximum holdings 15: Computed trajectory (T), energy (E), covariance (C), returns (R), transaction costs (TC), profit (P), and Sharpe ratio
(SR). The actual trajectory is not given for space reasons, but is available upon request.

T E C R TC P SR
1 –0.673 0.755 10.566 6.514 4.052 12.161
2 –0.661 0.731 19.347 6.026 4.321 12.101
3 –0.656 0.736 10.248 5.662 4.586 11.939
4 –0.621 0.741 9.841 7.366 2.475 11.428
5 –0.620 0.793 9.736 6.066 3.670 10.931

controlled by yn,t as follows: by the penalty term

νnt |ωn,t+1 − ωn,t | → νnt (ωn,t+1 − ωn,t )(1 − 2yn,t ), (33) 


tf

N
 2

WhoIsFive = ρ yn,t 0.05 − ωn,t + μ2n,t
with yn,t = 0 if (ωn,t+1 − ωn,t ) > 0 and yn,t = 1 otherwise. t=ti n=1
This condition can be further imposed by including the  2 2

+ (1 − yn,t ) ωn,t − 0.05 + νn,t , (36)
penalty term
which again uses a Lagrange multiplier ρ  and Slack variables

tf
N
μn,t , νn,t ∈ R.
ρ (ωn,t+1 − ωn,t )yn,t , (34) If we include the 10 − 5 − 40 rule, the optimization prob-
t=ti n=1
lem becomes much more complex because of two reasons:
first, Eqs. (35) and (36) make this a higher-order optimization
with ρ  a Lagrange multiplier. So, in this way, one could
problem, since Eq (35) is quartic and Eq. (36) is cubic in the
introduce the linear transaction costs in the QUBO formu-
bit variables. Therefore, the problem is now a HUBO (“H”
lation (notice that the above equations are quadratic), but at
for “higher-order”) instead of a QUBO. HUBOs are generally
the expense of introducing more qubits, thus increasing the
more complex than QUBOs, and there exist few computa-
complexity of the optimization problem.
tional architectures adapted for solving them (though they
do exist). Second, the 10 − 5 − 40 rule is a set of inequality
3. 10 − 5 − 40 rule constraints, which involve the inclusion of new hyperparam-
It is common for investors to be bound by a constraint eter Slack variables αt , μn,t and νn,t , which also need to be
known as the 10 − 5 − 40 rule: no investment in an asset can optimized, thus increasing the complexity of the problem.
represent more than 10% of the total portfolio’s value; invest-
ments larger than 5% of the portfolio’s value cannot total 40% B. Improved hardware and codes
of the portfolio’s value. In the following we will demonstrate
a way to implement this constraint as a QUBO, but at the price We believe that it should be possible to handle bigger
of increasing the complexity of the optimization problem. problems in a number of ways. Concerning quantum proces-
If we choose to impose the 10 − 5 − 40 rule, we could pro- sors, D-wave’s processor “advantage” with Pegasus topology
ceed as follows. First, choose K  = 0.1 × K so that variables is able to cope with a larger number of variables (5000+
ωt,n ∈ [0, K  /K] directly satisfy the 10% constraint, which qubits, 35000+ couplers, 15 couplers per qubits, 23x more
can be achieved by choosing an appropriate Nq . Notice that, optimal solutions than 2000Q for satisfiability problems and
in our previous simulations, the ratios K  /K can be extracted 20x faster), see for instance the numerical benchmarks in
from Table I, but we could easily impose K  /K = 0.1. Next, D-wave’s documentation [27]. Also, hybrid solutions such as
we impose that the sum of those weights larger than 5% D-wave hybrid benefit a lot from such developments. Con-
does not amount to more than 40% of the total investment. cerning IBM-Q, we have found that a naive application of
We can do this by adding a penalty term, which uses Slack VQE was very rather limited for this problem, but obtained
variables αt ∈ R. The idea is that, by minimizing also over the promising results by constraining the solution space using
Slack variables, one is able to convert an inequality constraint VQE. We think that it is worth exploring more hybrid solu-
into an equality constraint. Additionally, we include ancillary tions of this type. As a matter of fact, this is also the natural
qubits yn,t such that yn,t = 1 if ωn,t > 0.05 and yn,t = 0 oth- state of affairs: in the NISQ era, hybrid quantum-classical
erwise. The penalty term for the 40% constraint is given by solutions (both in hardware and software) are offering the best
operational performances, which is also somehow expected.
Our TNs code is able to handle O(103 ) qubit variables
tf  N 2 using a MacBook Pro without problems, even though the per-
 

UpToForty = ρ yn,t ωn,t − 0.4 + αt2 , (35) formance can be improved in a number of ways. We believe
t=ti n=1 that a highly optimized code in C++ fully parallelized on a
HPC cluster should be able to handle really large problems
with ρ  a Lagrange multiplier. Finally, we need to ensure that very efficiently. GPU computing, FPGAs, and even optical
yn,t = 1 if and only if ωn,t > 0.05, which can be accounted for processing units (OPUs), should also provide improvements

013006-10
DYNAMIC PORTFOLIO OPTIMIZATION WITH REAL … PHYSICAL REVIEW RESEARCH 4, 013006 (2022)

at the hardware level. Moreover, at the algorithmic level, it From our results we also conclude that there seems to be no
should be possible to try different TN strategies that should clear answer as to which is the “best” algorithm and hardware
also improve the performance. The combination of all these platform to solve the dynamic portfolio optimization problem
easily mean more than 100× acceleration of the calculations. for large systems. This is because there are several figures of
Since memory is not a constraint for our algorithm, this would merit at play: profits, Sharpe ratio, time cost, and also money
also mean the ability to simulate much bigger systems than cost. The performance of the algorithms is different depending
the ones considered in this paper. And of course, this option on the figure of merit, leading us to conclude that, in practice,
would still be cheaper than other alternatives. the more options we have, the better.
We have good reasons to think that the results presented in
VII. CONCLUSION AND OUTLOOK this paper are very promising. They show how real data can
be handled by upcoming quantum computers, and also show
In this paper we have solved the problem of dynamic the potential of quantum-inspired methods such as tensor net-
portfolio optimization using a number of quantum and works. We also realize the importance of hybrid approaches,
quantum-inspired algorithms on different hardware platforms. combining quantum and classical processing. This has been
We ran our solver on the daily values of 52 assets over 8 the key to improved results, e.g., in VQE-constrained and
years. We implemented classical solvers (Gekko, exhaustive), D-wave hybrid. In fact, a hybrid approach combining quantum
D-wave hybrid quantum annealing, two different approaches processing and tensor networks should be quite successful
based on VQE on IBM-Q (one of them brand-new, which for many problems. This is a topic that we are currently
we dubbed “VQE-constrained”), and in this context also a investigating in the broad sense. We also believe that all these
quantum-inspired optimizer based on tensor networks. We developments, involving quantum and quantum-inspired tech-
also implemented a preprocessing based on clustering of as- niques, will change the way quantitative finance is done, and
sets. From our comparison, we conclude that D-wave hybrid for good.
and tensor networks are able to handle the largest possible
systems in the present implementation, i.e., those for the
XXL dataset. More specifically, with these two methods we
ACKNOWLEDGMENTS
managed to solve optimization problems up to 1272 fully-
connected qubits, for demonstrative purposes and without We thank Hossein Sadeghi for insight about D-wave,
hitting the limiting computational capabilities (we could in Mhedi Bozzo-Rey for insight about IBM-Q, as well as
fact have targeted larger systems). For comparison, previous Christophe Jurczak, Pedro Luis Uriarte, Pedro Muñoz-Baroja,
quantum dynamic portfolio optimizations involved up to 72 Creative Destruction Lab, BIC-Gipuzkoa, DIPC, Ikerbasque,
qubits (see Table VI in Ref. [11]). We observed also that and Basque Government for constant support. All authors
D-wave hybrid is remarkably fast, whereas tensor networks contributed to the generation of ideas, algorithm design, algo-
sometimes provide better portfolios at the expense of a longer rithm implementation, analysis of results, and writing of the
calculation time. To the best of our knowledge, our paper is the paper. The authors declare that there are no competing inter-
first application of VQE and TNs to solve a dynamic portfolio ests. The datasets generated during and/or analysed during the
optimization problem with real data. Moreover, our VQE- current study are available from the corresponding author on
constrained approach is also unique, as far as we know. Our a reasonable request. The code used during the current study
preprocessing of real data in order to fit the current capabilities is available from the corresponding author on a reasonable
of quantum processors is also novel in this context. request.

[1] H. Markowitz, Portfolio selection, J. Finance 7, 77 (1952). [7] R. Orús, S. Mugel, and E. Lizaso, Forecasting financial crashes
[2] R. Orús, S. Mugel, and E. Lizaso, Quantum computing for with quantum computing, Phys. Rev. A 99, 060301 (2019).
finance: Overview and prospects, Rev. Phys. 4, 100028 (2019). [8] Y. Ding, L. Lamata, J. D. Martin-Guerrero, E. Lizaso, S. Mugel,
[3] D. J. Egger, C. Gambella, J. Marecek, S. McFaddin, M. Xi Chen, R. Orús, E. Solano, and M. Sanz, Towards predic-
Mevissen, R. Raymond, A. Simonetto, S. Woerner, and E. tion of financial crashes with a D-wave quantum computer,
Yndurain, Quantum computing for finance: State-of-the-art and arXiv:1904.05808.
future prospects, IEEE Trans. Quantum Eng. 1, 1 (2020). [9] G. Rosenberg, Finding optimal arbitrage opportunities us-
[4] P. Rebentrost, B. Gupt, and T. R. Bromley, Quantum compu- ing a quantum annealer, White Paper at https://1qbit.com/
tational finance: Monte Carlo pricing of financial derivatives, whitepaper/arbitrage/.
Phys. Rev. A 98, 022321 (2018). [10] A. Milne, M. Rounds, and P. Goddard, Optimal feature selection
[5] N. Stamatopoulos, D. J. Egger, Y. Sun, C. Zoufal, R. Iten, N. in credit scoring and classification using a quantum annealer, in
Shen, and S. Woerner, Option pricing using quantum comput- High-Performance Computing in Finance: Problems, Methods,
ers, Quantum 4, 291 (2020). and Solutions (Chapman and Hall, London, 2018).
[6] A. Martin, B. Candelas, Á. Rodriguez-Rozas, J. D. Martin- [11] G. Rosenberg, P. Haghnegahdar, P. Goddard, P. Carr, K. Wu,
Guerrero, X. Chen, L. Lamata, R. Orús, E. Solano, and M. Sanz, and M. López De Prado, Solving the optimal trading trajectory
Towards pricing financial derivatives with an IBM quantum problem using a quantum annealer, IEEE J. Sel. Topics Signal
computer, Phys. Rev. Research 3, 013167 (2021). Process. 10, 1053 (2016).

013006-11
SAMUEL MUGEL et al. PHYSICAL REVIEW RESEARCH 4, 013006 (2022)

[12] M. López de Prado, Generalized optimal trading trajectories: [19] J. Preskill, Quantum computing in the NISQ era and beyond,
A financial quantum computing application, available at SSRN Quantum 2, 79 (2018).
https://ssrn.com/abstract=2575184. [20] M. Schuld, A. Bocharov, K. M. Svore, and N. Wiebe, Circuit-
[13] L. D.R. Beal, D. C. Hill, R. Abraham Martin, and J. D. centric quantum classifiers, Phys. Rev. A 101, 032308 (2020).
Hedengren, GEKKO optimization suite, Processes 6, 106 [21] V. Bergholm, J. Izaac, M. Schuld, C. Gogolin, M. S. Alam, S.
(2018),. Ahmed, J. M. Arrazola, C. Blank, A. Delgado, S. Jahangiri, et
N
[14] An obvious but nontrivial remark: imposing n=1 ω n,t  K al., Pennylane: Automatic differentiation of hybrid quantum-
instead, may actually produce portfolios with higher returns. classical computations, arXiv:1811.04968.
Notice also that K is the investment, and not the value of the [22] R. Orús, A practical introduction to tensor networks: Matrix
investment, e.g., K = 3 apples, not the value (e.g., in dollars) of product states and projected entangled pair states, Ann. Phys.
those 3 apples. (NY) 349, 117 (2014).
[15] A different splitting amounts to a rescaling of the op- [23] R. Orús, Tensor networks for complex quantum systems, Nat.
timal Lagrange multiplier ρ, without changing the actual Rev. Phys. 1, 538 (2019).
solution. [24] M. Fannes, B. Nachtergaele, and R. F. Werner, Finitely corre-
[16] F. Barahona, On the computational complexity of ising lated states on quantum spin chains, Commun. Math. Phys. 144,
spin glass models, J. Phys. A: Math. Gen. 15, 3241 443 (1992).
(1982). [25] See, e.g., https://en.wikipedia.org/wiki/Rate_of_return.
[17] E. Farhi, J. Goldstone, S. Gutmann, and M. Sipser, Quantum [26] All portfolio optimizers have been developed by the Multiverse
computation by adiabatic evolution, arXiv:quant-ph/0001106. Computing© team.
[18] A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, X.-Q. Zhou, [27] C. McGeoch and P. Farré, The D-wave advantage
P. J. Love, A. Aspuru-Guzik, and J. L. O’Brien, A varia- system: An overview, Technical Report available at
tional eigenvalue solver on a photonic quantum processor, Nat. https://www.dwavesys.com/media/s3qbjp3s/14-1049a-
Commun. 5, 4213 (2014). a_the_d-wave_advantage_system_an_overview.pdf.

013006-12

You might also like