Quantum Computing and Finance: Evolution or Revolution?

Quantum Computing in Finances
Spread the love

Modern Finance has always been closely linked to the evolution of IT, Telecommunications and Financial Mathematics. Artificial Intelligence and Machine Learning are currently profoundly changing the banking and insurance business, in parallel with their accelerated digitization in recent years.

Will Quantum Computing, the new kid in the IT block, be a paradigm shift for the world of banking and financial institutions?

For a few years, financial institutions like Caixa Bank, Barclays, Morgan Stanley, Goldman Sachs or BBVA have been investing heavily in quantum algorithms with dedicated teams and partnerships with universities and startups.

What may be the impact of Quantum Computing on the Finance field, beside post-quantum cryptography and QKD (Quantum Key Distribution) security protocol — which are not the subject of this article ? Revolution or evolution?

It all started in the 1970s with the advent of derivatives based on the famous Black-Scholes-Merton formula, followed by a multitude of mathematical methods and algorithms designed to calculate the prices of these products and the associated risks.

Derivatives are financial tools, often considered as speculation tools on the evolution of exchange rates, stocks, indices or commodities. They are not directly associated with any tangible property but with some kind of intangible contract between two or more parties. In general, their value depends on one or more underlying assets. Speculative interest is linked to leverage effect: the underlying asset is not owned but it’s possible to speculate on the upward or downward trend in its value. Options are the most widely known derivative products.

An option is a contract that gives the buyer (the owner or the holder of the option) the right, but not the obligation, to buy or sell an underlying asset or instrument at a specific price before or on a specified date, depending on the form of the option. The exercice (or strike) price can be set by reference to the spot price (market price) of the underlying security or commodity on the day an option is purchased, or it can be set at a discount or premium. The seller has the corresponding obligation to complete the transaction – sell or buy – if the buyer (the owner) strikes the option. An option that gives the owner the right to buy at a specific price is called a call; an option that gives the owner the right to sell at a specific price is called a put.

In the 80s, highly powerful computers were needed to calculate the valuations of derivatives. Large companies therefore had a major competitive advantage. Before the 2008 subprime crisis, the volume of derivatives trading was close to $1 billion a day. This major financial crisis and the resounding bankruptcy of Lehman Brothers killed the (false) belief of infinite liquidity. The dramatic fall of many banks showed that hedging of a derivative transaction could only be perfect as long as the counterparties remained solvent. The world of finance understood (learned?) so painfully that there was a risk in derivatives and that free markets did not self-regulate. The revealed reality was far from what traders learned from school books.

After the crisis, the financial world got a better understanding of risks and set up barriers to limit the market manipulations made possible by automated trading.

Automated trading is a method of executing orders using preprogrammed and automated trading instructions that take into account variables such as time, price and volume in order to send small slices of orders to market over time. These methods have been developed so that traders do not need to constantly monitor an action or a bond and send these orders manually several times. Automated trading is widely used by investment banks, pension funds, mutual funds and hedge funds because they have to execute large orders in markets that cannot always support all such volumes at once. This term is also known to denote algorithmic trading or black box trading. These strategies include trading strategies that are highly dependent on complex mathematical formulas and computer programs that run on high performance computers (HPC).

Automated trading has evolved into High Frequency Trading (HFT) which is a type of automated algorithmic trading characterized by very fast operations which rely on financial data captured (sampled) and analyzed at high frequency. HFT can be considered as one of the main forms of algorithmic trading. It is based on the use of sophisticated technological tools and computer algorithms to quickly trade securities. The HFT uses trading strategies often specific to each financial institution and allows it to move into positions in seconds or fractions of a second.

Has the lesson been learned hard enough by the wolves of international finance? Is automated trading sufficiently controlled and supervised? The point here is not to assess whether international laws and regulations correctly fulfill their control missions, but it must be noted that automated trading has grown a lot since 2008.

Any impact by Quantum Computing?

The idea of using physics in financial engineering is not a new one. It is not uncommon to find good old physicists in the quantitative analysis teams of the most renowned financial institutions. Many financial problems can be expressed directly in forms of quantum physics equations. The famous Black-Scholes-Merton financial formula can be read in the spirit of the Schrödinger’s equation, so beloved by physicists.

Quantitative analysis is an area of applied mathematics that deals with the mathematical modeling of financial markets. In general, financial mathematics uses mathematical models which are not necessarily related to financial or economic theories. A financial analyst studies the structural reasons why a company may have a certain stock price. A financial mathematician can simply take the stock price as a data and try to use stochastic calculation to obtain the valuation (pricing) options on this share.

Many financial problems can be reduced to optimization-type problems. But there are also complex risk analysis problems such as VaR (Value at Risk) and CVaR (Conditional Value at Risk). VaR is a statistical measure of the potential losses of a portfolio and therefore of the associated risk. The CVaR is linked to the expected loss of a portfolio for losses greater than the VaR. Taking CVaR into account is more conservative in terms of risk than VaR.

Financial, market-related and economic data are overly complex. Their deep analysis does not necessarily lead to more accurate predictions given this complexity and all the possible and intrinsic correlations.

In other words, the use of Quantum Computing is unlikely to reduce the uncertainty and the hazards of the markets.

Just remember that the 2008 Crash was largely due to the automated extrapolation of past performance from loan-like assets though the reality of subprime mortgage loans in 2007 was far more toxic.

The financial community faces to many problems that have no known analytical solution and are, on the contrary, of great algorithmic and IT complexity. Even worse, they are slowly converging to a solution on conventional computers. In particular, the fast evolution of the markets generates additional complexity for the valuation of options.

The main evolution lies in the calculation time required because the quantum computer offers (sometimes) an exponential or (often) a quadratic acceleration for certain algorithms used in Finance such as Monte-Carlo simulations (risk assessment, uncertainty and valuation of derivatives).

Monte-Carlo Simulations

Monte-Carlo method allows to estimate in a stochastic way (on the basis of Markov chains) the properties of a system, by statistical sampling of the states of the system. It is a methodology widely used in physics, chemistry and engineering.

In Finance, the stochastic approach is generally used to simulate the effect of uncertainties that affect a financial asset like a stock, an option or a portfolio of securities. Monte-Carlo-type methods are thus applicable to portfolio valuation, profit and profitability forecasts, risk assessment, optimization of invested capital, hedging strategies and calculation of prices of derivatives and options.

Monte-Carlo-type algorithms need a random generator of the highest possible quality in order to avoid any correlation that could lead to undesirable results. It has been one of the very first applications of Quantum in Finance thanks to Quantum Random Number Generators (QRNG).

Consider that we want to sample a statistical distribution with a given variance and mean.

The Law of large numbers establishes (Chebyshev inequality) that it suffices to take k samples (k being a function of the variance and the desired error rate squared) to estimate the mean. However, if the distribution has a large variance or you need a very small error, the number of samples which is needed can become huge.

Researchers have demonstrated that quantum algorithms can reduce the number of samples k in a quadratic fashion, a function of the variance and the error rate. Several quantum methods and algorithms have emerged: Variational Monte Carlo (VMC) or Diffusion Monte Carlo (DMC), Gaussian Quantum, Path Integral Ground State, Reputation, etc.

In the case of Monte-Carlo, quantum algorithms will hence allow to work with much less data (samples) and to typically gain 3 decades for the number of samples. Decision-making based on Monte-Carlo can be a matter of par real-time instead of overnight batch process. In addition to this improved reactivity in the face of ever-increasing market volatility, it is clear that the possibility of launching simulations or optimizations more often and faster allows better allocation of available capital. However, Monte Carlo-type simulations are more effective in the case of bonds or interest rate strategies than with stocks or options.

NP-complete problems

In Finance, some problems are considered NP-complete, that is to say that they can only be solved using heuristic methods or approximation algorithms.

For this class of problems, it is possible to check a solution in a polynomial time but there is no known method to find the solution(s), except in brute force. The latter method is generally impractical as soon as the size of the problem increases. The traveling salesman problem is a classic one.

With the exception of a few rare algorithms, and despite what can be read on the Net, the quantum computer is not able to solve NP-complete problems in polynomial time.

However, algorithms such as the Variational Quantum Eigensolver (VQE) and the Quantum Approximate Optimization Algorithm (QAOA) are designed to solve quadratic Unconstrained Binary Optimization (QUBO) problems. There are also many other relevant problems like Mixed Binary Optimization (MBO), with discrete and / or continuous variables, or with constraints which cannot be modeled within the framework of a QUBO problem. , eg. with inequality constraints. Quantum computers have been shown to outperform conventional computers for this type of calculation.

Some examples of financial applications

Here are some examples of financial problems that can (may) find optimizations thanks to Quantum Computing.
We specify “may” because in general it is necessary to have much more logical qubits than NISQ quantum computers today offer.

Asset portfolio optimization

Any Asset Manager has the following questions in mind: which assets should I choose to build an optimal portfolio? How to change the composition of my portfolio in relation to market developments? How to detect new opportunities? How to estimate the risk and the return of my portfolio or one of its assets?

One approach is to find out which asset portfolio minimizes the risk for a given return. Or for a given risk, the portfolio that maximizes the return.

One of the greatest classic problems in financial mathematics, known as the quadratic (and not linear) programming problem, is the optimal allocation of given capital to a set of assets. The goal is to find the best risk / return combination for a given portfolio and with specific constraints. That is also related to the optimization of the mean-variance.

Several theoretical algorithms exist but their applications in the real world come up against important practical concerns and issues.

In most of the possible algorithms, it is necessary to reverse a covariance matrix linked to data as uncertain as the markets. Another solution based on the concept of risk parity (Inverse-Variance Parity – IVP) makes it possible to get rid of the covariance matrix between assets and to work only on the variance of each asset. However, it is still mandatory to appreciate the correlations between the assets.

One of the possible algorithms consists in using a hierarchical classification tree (Hierarchical Risk Parity – HRP) based on the covariance matrix of asset returns. The approach revolves around the notion of a hierarchical structure of assets: a share behaves differently than a bond, a share of a telecom operator differently than one of a small luxury goods company, etc.

It is the role of the correlation matrix to express the differences between assets. It is then possible to dynamically group assets into the form of clusters, the hierarchical structure of the tree. When assets are similar, they are grouped in the same cluster. Two similar clusters can also be confined to form a new cluster. Then, weights can be attributed to each cluster from the variance of each contained cluster and the covariance matrix.

A quantum version of the HRP algorithm exists (QHRP) and turns out to be an NP-complex problem which can be expressed in the form of a QUBO type problem.

This method has been successfully tested on a small typical portfolio of around fifty commodity assets (oil, wheat, gold, stocks, bonds) with low correlation and on the 30 (variable) stocks that make up the Dow Jones Industrial Average (DJIA) index with strong correlation.

These tests of the QHRP algorithm have shown that it is more efficient in asset allocation than conventional methods (minimum variance or MV, IVP, HRP). For example, the annualized volatility via the MV method was found to be three times higher than one using the QHRP method.

Arbitrage

Arbitrage is a generic term used in Finance to represent a choice between different means of generating a profit on the same asset whose price is different on different markets.

For example, it is possible that the following exchange transaction generates a profit, even a small one, net of transaction costs: conversion of dollars (USD) into Swiss Francs (CHF), then conversion of CHF into Euros (EUR), then conversion from EUR to USD.

Mathematical modeling to find at least one arbitrage opportunity is well known and relies on Graph Theory. The Bellman-Ford and Floyd-Warshall algorithms solve these problems with polynomial complexity.

On the other hand, finding the best arbitrage opportunity, the one that generates the largest profit, turns out to be much more difficult because it is an NP-complete type problem with exponential and not polynomial resolution. Quantum-Annealing, advocated by D-Wave, fits very well to this type of problem thanks to VQE and QUBO type algorithms.

Swaps

A swap is a contract to exchange financial flows on specific dates according to a particular framework. For example, the process of clearing a swap between Counterparty A and Counterparty B corresponds to the transformation of the initial contract into two separate contracts: one between Counterparty A and the clearer, the other between the clearer and the Counterparty B. Thus, the clearing agent protects each of the counterparties from any risk of default by the other. The clearing agent holds the collateral of the two counterparties, valued according to the gross value of the underlyings.

Sometimes the clearing agent has to guarantee financial flows for very long periods (up to thirty years).

Therefore the clearing agent can “net” part or all of the financial flows in order to reduce its risk exposure. Counterparties will thus be able to resume the use of the capital which was immobilized in margin accounts.

The simplest form of netting is to compensate for identical flows but it is also possible to compensate for distinct flows (chains of flows) even if there is a small residual amount.

It may also be relevant to combine the compensation of several flows with different economic terms, for example some with fixed interest rates, others with variable or indexed interest rates, or even the two types combined for the same contract.

Finding these combinations of netting obviously allows optimal use of available capital.

Quantum-Annealing can also be applied to this type of problem using QUBO.

Commodities

The commodities market is also a very interesting field of applications for Quantum Computing.

The commodity trade is often based on time segments of 3, 6 or 12 months, with complexity and duration which do not facilitate arbitration cycles and the detection of the best arbitration.

In particular, the crude oil and gas markets are very dynamic and involve complex buying / selling and price hedging strategies.

Generally, the trading companies use hedging tools such as futures, options, swaps, etc. When the market is bullish, they use call options to protect themselves from the rise in price. If, on the contrary, the market is bearish, they use put options.

Quantitative analysis used algorithms for calculating or estimating the implied volatility (IV) of an option contract based on Monte-Carlo type simulations and the famous Black-Scholes-Merton model. Predictive analytics and derivative price models are used daily but come up against the large size of the data models or the computation time limits imposed by market dynamics.

These algorithms have been implemented with some success in Quantum Computing which suggests gains in efficiency and responsiveness in these markets in the near future.

Credit scoring

Wrong allocation of loans to companies or persons is one of the major causes of losses or even failures of financial institutions. Experts agree that 2% of granted loans, all categories combined, are in default. However, in the USA, around 40% of personal loans are refused.

Credit scoring is therefore a key success factor for banks and credit organizations.

Some credit scoring problems are of the QUBO-type and are better resolved with Quantum Computing than with the classical methods of regressions, decision trees, neural networks or classifiers.

And next?

Several large international banks already have teams working on these concepts of quantum algorithms in collaboration with expert companies such as IBM, Ernst & Young, D-Wave or specialized startups.

Their goal is to understand the future potential of Quantum Computing, to work on these specific algorithms, to identify different technologies and to create links with labs and startups.

The best way to learn (the famous learning curve) is to build use cases and PoCs. Experimentation is the key. Programming a quantum computer is unlike anything one already knows

The first companies which adopt these new technologies will have key advantages as soon as Quantum Computing takes the next step, after NISQ-type computers, i.e. with fault-tolerant quantum systems with thousands of qubits.

Voltanode – Copyright 2020