#### Quantum Computing

# Quantum Risk Analysis

March 7, 2019 | Written by: Stefan Woerner and Daniel Egger

Categorized: IBM Research-Zurich | Publications | Quantum Computing

Share this post:

# Speeding up risk assessment through quantum algorithms

Using quantum algorithms, our team at IBM Research – Zurich has developed a new approach to analyzing risk that provides a significant increase in speed over established classical algorithms. One possible application could be in assessing risks in the financial sector, e.g. the risk associated with an investment portfolio. Our algorithm provides a quadratic speedup compared with Monte Carlo simulations. We ran and tested our algorithm on a small-scale problem using an IBM Q 5-qubit quantum computer located in Yorktown Heights, New York — the first time such a quantum algorithm has been run on real quantum hardware to perform a financial calculation.

In our paper, *Quantum Risk Analysis*, published in the current issue of the peer-reviewed journal *npj Quantum Information*, we show how amplitude estimation, a generic quantum algorithm, can be used to analyze financial risk in a manner that may outperform the state of the art classical algorithms once large enough quantum computers are available.

The current method of choice for performing risk analysis is Monte Carlo simulation. This classical method is useful when computing expectation values or risk measures of functions depending on random parameters. One use case consists in computing the risk associated with an investment portfolio containing a number of assets, the values of which are modeled using a large number of random variables. Monte Carlo simulations are routinely employed to compute frequently-used risk measures like the Value at Risk (VaR) or the Conditional Value at Risk (CVaR, also called Expected Shortfall).

The Monte Carlo method’s convergence rate (i.e.: the rate at which the desired accuracy is approached) scales as the inverse of the square root of the number of samples (one sample corresponds to one set of parameter values). In contrast, our quantum algorithm converges at a rate proportional to the inverse of the number of samples which represents a quadratic speed-up with respect to the Monte Carlo method.

Using Monte Carlo simulations, the risk assessment computation for large portfolios is often an overnight task. In the worst case, the computing time can even extend over days. The quadratic speedup provided by quantum computing may reduce calculation time from overnight to near-real time or from days to hours, respectively. Although it might take a few years until the hardware to realize this speed-up becomes available at the required scale, the potential impact would be enormous.

# Running the algorithm on real quantum hardware

We went on to show how our algorithm can be applied to the task of pricing an asset using real quantum hardware. We chose the simple model of a treasury bill whose value depends only on the interest rate. This simple experiment on 5 qubits confirmed the theoretical convergence rate of our algorithm and underlines its potential advantage compared to classical Monte Carlo methods.

In order to further demonstrate the capabilities of our algorithm, we used classical simulations of quantum hardware to show that it can also be applied to speed up the computation of risk measures of a simple two-asset portfolio. Nevertheless, we notice that to achieve quantum advantage in a real-world scenario, the quality of current quantum hardware needs to be improved. Errors arising from the limited coherence time and cross-talk when measuring the states of qubits need to be substantially suppressed. Furthermore, the number of qubits must be increased.

However, the current pace of advances in research directed at improving both quantum hardware and quantum algorithms makes us optimistic that real quantum advantage in risk analysis can be achieved in the future.

**Stefan Woerner**

Quantum Applications Research & Software Lead, IBM Quantum

**Daniel Egger**

IBM Research

### The Open Science Prize: Solve for SWAP gates and graph states

We're excited to announce the IBM Quantum Awards: Open Science Prize, an award totaling $100,000 for any person or team who can devise an open source solution to two important challenges at the forefront of quantum computing based on superconducting qubits: reducing gate errors, and measuring graph state fidelity.

### Undergraduates: Apply to be a quantum intern with IBM and Princeton University

IBM and Princeton University are delighted to announce that we are now accepting applications for the 2021 Quantum Undergraduate Research at IBM and Princeton (QURIP) internship program.

### Continuing the journey to frictionless quantum software: Qiskit Chemistry module & Gradients framework

We’ve taken another important step on our path towards frictionless quantum computing: A new release of Qiskit with a completely overhauled Qiskit Chemistry module, as well as a brand new Qiskit Gradients framework. Both enhancements pave the way for quantum application software that serves the needs of domain experts and quantum algorithm researchers.