betaFeedback

WorksComputer Science

Algorithmic Market Making Can Lead to Rough Volatility Through the Order Book

Abstract

Existing work suggests that markets can show volatility with paths rougher than those of Brownian motion. In theory this can happen when the order flow is close to instability with memory that decays as a power law. However, it is not fully clear how such order flow could arise from the predominantly algorithmic market making that characterizes order book dynamics. We show one such consistent mechanism. We treat each market maker as a desk that uses a first-order gradient rule to move the distances of its orders from the mid price toward target distances provided by an unknown oracle. We assume that distinct desks do not act synchronously in time but act whenever new information relevant to their respective oracles arrives, which each desk samples over its own characteristic lookback horizon. Across all desks the rule therefore takes the form of stochastic gradient descent (SGD) with information-driven (mini-batch) noise. In the continuum limit this update rule makes the volume of the order book follow a conservative stochastic partial differential equation (the Dean–Kawasaki equation) whose fluctuations drive the order flow. The distinct horizons of the desks further induce a persistent memory in the order flow that decays as a power law. Standard scaling arguments then lead to rough volatility. We confirm the key predictions of the model on simulated agents and on six months of Binance data with about 790 million orders. In liquid markets governed mainly by market makers, such as the perpetual futures of Binance, the order books are consistent with how our desks change the book.

Introduction

Empirical studies of many markets report volatility whose paths are rougher than those of Brownian motion [31]. Such roughness can arise in theory when each order sets off very long chains of further orders whose influence fades as a power of the elapsed time. In a scaling limit the exponent of this power law sets the roughness of the order flow, which opposing buy and sell flows then carry into the price [22, 41]. Such order flow has been argued to follow from the absence of arbitrage together with the splitting of large orders during execution [22, 42]. These arguments rest on the behavior of traders. However, it is not a priori clear whether market makers that act purely on new information can produce such order flow through the order book on their own.

In this work we provide one mechanism that allows for this. To reflect algorithm-driven strategies, we treat each market maker as a desk that uses a first-order gradient rule to move the distances of its orders from the mid price toward target distances provided by an unknown oracle. As our model has no takers, we let the mid price move toward the side of the book with less volume near it. Each desk thus keeps correcting its orders against a moving reference. We next assume that each desk samples information over its own characteristic horizon [46].

Since at each moment only the desks that have received new information take a step, order placements are asynchronous. Across all desks the rule therefore takes the form of stochastic gradient descent (SGD) with information-driven (mini-batch) noise.

Adapting prior constructions of the continuum limit of SGD [30], we show that the volume of the order book then follows a conservative stochastic partial differential equation (the Dean–Kawasaki equation [21, 43]) driven by noise that is white in time and colored across the book, with a spatial correlation set by how desks sample information. As desks only redistribute volume, the volume of the order book is conserved irrespective of the nature of this noise. Further, every update of a desk is in turn a source of new information for the other desks; thus the aggregation of this information raises the chance of further updates across the market with a strength set by the shape of the book. Lastly, even though the horizon of each desk leaves a memory that fades exponentially, the distinct horizons cause the market to retain a more persistent memory that appears in the order flow as a power-law decay. Standard scaling arguments then lead to rough volatility when the order flow approaches instability in the asymptotic limit [22, 41].

We then proceed to test each step of this mechanism, first on simulated desks and then on six months of Binance trades and order books covering about 790 million orders. In simulation the average changes of the order book agree with the theory, with fluctuations that match the information-driven noise. We further confirm that the market shows the predicted memory and that roughness emerges only when desks sample information over distinct horizons. On Binance the order flow is also rough, and its Hurst parameter lies close to that of simulated desks with the same fitted memory. The order books of the perpetual futures there are consistent with how our desks change the book, as orders in these books partly return to their distances after a move of the mid price and move to neighboring distances (§ 7.3).

Related literature

Our work broadly straddles the following lines of existing research.

Rough volatility. Rough volatility was first documented in estimates from realized volatility [31]. However, other works argue that such estimates could partly reflect estimation error [12]. Alternative justifications of roughness that do not rest on these estimates have also been proposed, such as order flow that is close to instability with power-law memory [22, 41] and the absence of arbitrage [FuK21, JR20]. In our work we provide a different route that relies purely on algorithmic market making, with roughness measured from the order count distributions that emerge from it.

Limit order dynamics. Models of the order book itself usually prescribe how orders arrive and leave, either at random [19 SFGK03] or through a latent supply and demand that evolves by reaction and diffusion [3, 20]. We instead choose to rely on optimization dynamics more consistent with modern liquidity provision [2, 32, 51]. Unlike other agent-based models [15, 11, 48], we use a gradient-based rule consistent with modern learning approaches and information-based sampling [46] that guides the actions of fast-reacting desks.

Continuum dynamics. Multiple models of order book evolution have been proposed, but most are consistent with the Brownian-like nature of prices [10 MTB14, TLD+11, YST14]. We instead rely on existing continuum approaches for analyzing optimization dynamics [30, 52 RVE22, SS20] and modify them to be more reflective of the self-exciting and persistent nature of financial order flow.

Outline

We provide a map for the work that follows. First we introduce the desks and their gradient rule in § 2, after which we derive the conservative equation for the volume of the order book in § 3. We then proceed to show how fluctuations of the book drive self-exciting order flow with power-law memory (§ 4) and connect this order flow to rough volatility (§ 5). § 6 and § 7 test the mechanism on simulated desks and on Binance data respectively. Additional details are provided in the Appendix.

Setting: SGD market makers on the order book

Our model has five parts, each of which is needed to turn the gradient rule of a single desk into the dynamics of a whole book. We first describe the order book (§ 2.1) and how its mid price moves (§ 2.2), then the information that each desk tracks (§ 2.3), the gradient rule by which a desk moves its orders (§ 2.4) and finally when a desk acts (§ 2.5). § 2.6 then puts these parts together in the order in which they occur.

The order book

We consider an idealized order book that consists solely of market makers and evolves in discrete time with steps n=0,1,…n = 0, 1, \ldots. Each order is characterized by its side σ∈{−1,+1}\sigma\in\{-1, +1\}, corresponding to the bid and the ask respectively, and by its distance x≥0x \ge0 from a mid price MnM_n, measured in units of a price increment h>0h > 0. Conventionally the mid price is defined as pn=12(An+Bn)p_n = \frac{1}{2}(A_n + B_n), the average of the best ask AnA_n and the best bid BnB_n. However, in our model MnM_n is a reference price around which all market makers quote. In this setup, if ana_n and bnb_n denote the distances of the closest ask and the closest bid from MnM_n, then An=Mn+hanA_n = M_n + ha_n and Bn=Mn−hbnB_n = M_n - hb_n, so that pn=Mn+h2(an−bn)p_n = M_n + \frac{h}{2}(a_n - b_n), with equality holding if and only if an=bna_n = b_n.

Our choice follows standard models of market making in which market makers quote around a reference price [2, 32] that in practice is made to account for the imbalance of volume between the two sides around the conventional mid price [Sto18]. Under this setup the mid price moves toward the side with less volume [Sto18], as made precise in (2). Further, despite being an idealized quantity it is close to the conventional mid price as it differs from the latter by at most half the spread

∣pn−Mn∣=h2∣an−bn∣≤12(An−Bn).\lvert p_n - M_n \rvert= \frac{h}{2}\lvert a_n - b_n\rvert\le\frac{1}{2}(A_n - B_n).

The two are thus nearly identical in highly liquid markets with a narrow spread.

In a real order book each market-making participant, which we refer to as a desk did_i, holds at step nn a number Qi(n)Q_i(n) of orders on either side of the book. Each order is a point mass of volume at its distance from the mid price, and desks change the number, sizes, sides and distances of their orders over time.

In our model we represent each participant that quotes on both sides of the book by two desks, one for each side, such that each desk did_i quotes on a single side σi\sigma_i. As volume that a participant shifts between its two desks leaves the total volume of the book unchanged, our framework still applies to the book as a whole. We further let each desk hold a fixed number LL of orders of equal volume mim_i, which discretizes the volume of the desk into equal parts such that a real order corresponds to one or more of these parts at the same distance. Desks in our model only move their orders, which on an exchange corresponds to cancelling an order and immediately placing the same volume at a new distance. Our idealized market thus has no other arrivals, cancellations or annihilations of orders.1 As the volume of a liquid book spreads over many ticks we treat distances as continuous, so that desk did_i holds its orders oi,1,…,oi,Lo_{i,1},\ldots,o_{i,L} at the distances xi(n)=(xi,1(n),…,xi,L(n))∈[0,∞)L\boldsymbol{x}_i(n)=(x_{i,1}(n),\ldots,x_{i,L}(n))\in[0,\infty)^L and the volume on side σ\sigma at step nn is the measure

Vnσ=∑i:σi=σmi∑j=1Lδxi,j(n),V_n^\sigma=\sum_{i:\sigma_i=\sigma}m_i\sum_{j=1}^{L}\delta_{x_{i,j}(n)},

which places the volume mim_i of each order of desk did_i at its distance. The total volume Vn+([0,∞))+Vn−([0,∞))V_n^+([0,\infty))+V_n^-([0,\infty)) of the book is constant in nn. In our simulations participants do not shift volume between their two desks, such that the volume on each side is constant as well, which we normalize to one.

How the mid price moves

We first measure how much volume sits near the mid price on each side. We weigh each order by its volume and by its distance from the mid price as

Znσ=∑i:σi=σmi∑j=1Le−xi,j(n)/ℓ,(1)Z_n^\sigma=\sum_{i:\sigma_i=\sigma}m_i\sum_{j=1}^{L}e^{-x_{i,j}(n)/\ell}, \tag*{(1)}

such that an order at the mid price itself (x=0x=0), which we call the touch, counts with its full volume while the weight of an order decays with its distance over a length ℓ>0\ell>0. We chose this soft weighting rather than counting only the volume within a fixed distance, as a fixed cutoff would make ZnσZ_n^\sigma jump whenever an order crosses it. Instead, the chosen soft weighting allows the mid price to respond smoothly to every move. As each side is individually normalized to have total volume one, 0≤Znσ≤10\leq Z_n^\sigma\leq1, and thus ZnσZ_n^\sigma naturally represents the share of the volume of side σ\sigma near the mid price. We relate this share of the volume to the movement of the mid price through

θn=−c(Zn+−Zn−),Mn+1=Mn+hθn,(2)\theta_n=-c\left(Z_n^+-Z_n^-\right),\qquad M_{n+1}=M_n+h\theta_n, \tag*{(2)}

where c>0c>0 sets how far the mid price moves for a given imbalance of volume near it. The above linear response is consistent to first order with empirical observations of how moves of the mid price depend on the imbalance of volume [13, 17, 27]. Our weighting additionally accounts for the contribution of volume at larger distances from the mid price [XGH20].

Since all distances are measured from the mid price, every order shifts with each move of the mid price. Each order of desk did_i thus moves as

xi,j←max⁡{xi,j−σiθn,0},(3)x_{i,j}\leftarrow\max\{x_{i,j}-\sigma_i\theta_n,0\}, \tag*{(3)}

such that orders on the side toward which the mid price moves come closer to it while orders on the other side move away. An order that the mid price reaches stays at the touch, as in our idealized market it can neither be executed nor cross to the other side of the book.

Desks and their information

Next, we group the set of all desks into KK clusters, where cluster kk contains the desks that sample information over a characteristic horizon Tk=T1Ωk−1T_k=T_1\Omega^{k-1} with a ratio Ω>1\Omega>1 [18, 46 MDD^{+}97]. As a large part of the liquidity in modern markets is provided by fast desks [51], we let the volume of a cluster decrease as a power of its horizon. The desks of cluster kk thus together hold the volume

wk=Tk−α∑l=1KTl−α,α>0,(4)w_k = \frac{T_k^{-\alpha}}{\sum_{l=1}^{K} T_l^{-\alpha}}, \qquad\alpha> 0, \tag*{(4)}

on each side, such that the volumes of all clusters sum to one. For simplicity each of the NN desks of cluster kk on a given side holds the same volume, such that mi=wk/(NL)m_i = w_k/(NL). In a real market this amounts to fixing the resolution at which we describe the volume of each cluster.

The desks of cluster kk then track the moving averages of two quantities, which reflect two economic realities.

  1. Market makers adjust their quotes to the recent trend of the mid price, as a predictable short-term drift exposes them to adverse selection [16]. The first moving average PkP_k therefore follows this trend over the horizon TkT_k.

  2. Activity in order books is to a large extent self-exciting, such that recent updates of other participants are themselves a source of information for further updates [25, 35]. The second moving average UkU_k therefore follows the recent size of the updates of all desks, which measures market activity.

At every step both are updated as

Pk←Pk+θn−PkTk,Uk←Uk+In−1−UkTk,(5)P_k \leftarrow P_k + \frac{\theta_n-P_k}{T_k}, \qquad U_k \leftarrow U_k + \frac{I_{n-1}-U_k}{T_k}, \tag*{(5)}

where In−1I_{n-1} measures how strongly the updates of the previous step moved the mid price, as defined in (7) below.

The gradient rule

We now state the exact optimization rule. Each desk did_i of cluster kk receives target distances xi∗∈[0,∞)Lx_i^* \in[0,\infty)^L for its orders from an unknown oracle, which stands for the desk’s own view of where its orders should sit. As stated earlier, following the recent trend of the mid price, it further leans its orders such that in an upward trend its asks move away from the mid price while its bids move closer. We express both through the loss

Li(x)=12∑j=1L(xj−xi,j∗)2−σiλk∑j=1Lxj,λk=ΠPkγ,(6)\mathcal{L}_i(x) = \frac{1}{2}\sum_{j=1}^{L}(x_j-x_{i,j}^*)^2-\sigma_i\lambda_k\sum_{j=1}^{L}x_j,\qquad\lambda_k=\frac{\Pi P_k}{\gamma}, \tag*{(6)}

where Π≥0\Pi\ge0 sets how strongly the desk leans with the trend and dividing by γ\gamma makes the lean of a single step equal to ΠPk\Pi P_k. When the desk acts, it takes a single gradient step of size γ∈(0,1)\gamma\in(0,1) as

xi←max⁡{xi−γ∇Li(xi),0}=max⁡{xi−γ(xi−xi∗)+σiΠPk,0}.x_i \leftarrow\max\{x_i-\gamma\nabla\mathcal{L}_i(x_i),0\}=\max\{x_i-\gamma(x_i-x_i^*)+\sigma_i\Pi P_k,0\}.

Notice that as this step affects the volume near the mid price, the next move of the mid price in turn changes by cmi∣ΔZi∣c m_i|\Delta Z_i|, where miΔZim_i\Delta Z_i is the change of ZnnewZ_n^{\mathrm{new}} caused by desk did_i with

References

  1. [1]Frédéric Abergel and Aymen Jedidi. A mathematical approach to order book modeling. International Journal of Theoretical and Applied Finance, 16(5):1350025, 2013.
  2. [2]Marco Avellaneda and Sasha Stoikov. High-frequency trading in a limit order book. Quantitative Finance, 8(3):217–224, 2008.DOI
  3. [3]Jean-Philippe Bouchaud, Julius Bonart, Jonathan Donier, and Martin Gould. Trades, Quotes and Prices: Financial Markets Under the Microscope. Cambridge University Press, 2018.DOI
  4. [4]Dirk G. Baur, Daniel Cahill, Keith Godfrey, and Zhangxin (Frank) Liu. Bitcoin time-of-day, day-of-week and month-of-year effects in returns and trading volume. Finance Research Letters, 31:78–92, 2019.DOI
  5. [5]Léon Bottou, Frank E. Curtis, and Jorge Nocedal. Optimization methods for large-scale machine learning. SIAM Review, 60(2):223–311, 2018.arxiv.org/abs/1606.04838
  6. [6]Nicholas H. Bingham, Charles M. Goldie, and Jozef L. Teugels. Regular Variation, volume 27 of Encyclopedia of Mathematics and its Applications. Cambridge University Press, Cambridge, 1987.
  7. [7]Binance. Binance public data and API documentation. https://data.binance.vision and https://developers.binance.com.
  8. [8]Mikkel Bennedsen, Asger Lunde, and Mikko S. Pakkanen. Decoupling the short- and long-term behavior of stochastic volatility. Journal of Financial Econometrics, 20(5):961–1006, 2022.
  9. [9]Emmanuel Bacry, Iacopo Mastromatteo, and Jean-François Muzy. Hawkes processes in finance. Market Microstructure and Liquidity, 1(1):1550005, 2015.
  10. [10]Jean-Philippe Bouchaud, Marc Mézard, and Marc Potters. Statistical properties of stock order books: empirical results and models. Quantitative Finance, 2(4):251–256, 2002.
  11. [11]Rama Cont and Jean-Philippe Bouchaud. Herd behavior and aggregate fluctuations in financial markets. Macroeconomic Dynamics, 4(2):170–196, 2000.DOI
  12. [12]Rama Cont and Purba Das. Rough volatility: fact or artefact? Sankhyā B, 86(1):191–223, 2024.arxiv.org/abs/2203.13820
  13. [13]Álvaro Cartea, Ryan Donnelly, and Sebastian Jaimungal. Enhancing trading strategies with order book signals. Applied Mathematical Finance, 25(1):1–35, 2018.DOI
  14. [14]Rama Cont and Adrien de Larrard. Price dynamics in a Markovian limit order market. SIAM Journal on Financial Mathematics, 4(1):1–25, 2013.DOI
  15. [15]Carl Chiarella and Giulia Iori. A simulation analysis of the microstructure of double auction markets. Quantitative Finance, 2(5):346–353, 2002.
  16. [16]Álvaro Cartea, Sebastian Jaimungal, and Jason Ricci. Buy low, sell high: a high frequency trading perspective. SIAM Journal on Financial Mathematics, 5(1):415–444, 2014.
  17. [17]Rama Cont, Arseniy Kukanov, and Sasha Stoikov. The price impact of order book events. Journal of Financial Econometrics, 12(1):47–88, 2014.DOI
  18. [18]Fulvio Corsi. A simple approximate long-memory model of realized volatility. Journal of Financial Econometrics, 7(2):174–196, 2009.
  19. [19]Rama Cont, Sasha Stoikov, and Rishi Talreja. A stochastic model for order book dynamics. Operations Research, 58(3):549–563, 2010.
  20. [20]Jonathan Donier, Julius Bonart, Iacopo Mastromatteo, and Jean-Philippe Bouchaud. A fully consistent, minimal model for non-linear market impact. Quantitative Finance, 15(7):1109–1121, 2015.
  21. [21]David S. Dean. Langevin equation for the density of a system of interacting Langevin processes. Journal of Physics A: Mathematical and General, 29(24):L613–L617, 1996.
  22. [22]Omar El Euch, Masaaki Fukasawa, and Mathieu Rosenbaum. The microstructural foundations of leverage effect and rough volatility. Finance and Stochastics, 22(2):241–280, 2018.arxiv.org/abs/1609.05177
  23. [23]European Commission. Commission delegated regulation (EU) 2017/566 of 18 may 2016 supplementing directive 2014/65/EU with regard to regulatory technical standards for the ratio of unexecuted orders to transactions in order to prevent disorderly trading conditions. Official Journal of the European Union, L 87, 31.3.2017, pp. 84–89, 2017.
  24. [24]William Feller. An Introduction to Probability Theory and Its Applications, volume II. Wiley, New York, second edition, 1971.
  25. [25]Vladimir Filimonov and Didier Sornette. Quantifying reflexivity in financial markets: towards a prediction of flash crashes. Physical Review E, 85(5):056108, 2012.
  26. [27]Martin D. Gould and Julius Bonart. Queue imbalance as a one-tick-ahead price predictor in a limit order book, 2015.
  27. [28]Gao-Feng Gu, Wei Chen, and Wei-Xing Zhou. Empirical shape function of limit-order books in the Chinese stock market. Physica A, 387(21):5182–5188, 2008.DOI
  28. [29]Julien Guyon and Mehdi El Amrani. Does the term structure of the at-the-money skew really follow a power law? Risk, August 2023. HAL hal-04373382.
  29. [30]Benjamin Gess, Rishabh S. Gvalani, and Vitalii Konarovskyi. Conservative SPDEs as fluctuating mean field limits of stochastic gradient descent. Probability Theory and Related Fields, 192(3–4):1447–1515, 2025. Numbering of results follows arXiv version 2.arxiv.org/abs/2207.05705
  30. [31]Jim Gatheral, Thibault Jaisson, and Mathieu Rosenbaum. Volatility is rough. Quantitative Finance, 18(6):933–949, 2018.
  31. [32]Olivier Guéant, Charles-Albert Lehalle, and Joaquin Fernandez-Tapia. Dealing with the inventory risk: a solution to the market making problem. Mathematics and Financial Economics, 7(4):477–507, 2013.DOI
  32. [34]Alan G. Hawkes. Spectra of some self-exciting and mutually exciting point processes. Biometrika, 58(1):83–90, 1971.DOI
  33. [35]Stephen J. Hardiman, Nicolas Bercot, and Jean-Philippe Bouchaud. Critical reflexivity in financial markets: a Hawkes process analysis. The European Physical Journal B, 86(10):442, 2013.
  34. [36]Peter Reinhard Hansen, Chulwoo Kim, and Wade Kimbrough. Periodicity in cryptocurrency volatility and liquidity. Journal of Financial Econometrics, 22(1), 2024. arXiv:2109.12142.arxiv.org/abs/2109.12142
  35. [37]Ben Hambly, Jasdeep Kalsi, and James Newbury. Limit order books, diffusion approximations and reflected SPDEs: from microscopic to macroscopic models. Applied Mathematical Finance, 27(1–2):132–170, 2020.
  36. [38]Weibing Huang, Charles-Albert Lehalle, and Mathieu Rosenbaum. Simulating and analyzing order book data: the queue-reactive model. Journal of the American Statistical Association, 110(509):107–122, 2015.arxiv.org/abs/1312.0563
  37. [39]Joel Hasbrouck and Gideon Saar. Technology and liquidity provision: the blurring of traditional definitions. Journal of Financial Markets, 12(2):143–172, 2009.DOI
  38. [40]Thibault Jaisson and Mathieu Rosenbaum. Limit theorems for nearly unstable Hawkes processes. Annals of Applied Probability, 25(2):600–631, 2015.
  39. [41]Thibault Jaisson and Mathieu Rosenbaum. Rough fractional diffusions as scaling limits of nearly unstable heavy tailed Hawkes processes. The Annals of Applied Probability, 26(5):2860–2882, 2016.DOI
  40. [42]Paul Jusselin and Mathieu Rosenbaum. No-arbitrage implies power-law market impact and rough volatility. Mathematical Finance, 30(4):1309–1336, 2020.arxiv.org/abs/1805.07134
  41. [43]Kyozi Kawasaki. Stochastic model of slow dynamics in supercooled liquids and dense colloidal suspensions. Physica A, 208(1):35–64, 1994.DOI
  42. [44]Harold J. Kushner and Hai Huang. Asymptotic properties of stochastic approximations with constant coefficients. Technical Report LCDS-TR-79-2 (AFOSR-TR-79-0977), Lefschetz Center for Dynamical Systems, Brown University, Providence, RI, April 1979.
  43. [45]Matthias Kirchner. Hawkes and INAR(∞) processes. Stochastic Processes and their Applications, 126(8):2494–2525, 2016.DOI
  44. [46]Marcos López de Prado. Advances in Financial Machine Learning. Wiley, 2018.
  45. [47]Randall J. LeVeque. Finite Volume Methods for Hyperbolic Problems. Cambridge University Press, 2002.DOI
  46. [48]Thomas Lux and Michele Marchesi. Scaling and criticality in a stochastic multi-agent model of a financial market. Nature, 397(6719):498–500, 1999.
  47. [49]Giulia Livieri, Saad Mouti, Andrea Pallavicini, and Mathieu Rosenbaum. Rough volatility: Evidence from option prices. IISE Transactions, 50(9):767–776, 2018.
  48. [51]Albert J. Menkveld. High frequency trading and the new market makers. Journal of Financial Markets, 16(4):712–740, 2013.DOI
  49. [52]Song Mei, Andrea Montanari, and Phan-Minh Nguyen. A mean field view of the landscape of two-layer neural networks. Proceedings of the National Academy of Sciences, 115(33):E7665–E7671, 2018.DOI
  50. [53]Peter Mörters and Yuval Peres. Brownian Motion, volume 30 of Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, 2010.

Paper details

vlnc:W_qkquut4h
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY-SA 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents