# The Future of Everything

## March 18, 2022

### QEF12 – A quantum oscillator model of stock markets

Filed under: Quantum Economics and Finance — Tags: , — David @ 1:03 pm

We’ve seen how the quantum model of supply and demand can be used to model transactions and here we’re going to look at how we can use it to simulate the stock market.

With the quantum model supply and demand we have propensity functions for the buyer and the seller and the joint propensity function is equal to the product of those. A market maker would maximize profit if the spread between the buyer and the seller price, i.e. the distance between the two peaks, is equal to the standard deviation of the joint propensity.

This system is described by a linear entropic force but it does not behave like a classical oscillator because we know that the price is indeterminate and of course prices don’t actually oscillate. We therefore go to the quantum harmonic oscillator which is the quantum version of a spring system. The ground state is a normal distribution where the mass scales with the inverse variance. We’re going to define the frequency for the stock market in terms of turnover, so if the turnover is once per year then that will be the frequency.

One way that you can use the quantum harmonic oscillator to simulate the statistics of stock markets is to look at higher energy levels. This plot shows a tracing of the oscillations for the case where we have three energy levels. Most of the energy is in the ground state but there is also some energy in the next two energy levels.

We’re going to look at a slightly simpler version here but first of all we can compare with the actual sort of data that you get from a stock market. This plot is an order book for Apple stock over a single hour and so we’ve got the buyers putting up orders at lower prices and sellers at higher prices. These are not the same as for propensity functions because they don’t reveal all the preferences and of course orders in the middle region are going to clear so will disappear. However these orders do give an idea of the propensity functions which are shown by the shaded areas in the background.

Now, suppose that someone comes and makes a very large order and you want to know how much the price is going to change in response to that – it’s going to go up but by how much? According to the square-root law, which is an empirically derived relation from finance, the price change is given by the square-root of the size of the trade divided by the daily traded volume, all multiplied by the daily volatility, and then multiplied by a numerical constant Y of order unity.

In the oscillator model this makes sense because the restoring force is linear so the energy required to perturb the system is going to vary with the square of the displacement, or equivalently the displacement varies with the square-root of the energy. And of course the energy in a quantum harmonic oscillator is just a multiple of the frequency. When you have a large purchase that’s like boosting the frequency over that time period, which boosts the energy. Comparing these two formulas show that they’re in agreement if we have Y being of the order the square root of two. That sounds about right because in the oscillator model we’re assuming all the energy goes into lifting the price, so the actual price change might be a bit less than that.

This gives us a picture for how we could model prices in general. We can assume that we have an oscillator in its ground state, but then it’s displaced by perturbations which shift it from side to side. It is then going to oscillate in a coherent state, which means it stays in a normal distribution but it’s moving from side to side. The probability of being in a particular energy level varies with a Poisson distribution. We will assume that the spread between the bid and the ask price is equal to the standard deviation in order to maximize the profit.

So to summarise we have a normal distribution, which represents the joint propensity function, bouncing back and forth between the dashed lines in the figure. However there’s another participant in the market which is the market maker. They only transact at the particular ask/bid prices, shown by the vertical bars. We can therefore compute the probability of the ask or bid prices being selected.

If you look at the propensity for the ask price being obtained it follows a sinusoidal of plot. The dashed line is the actual result, the gray line in the background is the sinusoidal plot of the sort that you would obtain with a with a simple two-state quantum system for example. Similarly the propensity function for the bid would just be the opposite of that, so the propensity adds to one (we are assuming here that a transaction takes place at one of the prices).

Notice that for this particular setting the propensity varies from 0.25 to 0.75, so that’s plus or minus 25 percent which is consistent with the kind of shift that you might expect from the quarter law from quantum decision theory.

We can use this model to simulate stock prices. Here the squares are the ask price, circles are the bid price, and we are assuming that we have random perturbations, so unlike the previous plot the oscillations are not allowed to continue because random noise is being applied. We’re also going to have some noise added to the spread, i.e. the difference between the bid and the ask.

The noise in the spread turns out to be important because it’s a main contributor to the fat tails which you see when you look at the overall probability density for a long simulation shown here. This compares with the dash line which is the statistics for the Dow Jones Industrial Average.

To summarize, in neoclassical theory it is assumed that supply and demand cancel out in equilibrium, so there’s no concept of dynamics, force, mass, energy and so on. The quantum model in contrast is obtained by quantizing a linear entropic force. This linear restoring force is what explains the empirically derived square-root law of price impact, and the oscillator model can also be used to simulate the dynamics of stock markets such as price change distributions.

Orrell D (2022) Quantum oscillations in the stock market. Wilmott (forthcoming).

Previous: QEF11 – The money bomb

Playlist: Quantum Economics and Finance

## December 14, 2021

### Quantum economics – the story so far

This piece gives a brief summary of my work to date (2016-2021) in quantum economics.

The idea that the financial system could best be represented as a quantum system came to me (dawned on me? evolved?) while working on The Evolution of Money (Columbia University Press, 2016). “Money objects bind the virtual to the real, and abstract number to the fuzzy idea of value, in a way similar to the particle/wave duality in quantum physics,” I offered. “Money serves as a means to quantify value, in the sense of reducing it to a mathematical quantity – but as in quantum measurement, the process is approximate.” Price is best seen as an emergent feature of the financial system. I summarised this theory in two papers for the journal Economic Thought: “A Quantum Theory of Money and Value” and “A Quantum Theory of Money and Value, Part 2: The Uncertainty Principle“.

While I had some background in quantum physics – I studied the topic in undergraduate university, taught a course on mathematical physics one year at UCL, and encountered quantum phenomena first-hand while working on the design of particle accelerators in my early career – my aim in the book (co-authored with Roman Chlupaty) was not to impose quantum ideas onto the economy. My primary research interest was in computational biology and forecasting and I had not touched quantum mechanics in many years. The dual real/virtual nature of money just had an obvious similarity to the dual nature of quantum entities, and in fact I was surprised that I appeared to have been the first to make this connection in a serious way and come up with a quantum theory of money.

I was aware that a number of researchers were working in applying quantum models to cognition and psychology, but it was only after finishing the book that I learned about the area of quantum finance (I also discovered a separate paper on “Quantum economics” by the physicist Asghar Qadir from 1978, which argued that the quantum formalism was well suited to modelling things like economic preferences). The reason I hadn’t come across these works in my research about money was because just like in neoclassical economics there was no discussion of that topic. Nor was there much discussion of quantum phenomena such as entanglement or interference. Instead the emphasis in quantum finance (as this paper notes) was on using quantum techniques to solve classical problems such as the Black-Scholes option-pricing algorithm, or portfolio optimisation.

My motivation was completely different. In books such as Economyths, and The Money Formula (with Paul Wilmott), I had investigated the drawbacks and limitations of these traditional models – so rather than invent more efficient ways of solving them, I wanted to replace them with something more realistic. Money was the the thing which linked finance and psychology, so a quantum theory of money could be a first step in developing a new approach to economics.

I sketched out the basic idea as an Economic Thought paper “Quantum economics” which served as a blueprint for my 2018 book of the same name. It tied together the quantum theory of money, with ideas from quantum finance, quantum cognition, quantum game theory, and the broader field of quantum social science. The ideas were also summarised in a piece for Aeon magazine – which was when I found out why no one had probably bothered to develop a quantum theory of money. The article was not well received, by economists but especially it seemed by physicists, some of whom went out of their way to trash the idea.

I was not new to having my work come under criticism. Indeed, much of my career has focused on pointing out the drawbacks and limitations of mathematical models, which has frequently brought me into conflict with people who don’t see it that way, starting with my D.Phil. thesis on model error in weather forecasting (see Apollo’s Arrow). My book Economyths also drew howls of outrage from some economists. However quantum economics felt different, and seemed to touch on a range of taboos, in particular from physicists who have long resisted the adoption of quantum ideas by other fields. But quantum mathematics is not owned by physicists, it is simply an alternative version of probability which was first used to model subatomic particles, but also can be used to describe phenomena such as uncertainty, entanglement, and interference which affect mental systems including the economy.

While writing the book I developed in parallel an online mathematical appendix which presented some key results from quantum cognition, finance, and game theory (an early version was translated into Russian). Because my aim was to develop a theory of quantum economics, I also started applying quantum methods to some key economic problems, including supply and demand, option pricing, stock market behaviour, and the debt relationship which underlies the creation of money. This online appendix later grew into my technical book Quantum Economics and Finance: An Applied Mathematics Introduction, first published in 2020 and now in its second edition.

For supply and demand, my idea was to model the buyer and seller in terms of a propensity function, which describes a probabilistic propensity to transact as a function of price. A simple choice is to describe the propensity function as a normal distribution. The joint propensity function is the product of the buyer and seller functions. The next step is to use the concept of entropic force to derive an expression for the forces which describes the tendency for each party to move the price closer to their preferred price point. The joint force is just the sum of the forces for the buyer and seller. However there is a contradiction because the probability distribution does not match that produced by an oscillation. To resolve this, we quantize the force to obtain a quantum harmonic oscillator whose ground state matches the joint propensity function. This model, which sounds elaborate but is actually quite minimal in terms of parameters, applies to economic transactions in general, so has numerous applications, including the stock market. The paper “A quantum model of supply and demand” was published in the journal Physica A in 2020.

The question of how to price options is one of the oldest problems in finance. The modern method dates back to a 1900 thesis by Bachelier and is based on the concept of a random walk. For the quantum version, the logical place to start was with the quantum version of this which is a quantum walk. Instead of assuming that the log price will follow a normal distribution with a standard deviation that grows with the square-root of time, the model has two peaks which speed away from each other linearly in time. It therefore captures the psychological stance of an investor who has a bullish or bearish view on the asset (e.g. price might grow by 10 percent each year), but balances that with the possibility that the opposite might happen in order to obtain a fair price for the option. When coupled with the quantum model of supply and demand, the algorithm can be used to predict option price and volume. “A quantum walk model of financial options” was published in Wilmott magazine in 2021, and the theory was reported on the same year by the Economist in an article “A quantum walk down Wall Street“.

Finally a main question in quantum economics is the interaction between mind and money which underlies the debt relationship, and also the creation of money objects in the first place. Both of these topics are traditionally neglected in mainstream economics. In quantum economics it is easy to show that the debt relationship can be modelled as a simple circuit with two qubits, representing the debtor and creditor, entangled by a C-NOT gate which represents the loan contract. Interestingly, it turns out that the same circuit can be used to represent the decision-making process within the mind of a single person, where there is an interplay between a subjective context and the final decision. In quantum cognition, this is usually modelled as a two-stage process; however it can also be modelled using two entangled qubits, in which the context and the decision are separated out, as in the debt model. This result was published in a 2021 Frontiers in Artificial Intelligence paper, co-authored with Monireh Houshmand, called “Quantum propensity in economics“. A related paper published in Quantum Reports, that discusses applications including mortgage default, is “The color of money: threshold effects in quantum economics“.

For a full list of my research in quantum economics and finance, including links to these and other papers, please see the page Quantum Economics Resources. These findings and others are also presented in my technical book Quantum Economics and Finance: An Applied Mathematics Introduction, and for a general audience in Money, Magic, and How to Dismantle a Financial Bomb: Quantum Economics for the Real World (available 02/2022). The work continues! – if readers are interested in getting involved, please drop me a line here or through LinkedIn.

## November 11, 2021

### Ten reasons to (not) be quantum

Filed under: Economics, Quantum, Quantum Economics and Finance — Tags: , — David @ 11:23 pm

While the use of quantum models is becoming more popular in the social sciences including economics, it is still the case that when many people, especially those with a training in physics, hear the expressions “quantum economics” or “quantum finance” they immediately reach for some off-the-shelf arguments about why it must be nonsense (or some smelling salts). Here is a compilation of the usual ones, along with responses.

1. Quantum mechanics was developed for subatomic particles, so it should not be applied to human systems. As one website claimed, “It’s only when you look at the tiniest quantum particles – atoms, electrons, photons and the like – that you see intriguing things like superposition and entanglement.” An article wonders why we “see the common-sense [classical] states but not the imponderable superpositions?”

Response: Bohr’s idea of superposition and complementarity was borrowed from psychology, as when we hold (or ponder) conflicting ideas in our heads at the same time, and the concepts of mental interference or entanglement are not so obscure. Also, many ideas from quantum mechanics such as the Hilbert space were invented independently by mathematicians. And calculus was developed for tracking the motion of celestial bodies but we don’t ban its application to other things.

1. Quantum is too hard for non-physicists to understand. According to the physicist Sean Carroll, “No theory in the history of science has been more misused and abused by cranks and charlatans – and misunderstood by people struggling in good faith with difficult ideas – than quantum mechanics.”

Response: There is often a confusion between quantum probability, which is a mathematical tool, and quantum physics, which is about subatomic particles. Yes, the physics of subatomic particles is complicated – so are things like classical fluid dynamics. But quantum probability is just the next-simplest type of probability after the classical one. And the misuse of mathematical models which has created the most societal problems is the classical methods used in economics. As a side note, most people involved in quantum economics and quantum finance are physicists or (like me) mathematicians. Which brings us to:

1. Quantum economics is physics envy, or an attempt to “appropriate the high prestige of physics” as one physicist put it.

Response: Mainstream economics is directly inspired by, and based on, concepts from classical mechanistic science. There is nothing inherently wrong with using the same mathematical tools for different areas, what is strange is when the tools used don’t change or adapt. As John Cleese said: “people like psychologists and biologists have still got physics envy but it’s envy of Newtonian physics and they haven’t really noticed what’s been happening the last 115 years.”

1. Quantum is flaky, pretentious, pseudoscientific hype or woo. Sample usage: “As a quantum physicist, I’ve developed a reflexive eyeroll upon hearing the word applied to anything outside of physics. It’s used to describe homeopathy, dishwasher detergents and deodorant.” Cue nerd jokes about “quantum healing” or “quantum astrology”. In his description of what he called the Intellectual-Yet-Idiot, Nassim Taleb included anyone who “Has mentioned quantum mechanics at least twice in the past five years in conversations that had nothing to do with physics.”

Response: Quantum is a mathematical toolbox – it might come across as flaky or pretentious for a person to talk about it in the wrong context, but not to use it in their work.

1. Entanglement is unique to special physical systems which can maintain quantum coherence. One science journalist told me that “Dollars don’t become quantum mechanically entangled. If they did, we’d be building quantum computers out of money.” A paper takes it as given that “one could not possibly idealize traders and investors as quantum objects exhibiting non-classical properties, like superposition or long-distance entanglement.” Physicists often conflate entanglement with Bell tests: one explained that “you can never violate a Bell inequality using systems like dice, dollars, or bank accounts. There is simply no way, and certainly no experiment has ever done so. (Maybe one or two ‘crackpot’ people claim otherwise, but they are not to be trusted.)” Another writes: “It is a common mistake to confuse classical statistical correlations with the correlations implied by quantum entanglement. The difference was made explicit by John Bell. There is no chance that correlations in statistical economics will violate a Bell inequality … unless you fiddle the data.” In other words, using entanglement in an economics model is a sign of either gullibility, or scientific fraud.

Response: In mathematical terms, entanglement is a straightforward property of Hilbert spaces, and we can use it to model social and financial systems, including traders’ decisions or the behaviour of money. The Bell test is not a definition of entanglement, it is a way of teasing out a particular form of entanglement for subatomic particles. It is true that we can’t build quantum computers out of money, but nor can we build classical computers – does that mean money is not classical?

1. Quantum is too complicated and mathematical – we need simpler models and less math. Variants: The economy cannot be reduced to equations, people are not subatomic particles. May quote Lin Yutang.

Response: The need for simple models is a theme of many of my books, however what counts is things like the number of parameters in a model. Quantum probability is more complicated than classical probability, but it is the simplest way to capture phenomena such as superposition, interference, and entanglement, which characterise many key mental and financial processes (for example, the quantum walk model for pricing options or the two-qubit model for quantum decisions are not complicated). People are not subatomic particles, but nor are they classical particles, which doesn’t stop economists from using classical models, or talking about physics-like forces of supply and demand (they are just assumed to be at equilibrium, so cancel out). And while it is true that human behaviour cannot be reduced to equations of any sort, we use equations all the time to simulate the economy. Again, many of my books, such as Apollo’s Arrow, or Truth or Beauty, have criticised the overreach of mathematical models, but that is a separate issue and applies as much to classical models.

1. Quantum is a forced analogy or a metaphor. As economist Paul Samuelson once wrote, “There is really nothing more pathetic than to have an economist or a retired engineer try to force analogies between the concepts of physics and the concepts of economics … and when an economist makes reference to a Heisenberg Principle of [quantum] indeterminacy in the social world, at best this must be regarded as a figure of speech or a play on words, rather than a valid application of the relations of quantum mechanics.”

Response: Quantum probability is a mathematical tool, which is not the same as an analogy or metaphor. The purpose of a metaphor is usually to describe something which is abstract and complicated in terms of something that is more concrete, so it would make more sense to go the other way and use human behaviour as a metaphor to help describe subatomic behaviour.

1. The brain has not been shown to rely directly on quantum processes.

Response: Quantum effects appear to be exploited by biological systems in a number of processes (see quantum biology) but whether they are used in the brain or not makes no difference to economics. The argument is not that the economy inherits quantum properties from subatomic interactions in the brain, but that it can be modelled as a quantum system in its own right. For example, a debt contract can be expressed using a quantum circuit in a way which captures effects such as uncertainty, subjective context, power relationships, and so on.

1. Markets are not quantum because there is no uncertainty. For example, something like a bank account, or an order book for a stock market, has clearly posted amounts and prices. One person compared her bank account to Schrödinger’s cat: “I am a PhD physicist, so for me the word quantum that gets thrown around is a bit ridiculous … So think about your bank account, it might be empty until you open it, so are you telling me that this is uh quantum finance or quantum economics okay you can have a million in your account or you can have zero we don’t know?”

Response: While it may be true that bank accounts are not like Schrödinger’s cat, I will let The Economist answer that one, from an article called “Schrödinger’s markets” in the print edition: “on a closer look finance bears a striking resemblance to the quantum world. A beam of light might seem continuous, but is in fact a stream of discrete packets of energy called photons. Cash flows come in similarly distinct chunks. Like the position of a particle, the true price of an asset is unknowable without making a measurement – a transaction – that in turn changes it. In both fields uncertainty, or risk, is best understood not as a peripheral source of error, but as the fundamental feature of the system.”

As computer scientist Scott Aaronson notes, quantum methods are adapted to handle “information and probabilities and observables, and how they relate to each other.” Since the financial system seems a pretty good example of information, probabilities, and observables (in this case through transactions) it seems like a suitable approach. Much of the confusion comes down to the fact that quantum economics is not quantum physics applied to the economy, but rather quantum mathematics applied to the economy (see figure below). Physicists often struggle with this because they tend to mistake their elegant models for reality, however quantum mathematics should be viewed as a mathematical toolbox that can be applied to either physical or social systems where appropriate.

Physicists tend to see entanglement for example as a special property of subatomic particles – or “a surprising feature of the world” as one emphasized – and object that the two parties in a loan contract are not entangled in the same way. To understand the entanglement, it is necessary to lift the level of analysis from physical people, to mental constructs – which is entirely appropriate, given that money and value are mental constructs. From the perspective of the debt contract, if the debtor decides to default, then the state of the loan also changes immediately for both parties. And debt contracts are a feature of the world too (even if they are less remarkable or surprising than quarks or whatever).

The above nine reasons for rejecting a quantum approach, which are the ones most commonly produced, are very superficial and are easily dismissed with a little reflection. (Skeptics sometimes prefer to say that they don’t understand or are “not convinced” without giving a specific reason, but my aim is not to convince people of anything, it is to lay out the facts as I see them and let others do their own research and come to their own conclusions.) Also, arguing against these reasons, as I have done above, will in my experience have absolutely no effect. One reason is that getting the quantum approach seems to involve something of an aha moment where it suddenly clicks into place. The other reason though is that they are not the real reason. So why is it that no one even tried to apply quantum methods to the economy until about a century after they were invented? This points to:

10. Quantum economics touches on a range of taboo topics.

For the full picture read Money, Magic, and How to Dismantle a Financial Bomb: Quantum Economics for the Real World. Finally, given the numerous reasons to not take a quantum approach, I should point out that there also many reasons why the opposite is true, and the economy is amenable to a quantum treatment! In particular, quantum is the best framework for expressing in mathematical terms the complex interactions between mind and money. To see why, the best place to start is again with the books, or see this brief summary. For a mathematical treatment, see Quantum Economics and Finance: An Applied Mathematics Introduction.

[Update] My work in economics has seen me called a number of things including a conspiracy theorist, and the intellectual equivalent of a climate-change denier. More recently an academic physicist read this piece and wrote, in a now-deleted tweet, that I was a charlatan who was ducking and weaving in order to avoid any criticism. I replied that he may have read the post, but he hadn’t understood it. He said “I judge you are not a crank. I judge you are a charlatan.” Then he thought about it (references to names redacted):

Any physicist worth their salt should agree with him that the only test is whether quantum math proves useful in modelling and prediction.

## March 12, 2021

### Quantum economics and finance – video series

Filed under: Quantum Economics and Finance — Tags: , — David @ 8:40 pm

This series of short videos introduces the key ideas of quantum economics and finance. The only background assumed is basic linear algebra. The material is based on the book Quantum Economics and Finance: An Applied Mathematics Introduction.

Notes:

QEF01 – Introduction to Quantum Economics and Finance

QEF02 – Quantum Probability and Logic

QEF03 – Basics of Quantum Computing

QEF04 – Quantum Cognition

QEF05 – The Quantum Walk

QEF06 – The Penny Flip Game

QEF07 – The Prisoner’s Dilemma

QEF08 – Quantizing Propensity

QEF09 – Threshold Effects in Quantum Economics

QEF10 – A Quantum Option Pricing Model

QEF11 – The Money Bomb

QEF12 – A Quantum Oscillator Model of Stock Markets

Older Posts »