Quantum and Finance: The Quantum

David Orrell Introduction

Quantum economics and finance uses quantum mathematics to model phenomena including cognition, financial transactions, and the dynamics of and credit

This talk develops a framework for modelling financial decisions that is based on quantum probability

We sketch a model for pricing of financial options that includes both cognitive effects, and the dynamics of

Outline:

- Quantum probability - Applications in finance and cognition - Quantizing transactions - Option with supply and demand Quantum probability Niels Bohr: “If quantum Richard Feynman: “I think I : “You don’t understand hasn’t profoundly can safely say that nobody mechanics, you just get used shocked you, you haven’t understands quantum to it” understood it yet” mechanics” https://uwaterloo.ca/institute-for-quantum-computing/quantum-computing-101

Modelling propensity Superposition 0 = ȁ1ۧ 1

Superposed state 1 1 1 1 = Probability of Tails is the ȁ0ۧ + ȁ1ۧ squared amplitude of T1 2 2 2 1

1 = ȁ0ۧ 0 Probability of Heads is the squared amplitude of H1

Classical: 1-norm, options are heads OR tails Quantum: 2-norm, superposition state, heads AND tails Negative probability

−1 1 1 −1 = ȁ0ۧ + ȁ1ۧ 2 2 2 1

Need to allow complex coefficients for roots

Switching from a 1-norm to a 2-norm leads to concepts of superposition, negative probability, interference, and entanglement Interference

1 1 1 퐻 = 2 1 −1

1 1 1 퐻 = 2 1 0

Hadamard transformation rotates clockwise by 45 degrees

The superposed Heads/Tails coin becomes Heads Entanglement

Two coins requires a 4-dimensional graph

Coefficients can also be complex

Quantum coins can be entangled, so e.g. only have HH or TT Quantum computers are based on qubits which are in a superposed state

ۄor ȁ1 ۄmeasured as ȁ0 ,ۄQubits usually initialised to ȁ0

IBM Q 53 qb Logic gates are represented by unitary matrices which act on qubits

0 1 푋 = NOT X 1 0 0 1 1 0 ۄȁ1 = = = ۄ푋ȁ0 1 0 0 1

1 1 1 퐻 = Hadamard H 2 1 −1 1 1 1 1 1 1 1 ۄȁ1 + ۄȁ0 = = = ۄ퐻ȁ0 2 1 −1 0 2 1 2

cos 휃 −sin 휃 푅 = Rotation 푅 휃 sin 휃 cos 휃 휃 cos 휃 −sin 휃 1 cos 휃 ۄsin 휃 ȁ1 + ۄcos 휃 ȁ0 = = = ۄ푅 ȁ0 휃 sin 휃 cos 휃 0 sin 휃 Multiple qubits

1 푏1 푎1푏1 푎1 1 1 푎1 푏 푏 푎 푏 2 1 = 2 = 1 ⊗ 0 = ⊗ = ۄȁ00 0 0 0 푎2 푏2 푏1 푎2푏1 푎2 0 0 푏2 푎2푏2 1 0 1 = ⊗ = ۄȁ01 0 1 0 0 0 1 1 0 = ⊗ = ۄȁ10 0 0 1 Computational 0 basis vectors 0 0 0 0 = ⊗ = ۄȁ11 1 1 0 1 The C-NOT gate flips the state of the lower qubit depending on the state of the upper control qubit

Can be used to create an entangled state

1 0 0 0 0 ۄȁ00 = ۄ푋 = 1 0 0 푋 ȁ00 푐 0 0 0 1 푐 0 0 1 0 ۄȁ01 = ۄ푋푐ȁ01

ۄȁ11 = ۄ푋푐ȁ10

ۄȁ10 = ۄ푋푐ȁ11

A state 휓 is entangled if it does not factor as a tensor product: is not entangled, but ۄ푏ȁ1 + ۄ푎ȁ0 ⨂ۄȁ0 = ۄ푏ȁ01 + ۄ휓1 = 푎ȁ00 is entangled ۄ푏ȁ11 + ۄ휓2 = 푎ȁ00 The Toffoli gate flips the state of the upper qubit depending on the state of the two control qubits

The C-NOT gate flips the NOT gate flips the qubit state of the upper qubit depending on the state of the lower control qubit Some applications A useful circuit

cos 휃 −sin 휃 푅 = 휃 sin 휃 cos 휃 Quantum money

Early quantum computer

Graphics from Instant Economics rotate 휃 = 45° might default RA

collects RB rotate 휑 = 90°

Creditor assumes no default Debtor defaults Creditor collects Probability Debtor defaults if top qubit is 1 Yes sin2 휃 = 0.5 No cos2 휃 = 0.5 Creditor paid if bottom qubit is 1 Yes sin2 휑 = 1

2 Both can’t happen at the same time! No cos 휑 = 0 C-NOT gate flips lower qubit depending on state of upper control qubit

RA

RB

If the top qubit is 1 (so default), the bottom qubit is flipped to 0 Debtor defaults Creditor collects Probability Yes Yes 0 If the top qubit is 0 (so no default), No Yes cos2 휃 = 0.5 the bottom qubit remains as 1 Yes No sin2 휃 = 0.5 Financial entanglement! No No 0 To default, or not to default

The debt circuit is quantum because the of the debt depends on debtor who is modelled as being in a superposed, undecided state

Can model cognition using the same circuit – decisions depend on subjective context

John Barrymore as Hamlet (1922) : the disjunction effect

Experiment from Tversky and Shafir (1992):

Students are told to imagine that they have a tough exam coming up, and have an opportunity to buy a vacation to Hawaii at a very good – would they take the offer?

In one version, they were told the result of the exam

If the result was pass, 54% chose to buy

If the result was fail, 57% chose to buy

In another version, they were told they will not know the result

In this case only 32% chose to buy

Context creates mental interference! Uncertain

Equal chance Adjust for of pass or fail chance to buy

RA

Single qubit represents state Vacation Probability Yes cos2 휃 − 휑 = 0.33 Test result is not measured No sin2 휃 − 휑 = 0.67

What if we want to measure the test result first? Independent

RA Test yes/no

Buy yes/no RB

Top qubit represents probability of Test Vacation Probability passing or failing the test Pass cos2 휃 = 0.50 Fail sin2 휃 = 0.50 Bottom qubit adjusts for probability Yes cos2 휑 = 0.97 of decision to buy vacation No sin2 휑 = 0.03 Coupled

RA

RB

Entangles context with decision Test Vacation Probability Pass Yes cos2 휃 cos2 휑 = 0.48 Used rotations, but works for any Pass No cos2 휃 sin2 휑 = 0.02 pair of quantum gates Fail Yes sin2 휃 sin2 휑 = 0.02 Fail No sin2 휃 cos2 휑 = 0.48 Quantum : the prisoner’s dilemma

A strategy B strategy A sentence B sentence silent silent 1 1

silent testify 3 0

testify silent 0 3 Nash equilibrium

testify testify 2 2 Cold War

The mathematician John von Neumann, who invented the theory of expected (as well as ), served as advisor to President Eisenhower on the use of the bomb

He used this result from game theory to argue in favour of the first strike doctrine

After the Soviets developed their own weapons, the strategy morphed to one of mutually assured destruction – or MAD

Binary logic led us to the brink of nuclear war – mathematical models scale up!

Experiments: 10% defect if other person’s strategy is known, rises to 37% if not known Without entanglement

Other strategy RA

Own strategy RB

Top qubit A represents a person’s subjective beliefs about what another player will do

Bottom qubit B represents the person’s own strategy With entanglement

RA

RB

Experiments: 10% defect if other person’s strategy is known, rises to 37% if not known

Agrees with quarter law, which is an empirically-tested result from quantum cognition (Yukalov & Sornette, 2018) Quantum agent-based model

MomentumRA

FundamentalRB

Entanglement for single agent This is your brain on

ContextRA Corpus callosum severed

RationalRB

Context can represent the state of mind of a debtor (credit circuit), a preceding event (disjunction effect/order effect), presumed beliefs about another person (prisoner’s dilemma), or any subjective factor

Here it has no effect on the decision or the outcome This is your brain on quantum economics

ContextRA

Aha moment!

RationalRB

Right hemisphere “sees each thing in its context” (McGilchrist, 2009: 49)

In model, the change in perspective is a consequence of the shift from utility to probabilistic propensity, which produces entanglement This is two brains on quantum economics

Context

Rational

Context

Rational This is a computer on quantum AI

Kondratyev (2020) Non-Differentiable Learning of Born Machine with Genetic Algorithm What does entanglement mean?

Modelling choice: follows because we represent mental states or strategies as a superposition (qubit), rather than a binary choice (bit)

In finance entanglement represents a contract, in quantum cognition it typically represents the connection between objective and subjective factors, in game theory it is used to model things like societal norms

One paper concludes that quantum games “produce counter-intuitive outcomes such as a greater prevalence of altruism than in the classical game” ??? Wave splitter Decision

Context

Sequential

A+, A−

Entangled

B+, B−

Controlled gate plays role similar to a sequential IF-THEN statement, but without collapsing the qubit EVENTS 퐴+퐵+ 퐴+퐵− 퐴−퐵+ 퐴−퐵−

Result State ȁ00ۧ ȁ01ۧ ȁ10ۧ ȁ11ۧ

2 2 2 2 Probability 푎11푏11 푎11푏21 푎21푏12 푎21푏22 But why quantum?

Anti-cancer drugs show order effect (the order in which drugs are administered is very important), threshold effects (a minimum level of drug may be needed to have an effect), holism (connected system), interference (drug combinations can be synergistic or antagonistic), and are ultimately based on quantum processes (like everything else) but we don’t model them as quantum systems Reasons to be quantum

Quantum finance:

“The evolution into a superposition of financial states and their measurement by transaction is my understanding of .” Schaden (2002)

“It is the random time evolution of financial instruments that provides the crucial and far-reaching connection with quantum theory.” Baaquie (2004)

“Every transaction in financial markets is in fact an elementary act of price measurement.” Sarkissian (2020)

Quantum-like:

“Our basic premise is that information processing by complex social systems can be described by the mathematical apparatus of quantum mechanics.” Haven & Khrennikov (2013)

Quantum consciousness:

“I argue that human beings and therefore social life exhibit quantum coherence – in effect, that we are walking wave functions.” Wendt (2015)

Quantum computing:

A “could be deployed in days. And given the scale of the markets, even a tiny advantage could be worth a great deal of cash.” (, 2020) Money objects

The money system is a designed social technology which collapses subjective value down to an objective number

Money objects combine the properties of a virtual number with a real owned thing

Electrum 1/6 stater coin. Lydian, about 650-600 BC. British Museum. The of these money objects for or labour means that those things attain a numerical value as well, namely the price, by contagion, just as the atoms in iron spontaneously align in a magnetic field

Price is determined through transactions in a process which can be modelled as the collapse of a Price serves as a measure of position – and the fact that price is just a number, as opposed to something real and immutable, is exactly what introduces quantum , and gives money its dualistic properties

The quantum approach also provides a consistent language for describing the role of money in terms of power and energy

Linking cognition and finance opens up numerous applications for predictive models, from supply and demand, to the dynamics of money and credit, to the pricing of financial options Quantizing transactions Quantum economics is based on the idea that prices are probabilistic, and transactions act as a measurement

Instead of a utility curve, we use a propensity curve, which describes the probability of transacting as a function of price

Examples so far have had a discrete propensity function, but for an asset like a house, or an option, we need a continuous function

A propensity curve describes information, which is related to energy through the concept of entropic force, and we can use this to obtain the quantum model Leo Szilard (1898-1964)

Heat engine consisted of a single particle in a chamber at temperature T

If you know the particle is in state 1 then you can move the piston with no force and allow it to open again, thus extracting work from the system

푉푓 퐸 = 푘푇 ln = 푘푇 ln 2 푉푖 Conversely, a probability can be viewed as the product of a corresponding entropic force

푃′ 푥 푥2 푃 푥 퐹 푥 = 훾 ∆퐸 = න 퐹 푥 푑푥 = 훾 log 2 푃 푥 푃 푥 푥1 1 In the case of a normal propensity curve, the entropic force is linear

푃′ 푥 −훾 푥 − 휇 퐹 푥 = 훾 = 푃 푥 휎2 The entropic force scales with the inverse variance, and a parameter 훾

푃′ 푥 −훾 푥 − 휇 퐹 푥 = 훾 = 푃 푥 휎2 In a transaction, the net entropic force is the sum of the buyer and seller forces, joint propensity is a scaled normal curve 2 1 휇푡 Scaling factor depends on factors including spread 훼 = exp − 2 2휎2 2휋휎푡 푡

2 2 휎푏 휇푠 + 휎푠 휇푏 휇 = 2 휎푡 휎 휎 휎 = 푠 푏 휎푡

2 2 휎푡 = 휎푠 + 휎푏

휇푡 = 휇푠 − 휇푏

Similar to classical supply and demand, but curves represent a probabilistic propensity, no unique static equilibrium Probabilistic model leads to stochastic simulations of the type used in systems biology

But how does this relate to dynamics? System is described by a linear entropic force, but does not behave like a classical oscillator because price is indeterminate (and doesn’t oscillate!)

Quantum version of a spring system is the quantum harmonic oscillator

Ground state is a normal distribution, mass scales with inverse variance ℏ휔 ℏ 훾 = 푚 = 2 2휔휎2

Advantages: get a probabilistic model which is consistent with dynamical model, and has well-defined financial versions of mass and energy Quantum harmonic oscillator also has excited states with higher energies – as do markets

Model applies to financial transactions in general

For options, the propensity function will depend on projected asset prices Quantum options In traditional theory, asset prices are assumed to follow a random walk

This model assumes that price changes are passive reactions to random external perturbations (i.e. news) which affect intrinsic value Classical random walk

Toss coin at each step, and move to the left if down, or to the right if up

Repeat many times to find the probability of being at each position in the final step

First used to price options, used in nuclear physics, now ubiquitous in finance

More likely Unlikely Quantum walk

Do one quantum walk with up/down superposition at each step

Find the probability of being at each position in the final step

Used in physics, , quantum cognition Paranormal distribution Normal distribution

Quantum markets can be alive or dead at the same time! Sequence of probability distributions for the classical random walk showing every tenth step after the first The distribution in the quantum case develops two peaks which speed away from one another in a linear (rather than square-root) fashion Decoherence makes the result more classical

Can be viewed as being caused by partial due to external information

But is that what we want? It depends … A quantum walk down Wall Street

The quantum walk model has been used to model cognitive effects such as signal detection, how people assign ratings to stimuli, and general decision-making

In terms of neural processes, the quantum walk model corresponds to a massively parallel cognitive architecture that involves both co‐operative (excitatory) and competitive (inhibitory) interactions

As a model of how we think about the future, it therefore seems an improvement over the classical random walk (which is more a model of something, like a dust particle, that doesn’t think about the future)

An investor might think that prices will go up by 10% per year, but balance that with the opposite scenario in order to arrive at what seems a fair price

If people expected prices to be normally distributed, why would they buy stocks or options??? Determining option prices

To calculate option prices, we need models of future asset prices for the buyer and seller

In the traditional approach, these models are assumed to be the same

If this were true, then sellers and buyers would always agree on the price, so implied volatility and volume surfaces should be flat, which we know is not the case

We will use the quantum model for the buyer, and the traditional model (equivalent to quantum model with decoherence) for seller

Assumes buyers are influenced more by subjective factors, and the urge to speculate on changing prices, while sellers are driven by objective price decisions based on historical data

We then apply the supply/demand model to calculate implied volatility and volume surfaces Binomial model

Traditional models such as Black-Scholes assume that prices obey the stochastic differential equation

푑퐴푡 = 휇퐴푡푑푡 + 휎퐴푡푊푡 where 퐴푡 is the asset price at time t, 휇 is the drift, 휎 is the volatility, and 푊푡 is a Brownian motion term

Solving gives

2 퐴푡 휎 푙푛 = 휇 − 푡 + 휎푊푡 퐴표 2

The discrete version of this equation yields the classical binomial model, which was first developed by Cox, Ross and Rubinstein in 1979, and exists in different versions In the usual model, the steps up and down in log price are given by

휎2 푢 = 푟 − ∆ + 휎 ∆ 2 푡 푡 휎2 푑 = 푟 − ∆ − 휎 ∆ 2 푡 푡

Interpret as a random walk with 푢 = 휎 ∆푡 and 푑 = −휎 ∆푡, in combination with 휎2 a drift term 푟∆ due to the risk-free rate, and adjustment term − ∆ 푡 2 푡

Follow similar procedure for quantum walk, to get price probability distribution

Now, consider a European-style call option with strike price 퐾

+ After 푛 time steps, the expected value of the payoff is exp 푆푛 − 퐾 (the exponential is required because the stock price 푆푛 is logarithmic)

The option price 푉푛 is the expected payoff discounted to time zero, or 1 푉 = exp 푆 − 퐾 + 푛 1+푟 푛 푛 Since the quantum walk model reflects subjective factors, use it to represent the buyer

Use the classical model (i.e. with decoherence) to represent the seller

Introduce a small degree of bias to reflect optimism on part of buyer

Apply the quantum supply/demand model to estimate price and volume

Assume seller has a somewhat higher mass in the transaction

Joint propensity depends on the spread between buy and sell prices Annualised volatility 20% Risk-free 2% Maturity time 6 months

Best deal!

Quantum

Classical

Option price for quantum (blue), classical (red) – apply supply/demand model to estimate mean price (dashed) and volume Implied volatility surface for consensus model

Cont & Fonseca (2002) Dynamics of implied volatility surfaces Volume surface for consensus model

Bergsma et al (2019) examined data for US exchange traded options 2006 to 2017 – mean normalised strike price was 0.988, with a standard deviation of 0.057 How to implement?

Quantum algorithm is native to a quantum device – but do we need a programmable quantum computer? Quantum Dice is currently designing its first commercial fully-integrated on-chip quantum walk device to be used for finance applications

A single photon source is connected to an array of beam splitters, which have a certain probability of either reflecting or transmitting the incident photon and allow a split of the photon state at each time-step

SPS = single photon source, BSA = beam splitter See also: Photonic Discrete-time Quantum Walks array, PD = photon detector unit, PU = processing unit and Applications (Neves & Puentes, 2018) Summary

Quantum mathematics provides a framework for modelling effects such as superposition, interference, and entanglement, which characterise both mental and financial phenomena

In particular, the quantum walk offers an alternative model for the pricing of financial options

When integrated with the quantum model of supply and demand, the coupled model can predict the propensity to purchase options as a function of strike price

Links with quantum models of behavioural and cognitive effects

Quantum models are native to quantum computers, and we can expect to see the development of further quantum algorithms as quantum devices become more widely used in finance Training

Jobs

Investments

Predictions Whither quantum?

The future of quantum computing is uncertain, however current approaches assume quantum computers running classical algorithms – what about quantum devices running quantum algorithms?

Monty Python, “Whither Canada”, 1969 References:

Busemeyer, J. and Bruza, P. 2012. Quantum Models of Cognition and Decision. Cambridge: Cambridge University Press. Haven, E. and Khrennikov, A. 2013. . Cambridge: Cambridge University Press. Jarrow, R. and Rudd, A. 1983. Option Pricing. Homewood, IL: Dow Jones-Irwin Publishing. Kempe, J. 2003. Quantum random walk - an introductory overview. Contemporary Physics, 44:307. Kvam, P.D., Pleskac, T.J., Yu, S., Busemeyer, J.R. 2015. Quantum interference in evidence accumulation. Proceedings of the National Academy of Sciences 112 (34): 10645-10650. Orrell, D. 2020. A quantum model of supply and demand. Physica A: Statistical Mechanics and its Applications 539: 122928. Orrell, D. 2020. The value of value: a quantum approach to economics, security and international relations. Security Dialogue 51(5): 482–498. Orrell, D. 2020. Quantum-tative finance. Wilmott 2020(106): 16-23. Orrell, D. 2021. Quantum Economics and Finance: An Applied Mathematics Introduction (second edition). New York: Panda Ohana. Orrell, D. 2021. A quantum walk model of financial options, Wilmott 2021(112): 62-69. Orrell, D. 2021. The Color of Money: Threshold Effects in Quantum Economics, Quantum Reports 3(2), 325-332. Orrell, D. and Houshmand, M. 2021. Quantum propensity in economics. arXiv:2103.10938 Sarkissian, J. 2020. Quantum coupled-wave theory of price formation in financial markets: price measurement, dynamics and ergodicity. Physica A 554: 124300. Yukalov, V.I. and Sornette, D. 2018. Quantitative Predictions in Quantum , IEEE Transactions on Systems, Man & Cybernetics: Systems 48 (3), 366-381.

QuantumOption app: https://david-systemsforecasting.shinyapps.io/QuantumOption/ Thank you