The Shape of Supply and Demand Curves in Rapidly Clearing Markets

A central challenge in economics is understanding how price affects the quantity of supply and demand, a relationship often assumed to be approximately linear. But there are markets where this notion of linearity, sometimes called “elasticity,” may not hold. In a paper that deserves more attention, Donier and Bouchaud show that supply/demand curves of rapidly clearing markets (with a Brownian price process) have an average shape that is locally quadratic, with no linear term.

Here is a classical illustration of how total supply and demand tend to vary with price:

Total demand decreases — and total supply increases — monotonically with price. The curves intersect at p*, which is the volume-maximizing, market price. [1] Near the market price, supply and demand vary linearly with changes in price.

If we “clear” the market, so that the supply on offer at p^* trades with the demand at p^*, then the curves will look like:

Which is the same as the first plot, just shifted downwards by the quantity traded. The curves are still linear near p*. And if we zoom in, the average supply/demand curves will look like [2]:

But, Donier and Bouchaud [3] show that markets with certain features will actually have *average* supply/demand curves that are locally quadratic. I.e.:

In this regime, a market order will have price impact that scales with the square-root of its size, on average.

Their result also raises the question whether some markets operate at saddle points in their production and consumption curves, which may look like:

Where W_{saddle} is the rough width of the “saddle zone,” the region where the curves are predominantly quadratic.

This strikes me as qualitatively different from the classical economic picture. It also makes sense intuitively: when an asset is volatile, it’s difficult to know the exact price where supply and demand balance. Donier and Bouchaud don’t speculate on the size of W_{saddle}, but there is at least the possibility that their results apply to a wider range of prices than expected. If any real markets have a large W_{saddle}, estimating their price elasticities would be difficult or impossible. It could also explain the ennui of financial markets — where headline-generating price moves have little effect on real-world supply and demand. [4]

The Donier-Bouchaud Model

Donier and Bouchaud (and previous co-authors) use a reaction-diffusion model to obtain this result. Briefly and roughly:

  1. New buy orders are created (in time interval dt) with probability \omega_+(y), where y = p - p^* is the difference between the price of the new order (p) and the market price (p^*). Sell orders are created with probability \omega_-(y).
  2. Existing orders are canceled with probability \nu_{\pm}(y).
  3. The market clears with periodic time-interval \tau — when buy and sell orders with crossing prices are matched, and removed from the market.
  4. The underlying process of the price p^* is Brownian.

When \tau is small, they show that supply and demand curves are locally quadratic, for any reasonable \omega_{\pm}(y) and \nu_{\pm}(y).

Of course, real-world markets do not instantly clear crossed meta-orders, even when markets trade in continuous time. For example: a trader might intend to buy $100M of stock at any price below $100/share, while another trader intends to sell $100M of stock at any price above $90/share. The two traders might dribble out their order-flow over weeks, instead of instantly trading with each other at a price between $90 and $100 per share. [5]

Nonetheless, it is conceivable that some markets behave as if they’re in the small \tau limit. In the Bitcoin market, traders may be less inclined to hide their intentions than in traditional markets, and the visible order book might represent the true levels of supply and demand near the market price. The authors present the average displayed supply and demand for Bitcoin in Figure 6, which is very close to a quadratic function for prices within 2% of the clearing price (where cumulative supply/demand is typically ~400k BTC). So electronic markets’ “saddle zones” may be about as wide as their daily volatility, which doesn’t seem surprising; few oil producers are going to increase drilling because the price went up by 1%.

Latent Liquidity as First-Passage Time

Donier and Bouchaud’s result seems to be a general feature of Brownian price processes, and doesn’t depend much on the specifics of the model. The spirit of their model raises the question whether there’s a connection between the marginal supply/demand at a given price, and the time required for the market to move through that price. That is, perhaps latent liquidity has properties similar to first-passage time statistics.

A quadratic supply/demand curve is equivalent to marginal supply/demand varying linearly with price. By definition, cumulative supply (S(y)) at a price y away from the “true” price is just the sum of marginal supply (\rho_{S}) available up to that price: S(y) = \int_{0}^{y} \rho_{S}(y') dy'. [6] \rho_{S}(y) may also be called the volume of latent sell orders available at price y.

One way to reach Donier and Bouchaud’s result is by assuming that \rho_{S}(p) builds with time, after the market price moves through p. [7] To be clear, the following model is different and less sophisticated than what Donier and Bouchaud did, but I think it’s a good way to capture the intuition.

As an illustration, consider what happens to the latent order book after the clearing price drops instantly from p_0 to p_1. At first, the supply on offer between p_0 and p_1 will be zero:

Afterwards, inside this new gap, latent sell orders will start to build. Let’s assume that \rho_{S} grows as a function only of the time t(p) since the price dropped through p: \rho_{S}(t(p)). [8] The precise form of the function \rho_{S}(t) doesn’t really matter.

If the market doesn’t move after that initial price drop, time t_1 later, the latent order book will have replenished. Between p_0 and p_1, there will be quantity \rho_{S}(t_1) on offer:

To calculate the expected value of \rho_{S}(t(y)), we need the probability density of the time since the price last passed y away from the present price: \mathbf{p}_{y}^{LPT}[t]. For a time-reversible process, this distribution is the same as that of the first-passage time, \mathbf{p}_{y}^{FPT}[t].

For continuous-time Brownian motion, the first-passage time distribution is well-known:

\mathbf{p}_{y}^{FPT}[t] = \frac{y}{\sqrt{2\pi \sigma^2 t^3}} e^{-y^2 / (2 \sigma^2 t)}

For y \ll \sigma \sqrt{t}, this is linear in y:

\mathbf{p}_{y}^{FPT}[t] \approx \frac{y}{\sqrt{2\pi \sigma^2 t^3}}

Which gives an average marginal supply curve that’s linear in y:

\mathbf{E}_{t}[\rho_{S}(t)] = \int_{0}^{T} \rho_{S}(t) \mathbf{p}_{y}^{FPT}[t] dt \propto y

Where T is the total time that the market has been operating.

Thus, the expected cumulative supply is quadratic in y: \mathbf{E}_{t}[S(y)] = \int_{0}^{y} \mathbf{E}_{t}[\rho_{S}(y')] dy' \propto y^2.

The model should fail at sufficiently large t, when it has been a long time since the price last reached its current level. E.g., if the price of oil rises past its high for the year to $60/bbl, then we’d expect the level of marginal supply near $60 to reflect the real-world economics of oil extraction. So clearly, the model shouldn’t work for t=1yr in the oil market. But if oil breached only its high-of-the-day, perhaps the marginal supply would just be a mechanical function of that duration. We could argue that the model will start to fail when t is long enough for businesses to react to new highs/lows, which should be about the typical time between business decisions (t_{InterDecision}). [9] In that case W_{saddle} \sim \sigma \sqrt{t_{InterDecision}}, which could be quite large for illiquid markets.

Discretizing the Process

If \tau > 0, the market clears every period \tau in a batch auction, and the price process becomes a discrete-time random walk. An infinitely long \tau should recover the uncleared, classical supply/demand curves at the top of this post. So, as \tau increases, we expect a transition from the quadratic supply of Brownian motion to a linear regime.

To get the average supply curve for discrete markets, we need the first-passage time distribution. When a random walk has price steps that are independently drawn from a symmetric, continuous probability distribution with finite second moment, its first-passage time PDF is asymptotically: [10]

\mathbf{p}_{y}^{FPT}[n] \approx  (\frac{1}{2 \sqrt{\pi n^3}} + \frac{y}{\sqrt{2\pi \sigma_{step}^{2} n^3}}) e^{-y^2 / (2 \sigma_{step}^2 n)}

Where n is the number of steps the random walk has taken, and \sigma_{step}^2 is the variance of each step’s price movement. The approximation is valid in the limit n \to \inf with \frac{y}{\sqrt{n}} finite. The step count is related to continuous time via n = \frac{t}{\tau}. And if the underlying process is Brownian, \sigma_{step} = \sqrt{\tau}\sigma.

When the price process has a typical step size (\sigma_{step}) that’s small compared to the distance from the market price (y), then the second term dominates and \mathbf{E}_{t}[\rho_{S}(t)] is identical to the continuous Brownian case. That is, cumulative supply varies quadratically with price when \tau \ll \frac{y^2}{\sigma^2}.

When the process is heavily discretized, y is small compared to \sigma_{step} and the first term dominates, which will be approximately constant in y. Thus the marginal supply will be constant, and the cumulative supply linear in y.

This result is the same as Donier and Bouchaud’s. In fact, if we expand \mathbf{p}_{y}^{FPT}[n] to first order in \frac{y}{\sigma_{step}\sqrt{n}} (near the market price), then we get:

\mathbf{E}_{n}[\rho_{S}(n)] \approx L(y + u_0 \sigma \sqrt{\tau})

Where L is some constant obtained from integrating out t, identified as a measure of liquidity by Donier and Bouchaud. And u_0=\sqrt{\frac{1}{2}} \approx 0.71 is a constant not terribly far from the one obtained by Donier and Bouchaud (u_0 \approx 0.82). [11][12]

Thus, slowly-clearing markets — which are heavily discretized — may not have a saddle zone. [13]

Supply/Demand Curves when the Price Process is a Lévy Flight

The above asymptotics apply to a broad class of random walks if their variance is finite. But markets can have price fluctuations with fatter tails, particularly on shorter timescales. A Lévy flight of index 0 < \alpha < 2 has price increments (x_{t} = p_{t} - p_{t-\Delta t}) with divergent variance and a power-law tail: \mathbf{p}[x] \sim \frac{1}{|x|^{\alpha + 1}}.

The first passage times of a Lévy flight have asymptotic PDF: [14]

\mathbf{p}_{y}^{FPT}[t] \sim \frac{y^{\alpha / 2}}{t^{3/2}} for long t. [15]

This distribution gives, on average, a cumulative supply curve S(y) \sim y^{(2+ \alpha) / 2}. And a market order will have price impact \mathcal{I}(q)=S^{-1}(q) \sim q^{2 / (2+\alpha)}. As an example, \alpha=1.5 would correspond to a rather “jumpy” market, and would have S(y) \sim y^{1.75} and \mathcal{I}(q) \sim q^{0.57}. [16]

Supply/Demand Curves for a Sub-Diffusive Price Process

The volatility of a sub-diffusion increases with timescale more slowly than the volatility of an ordinary Brownian motion. For example: \sigma_{\Delta t}^2 \sim \Delta t^{\gamma} . When \gamma = 1, the volatility scales in the usual way for Brownian motion: linearly with the timescale. When 0 < \gamma < 1, the process is a sub-diffusion. A sub-diffusive market is mean-reverting in the sense that a price fluctuation is likely to be reversed in the future. Because sub-diffusive markets have “memory,” they’re considered “inefficient.” [17]

The first passage time distribution of a sub-diffusion is asymptotically: [18]

\mathbf{p}_{y}^{FPT}[t] \sim \frac{y}{t^{1 + \gamma / 2}}

This has linear price-dependence like ordinary Brownian motion. So the cumulative supply is again quadratic, and market impact is again square-root.

Certain types of “efficiency” can lead to square-root price impact. But if this model is approximately accurate, then “inefficient” markets like sub-diffusions can also have square-root impact.

Update: Benzaquen and Bouchaud just examined a reaction-diffusion model for sub-diffusions. They show that the latent order book is locally linear (eq. 10), like in the crude first-passage analysis here. For quickly executed meta-orders, they show \mathcal{I}(q) \sim \sqrt{q}. But for slow meta-orders that give latent orders more time to react mid-execution, they get \mathcal{I}(q) \sim q^{1-\gamma / 2}.

Order-of-Magnitude Scaling of Impact in Diffusions and Sub-Diffusions

I find this result interesting because it appears, at first glance, to contradict the simplest, order-of-magnitude “derivation” of the square-root impact law. But on closer inspection, I think order-of-magnitude logic is consistent with sub-diffusions and ordinary diffusions having similar impact scaling.

If a market is Brownian, its price changes will scale like \sigma \sqrt{\Delta t}. One view of price discovery is that a fraction (of order 1) of those price changes come from traders’ impact. Thus, a meta-order’s impact will roughly scale with the square root of its duration: \mathcal{I} \sim \sigma \sqrt{t_{OrderDuration}}. Market-wide volume roughly accumulates at a constant rate in time (V), so a meta-order of size q will last for a duration t_{OrderDuration} \sim \frac{q}{V}. This gives \mathcal{I}(q) \sim \sigma \sqrt{\frac{q}{V}}.

Now, if a market is sub-diffusive then its price changes scale more slowly with time: \Delta p \sim \Delta t^{\gamma / 2} . If everything else in the above argument were the same, then we’d get \mathcal{I}(q) \sim q^{\gamma / 2} . But there’s no reason to expect that volume in a sub-diffusive market should occur at a constant rate in clock-time.

Sub-diffusions can be reformulated as processes with independent increments, where the time between steps is variable with a long tail. [19] In this formulation, steps may correspond to trading activity — with each step roughly having volume V_{step}. A meta-order would then last for N steps, with N \sim \frac{q}{V_{step}}. The step lengths of this sub-diffusion have finite variance \sigma_{step}^2, so we can follow the same argument as in the Brownian case, with the step count replacing time: \mathcal{I}(q) \sim \sigma_{step}\sqrt{N} \sim \sigma_{step}\sqrt{\frac{q}{V_{step}}} — which has the same square-root scaling.


Market-behavior is crowd-behavior, and a crowd can be more predictable than the individuals inside it. Donier and Bouchaud — and the loose interpretation in this post — show that that when markets are mechanical and boring, they will have cumulative supply and demand curves that are roughly quadratic, on average. Now, lots of us do not think markets are boring! Even if many markets do operate at saddle points, they probably do not have very wide “saddle zones.” But if any do, a small price change might have virtually zero effect on production and consumption, and a large price change might have a giant effect. That’s different from the standard intuition.

[1] This picture is obviously heuristic. Supply/demand curves are well known to have many shapes, may be non-monotonic, and may have more than one price that locally maximizes the exchanged volume.

[2] The supply and demand curves near p* should (probably) be symmetric around p*, if we average over some ensemble of situations in a given market.

[3] Borrowing from their earlier work with Bonart, Deremble, de Lataillade, Lempérière, Kockelkoren, Mastromatteo, and Tóth. (e.g. 2014 and 2011)

[4] Even when large price changes barely affect supply and demand, they could still serve an important economic function. The opinions and information of traders are incorporated into prices, which — when markets are transparent — provide useful signals for long-term business decisions.

[5] Table 1 and Figure 13 of Waelbroeck and Gomes indicate that the bulk of institutional equity meta-orders are shorter than a few days.

[6] Demand is similar. For ease, let’s just discuss the supply side.

[7] Latent liquidity isn’t usually observable, so we can’t easily test the hypothesis that latent liquidity at a given price builds as a function of time since the market was at that price. But latent liquidity could be measured via the order book — if a market is heavily financialized, transparent, and dominated by traders who don’t hide their intentions. Arguably, Bitcoin is (or used to be) such a market.

[8] We could add an i.i.d noise term to \rho_{S} and it wouldn’t affect the results. The assumption that \rho_{S} has no explicit price-dependence is similar to Donier and Bouchaud’s example of constant \omega and \nu. This assumption is obviously wrong, but sufficiently close to the market price, it may be reasonable enough.

[9] The reaction time of businesses could be significantly longer than the human decision-making timescale. Especially when the market in question isn’t transparent or mature. E.g., if a farmer switches from growing olives to almonds, it might take her grove several years to become productive again. So the price of almonds may need to reach a multi-year high in order for her to be confident enough to switch crops. But, if the farmer could hedge her future production, she might quickly decide to switch crops after it becomes economical to do so. Perhaps a well-developed futures market reduces the valid range of this model from t \lesssim 1yr to t \lesssim 1day.

[10] See eq. 38 of Majumdar and citations for details. I changed the CDF of eq. 38 into a PDF, and dropped a non-leading term.

[11] Eq. 22

[12] Sparre-Andersen scaling applies to any Markov process with a continuous and symmetric distribution of price movements: For large t, first passage time distributions have to decay like t^{-3 / 2}. So, in order for the expectation over t to converge, we must have \rho_{S}(t) < \sqrt{t} for large t (assuming \rho_{S}(t) is monotonically increasing). That is, the marginal supply at a given price must grow more slowly than the square root of the time since the market was at that price. The connection between latent liquidity and first passage times won’t hold for very long t, but this may provide a loose bound on how quickly latent liquidity can replenish.

[13] According to the model, slowly-clearing supply/demand curves are still dominated by the quadratic term when price movements are sufficiently large (and thus last-passage times long). But the model should fail at very long timescales, when businesses are able to react to price moves. Though, as discussed in [9], the model’s valid timescale could be longer if a market is slow and opaque.

[14] See, e.g., eq. 10 in Koren, et al.

[15] Figure 2 shows pretty rapid convergence to this asymptotic result after a handful of time steps.

[16] Perhaps it shouldn’t be surprising that impact is steeper than in the Brownian case. Heuristically, the Lévy tails make the market more “momentum-driven.” In a Lévy-type market, a trader who initiates a price movement could find that the market quickly moves away from her. The Lévy process used here has independent increments, but we can imagine the independence breaking down in continuous-time, “mid-increment.” I.e., it’s conceivable that momentum-traders could trade in the middle of a timestep.

On a related note, Koren et al. show that the mean leapover length diverges for Lévy flights. The leapover length could be interpreted as the profit made by stop orders, *if* they execute in the middle of a price jump and are able to hit liquidity during tail events. Those are big “ifs,” but the potential to make near-infinite profit may partly explain the popularity of stop orders and short-term momentum strategies. It could also explain why traders are reluctant to post much liquidity far away from the current price.

[17] In a sub-diffusive market with low transaction costs, betting on mean-reversion is a profitable strategy. If you know of any electronic markets like this, let me know.

Even if sub-diffusions are rare in electronic markets, linear combinations of different assets could still be sub-diffusive. The stereotypical “pairs trade” involves a mean-reverting spread between prices of two assets. Also, sub-diffusions may be more common in the broader, off-exchange economy than we’d naively expect.

[18] See the first non-constant term in the series expansion of eq. 30 in Metzler and Klafter (“Boundary value problems for fractional diffusion equations”). Eq. 30 is the survival probability (CDF of the first passage time), the PDF is the time derivative. The approximation is valid for y \ll \sqrt{ K_{\gamma}t^{\gamma} }. K_{\gamma} is the “fractional diffusion coefficient,” analogous to \sigma^2 for \gamma=1.

Note that sub-diffusions are not Markov processes, so Sparre-Andersen scaling [12] doesn’t apply. Liquidity must replenish more slowly than \rho_{S}(t) < t^{\gamma / 2} for large t.

[19] Correlated waiting times may also lead to sub-diffusions in a process with independent increments.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s