Implications For Portfolio Managers: Quantum Computing
Implications For Portfolio Managers: Quantum Computing
Implications for
Portfolio Managers
Phil Goddard
It is illegal to make unauthorized copies of this article, forward to an unauthorized user or to post electronically without Publisher permission.
The Journal of Investing 2016.25.3:81-87. Downloaded from www.iijournals.com by NEW YORK UNIVERSITY on 08/31/16.
S
P hil Goddard ince 1965, when Gordon Moore pre- these computers might be used in general
is the head of research dicted that the number of transistors and, in particular, how they might be used
at 1QB Information
on a chip would double approximately to solve problems of commercial significance.
Technologies (1QBit)
in Vancouver, BC, Canada. every two years, the expectation has The expectation has been that quantum
phil.goddard@1qbit.com been that the physical size of transistors would computers will solve problems in orders of
reduce toward the size of a single atom. As magnitude less time than classical computers
a consequence, researchers began to think for a range of applications, including ones in
about the prospect of developing a computer machine learning and cognitive recognition,
based on the laws of quantum mechanics. operations research, and general optimization.
Over the last 20–30 years, numerous This prospect has significant implications in
research groups, including ones at Interna- computational finance for solving a broad
tional Business Machines (IBM), Microsoft range of problems, including those found
Corporation, and Google, have been working in portfolio analysis, market clique analysis,
toward the development of a quantum credit default analysis, and risk management.
computer. Research labs at major universities This article presents an overview of
are also working toward this goal, with some of the fundamental concepts of quantum
increasing amounts of public and corporate computation, along with its applicability to
money pouring into the field. solving high-value problems in computa-
In 2011, D-Wave Systems sold “the tional finance.
world’s first quantum computer” to Lockheed It also presents an overview of a formu-
Martin. Then, in 2013, they sold an upgraded lation for using existing quantum annealing
version to a consortium led by Google technology to solve a general portfolio opti-
and the National Aeronautics and Space mization problem. This formulation solves
Administration (NASA). In 2015, each of an optimal multiperiod portfolio optimiza-
those machines was upgraded to the latest tion problem, taking into account transaction
“D-Wave 2X” processor. (Undisclosed U.S. costs incurred when rebalancing across time
government agencies are also believed to be periods. Incorporated into the problem formu-
working with the D-Wave processors.) lation are permanent and temporary market
The majority of the research to date has impacts and forecasts of expected future risk
been focused on the development of hardware and return. This formulation provides, over
required to support the creation and control a multiperiod time horizon, a more optimal
of quantum computation bits, called qubits. portfolio than using a series of single time-
Until recently, little work has focused on how step optimal portfolios as is often done today.
computations performed using qubits to search all pos- the shortest round-trip path between a set of cities.
sible solutions to a given problem (i.e., all possible combi- Finding the optimal travel distance requires evaluating
nations of qubits) simultaneously. This process compares the distance of every possible path between all cities and
with that of a classical computer, which, in order to then selecting the minimum solution. In comparison,
exhaustively search a solution space, must check all pos- since a quantum computer can evaluate all possible path
sible combinations of digital bits, often in series. As the combinations simultaneously, the optimal minimum
problem space increases, the advantage of quantum com- solution may be determined in one computation.
puting over digital computing becomes more apparent. The traveling salesman problem is very closely
Consider a simplified case of finding the minimum related to the optimal multiperiod portfolio construction
value of an optimization problem in which there are problem (discussed in the next section). Given a universe
16 possible combinations of binary variables. (One of the of assets and a forecast of expected return and vola-
16 combinations corresponds to the optimal solution.) tility, and taking into account trading costs (including
This is called a combinatorial optimization problem and permanent and temporary market impact), all possible
is the type of problem that quantum computers are par- combinations of investments must be evaluated to deter-
ticularly good at solving. mine the most profitable strategy. Nominally, this can be
To encode this problem requires four variables, achieved in one computation using a quantum computer.
which may be achieved using either 4 bits (on a clas-
sical computer) or 4 qubits (on a quantum computer).
The State of Quantum Computing
Exhibit 1 shows all possible combinations of those bits
Technology
or qubits. Although the required number of bits/qubits is
the same on a classical and on a quantum computer, the Broadly speaking, there are two quantum com-
number of operations required to find the best solution puting paradigms: adiabatic quantum annealing,1 and
is very different. gate-model quantum computing—sometimes called
To find the best solution on a classical computer universal quantum computing.
would require all 16 combinations to be checked, typi-
cally in series. Alternatively, on a quantum computer,
since the qubits are in a superposition of both 0 and 1, Exhibit 2
all 16 combinations may be checked simultaneously. Travelling Salesman Problem
Exhibit 1
All Possible Combinations of a 4-Variable
(16-State) Problem
In comparison, the quantum annealing approach quantum computers is very much in its infancy. To a
is suitable only for solving specific types of optimiza- large extent, using a quantum computer today is similar
tion problems. Nonetheless, a 1,152-qubit processor that to using a classical computer 40+ years ago. Specialized
uses the quantum annealing approach is commercially expertise is required to write software to translate gen-
available today. In 2011, D-Wave Systems supplied its eral optimization problems into a format solvable by a
first 128-qubit quantum annealer to Lockheed Martin. quantum computer. This may mean programming at
Then, in 2013, D-Wave released a 512-qubit processor the machine language level (see Exhibit 3) rather than
that was acquired by a joint Google and NASA consor- using a high-level language.
tium. Both of those processors were upgraded in 2015 to Setting up the problem and tuning the input
D-Wave’s latest 1,152-qubit annealer. Conceptually, this parameters is a nontrivial and time-consuming task,
means that a problem with 21152 (approximately 10350 ) which requires intimate knowledge of the underlying
binary variables can be solved in one calculation.2 mathematics of the problem being solved and the char-
Initially greeted with skepticism, each new release acteristics of the quantum annealer.
of a D-Wave processor has resulted in much debate as The 1QBit software development kit (SDK)
to whether there are quantum effects taking place in (1QBit [2016]) provides a set of software tools that allow
the annealing process and, if there are, whether they developers to experiment with using a quantum com-
contribute to any computational speedup. However, puter without needing to understand the details of, or
in 2015, Google released results indicating a 108 times the underlying physics of, the annealing processor.
speedup over classical computations for a very specific Implemented using C++ and Python, the SDK
type of optimization problem (Denchev et al. [2015]). allows users to access the latest heuristics designed for
Results for more general optimization problems are cur- solving certain types of optimization problems and to
rently being evaluated. build quantum-ready applications, without needing to
One of the most signif icant technical issues learn new software languages or become an expert in
impeding the development of quantum computers is quantum processor design. In the near future, this SDK is
the presence of noise. Taking the form of thermal, elec- expected to be available to access the quantum annealer
trical, and/or magnetic interference, the more noise that through the cloud, allowing optimization problems to
a processor is subjected to, the less likely it is to arrive at be solved remotely.
a satisfactory solution to any optimization problem. To
eliminate thermal noise, the quantum annealer operates
at temperatures in the 12–17 milliKelvin range, that is, Exhibit 3
12–17 thousandths of a degree above absolute zero— Interfacing with Computational Hardware
several orders of magnitude colder than interstellar
space. The annealer is also housed in a series of enclo-
sures that provides extreme shielding from electrical and
magnetic interference.
Working with a classical computer is now so simple
that users give little or no thought to the underlying
imum. In general, however, the landscape will contain invertible matrix. An additional advantage of quantum
many hills and valleys. This uneven landscape makes annealing is that no assumption on the invertibility of
finding a global minimum more difficult. Q is required.
Consider the curve shown in Exhibit 4, where the Equation 1 looks very much like the standard
goal is to find the global minimum of the curve. Assuming Markowitz mean–variance single-period portfolio opti-
an initial starting location in the top left-hand corner, a mization problem, where x represents the weights of
traditional gradient-based optimization algorithm would each investment, and Q is a covariance matrix. Yet, there
search for a minimum by moving down the curve and are some important differences. Firstly, the variables are
would find, then get stuck at, the local minimum. binary (cf. being real valued in the Markowitz case);
For certain types of optimization problems, secondly, there is no assumption on Q being positive
quantum annealing is believed to have an advantage over definite; and lastly, there can be no constraints placed
traditional optimizers, a notion attributable to a phenom- on the variables.
enon called quantum tunnelling. Quantum tunnelling The process of transforming a generic (real-valued,
allows an optimizer to more easily search the entire solu- with constraints) optimization problem into the QUBO
tion space of the optimization problem, thereby having form required to solve it using a quantum annealer is
a higher probability of finding the optimal minimum not trivial. It requires a good understanding of how
solution. to effectively embed the problem into the annealing
In the case shown in Exhibit 4, upon reaching chip and then tune the parameters to achieve the best
the local minimum, quantum tunnelling would performance. This transformation is one of the compo-
nents that is built into 1QBit’s SDK; it removes the need
for users to understand the complexities of the embed-
ding task while retaining the benefit of using the
Exhibit 4 quantum annealer.
A General Optimization Landscape
AN OPTIMAL MULTIPERIOD
TRADING TRAJECTORY
Given a forecast of expected future returns and may be found by calculating the return of all possible tra-
the risk of each asset at each time step, an asset manager jectories and selecting the one that provides the greatest
The Journal of Investing 2016.25.3:81-87. Downloaded from www.iijournals.com by NEW YORK UNIVERSITY on 08/31/16.
must decide how much to invest in each asset, at each return. Hence, after some suitable modifications, it is
time step, while accounting for transaction costs. This amenable to being solved using a quantum annealer.
process forms a trajectory through time that the asset The weights derived from a traditional mean–
manager should follow to maximize portfolio returns. variance portfolio optimization problem are continuous,
In general, the transaction costs should include not only that is, the weights will take on decimal values. For
the up-front immediate cost of buying or selling an asset, assets that can only be traded in large lots, or for asset
but also any permanent or temporary impacts that that managers who are constrained to trading large discrete
transaction may have on market prices. blocks of assets, however, solving the continuous-weight
A naïve approach to this problem is to solve for the problem, then rounding to the nearest integer block size
mean–variance portfolio that maximizes the expected (as is often done today), leads to a suboptimal approxi-
return subject to a level of risk at each time step. The mation. In this case, solving a discrete version of the
resulting portfolios form a set in which each portfolio problem, that is, in which the weights are constrained
is locally optimal at a given point in time. to have only integer values, is likely to lead to a better
Still, this approach fails to account for rebalancing trajectory of portfolios.
costs. This means that it is highly likely that there will Examples in which a discrete solution are required
are (a) when an institutional investor is limited to trading
even lots owing to a prohibitive premium on trading odd
Exhibit 5 lots, or (b) when an asset manager invests in baskets that
A Discrete Multiperiod Trading Strategy trade only in integer lots such as ETF-creation and ETF-
redemption baskets, which trade only in large multiples,
such as fund units of 100,000 shares each.
The discrete problem is nonconvex because of the
fragmented nature of the solution domain and is there-
fore much harder to solve than the traditional continuous
weight problem. Hence, there are advantages to using a
quantum annealer for determining an optimal solution.
Another advantage of using a quantum annealer
is that, in general, the covariance matrix describing
the relationship between the universe of assets may be
ill-conditioned, or degenerate. This condition would
typically cause traditional optimizers to fail. How-
ever, ill-conditioning, or degeneracy, does not pose a
problem when solving the optimization problem using
the quantum annealer.
Before solving optimal trading trajectory prob-
lems using the quantum annealer, the variables must
be converted from the discrete integer formulation of
computer, to obtain a good solution using a quantum mercially valuable problems using techniques from the
annealer requires a good understanding of how to trans- fields of machine learning, operations research, and opti-
form a general problem into the format required by the mization. Through this work, they are laying the ground-
hardware. There are multiple hardware settings that can work for solving high-value problems in computational
be tuned—all of which affect the quality of the result— finance, including portfolio and risk management.
and multiple ways of embedding the problem into the This article has presented an overview of some of
chip (i.e., utilizing the qubits in the most efficient way) the key concepts and opportunities in quantum com-
that affect the size of the problem that can be solved. puting, and applied them to solve a multiperiod port-
See Rosenberg et al. [2016] for a detailed discussion of folio optimization problem. Although the size of the
the effect of these settings and a range of results. portfolio optimization problem currently solvable is
Exhibit 6 shows a small but representative sample small (in terms of the number of investable assets, time
of the results from Rosenberg et al. [2016]. Here, N is horizon, and investable units that can be handled), the
the number of assets in the universe, T is the number formulation presented holds for very generic and large-
of time periods under consideration, K is the number scale problems. Importantly, it allows temporary and/
of units that must be invested at each time period, and or permanent market impacts to be incorporated in the
S(α) is the success rate, where success is measured as optimization when large blocks of assets must be traded.
being within α % of the optimal solution. Today, it is possible to write algorithms that can be
It is important to note with these solutions that the solved using state-of-the-art classical computers, but are
quantum annealer is a heuristic solver. That is, it is not ready—by the simple f lick of a (software) switch—to be
guaranteed to give the optimal solution and may give a solved by a quantum computer. As quantum computing
(slightly) different answer each time the same problem technology improves in the near future, it is expected
is solved. Hence, each problem is solved multiple times that it will revolutionize the way that optimization is
(in this case 200 times) and the solution that is attained performed in computational finance.
the most frequently is taken as the final solution.
As shown in Exhibit 6, existing quantum annealing ENDNOTES
technology allows only small problems—that is, a
1
small number of assets, time periods, and units to be Annealing is named after the process of heating and
invested—to be solved. Yet, it demonstrates that existing subsequent slow cooling of a material, typically a metal, in
an attempt to preserve certain properties, such as strength,
by reducing internal stresses on the atoms that make up the
Exhibit 6 material.
2
Accuracy of Calculated Portfolios By comparison, there are approximately only 10 80
atoms believed to exist in the known universe.
3
For problems of this size, the optimal solution may be
calculated on a classical computer using an exhaustive search
of all possible trajectories. For testing purposes, the solution
obtained by the quantum annealer can then be compared with
the known optimal solution.
.wss#release.
The Journal of Investing 2016.25.3:81-87. Downloaded from www.iijournals.com by NEW YORK UNIVERSITY on 08/31/16.