Skip to content
homeaboutworkprojectsthesiswritingresume
Loading
~/blog/price-formation-in-the-order-book0%dark
  1. home/
  2. writing/
  3. Price Formation in the Order Book

28 May 2026 · 31 min read · updated 13 June 2026

Price Formation in the Order Book

Taking the limit order book mechanism as given, we model the prices it produces. We fix the efficient price as a conditional expectation and prove it is a martingale, recover the effective spread from the serial covariance the bid-ask bounce induces, derive the adverse-selection spread of Glosten and Milgrom, compute the fill probability of a resting order from its queue position, give the gambler's-ruin probability that the mid moves up and the imbalance microprice it implies, derive Kyle's linear impact equilibrium, and solve the Almgren-Chriss execution problem. Every result is proved in full and every assumption is stated.

  • 25 equations
  • 30 results
  • 9 connections
  • market-microstructure
  • quantitative-finance
  • probability
  • stochastic-finance
On this page▾
  • Primitives
  • The efficient price is a martingale
  • The bid-ask bounce and the spread
  • Adverse selection sets a spread
  • Fill probability from queue position
  • Which way the mid moves
  • The microprice
  • Information becomes impact
  • Inventory and the maker's reservation price
  • Optimal execution
  • Transient impact and resilience
  • Order-flow memory and the square-root law
  • Summary of results
  • Numerical illustration

31 min left

  • Primitives1m
  • The efficient price is a martingale2m
  • The bid-ask bounce and the spread4m
  • Adverse selection sets a spread3m
  • Fill probability from queue position3m
  • Which way the mid moves2m
  • The microprice2m
  • Information becomes impact4m
  • Inventory and the maker's reservation price2m
  • Optimal execution2m
  • Transient impact and resilience2m
  • Order-flow memory and the square-root law2m
  • Summary of results1m
  • Numerical illustration1m

The companion chapter on the limit order book describes the mechanism, the bids and asks, the price-time priority, the matching of incoming orders against resting depth, and the reading of the book as a supply and demand schedule. This chapter models the prices that mechanism produces. We keep the same notation for the best bid BtB_tBt​, the best ask AtA_tAt​, the mid Mt=12(At+Bt)M_t=\half(A_t+B_t)Mt​=21​(At​+Bt​), the spread st=At−Bts_t=A_t-B_tst​=At​−Bt​, and the imbalance ItI_tIt​, and we add the probabilistic structure the models need.

#Primitives

Fix a filtered probability space (Ω,F,(Ft)t≥0,P)(\Omega,\Filt,(\Filt_t)_{t\ge 0},\P)(Ω,F,(Ft​)t≥0​,P) satisfying the usual conditions of right-continuity and completeness, where Ft\Filt_tFt​ is the information carried by the order flow to time ttt. Completeness lets us treat almost-surely defined conditional expectations as genuine adapted processes, and right-continuity secures càdlàg modifications so that first-passage and stopping-time arguments are well posed. A market buy prints at AtA_tAt​, a market sell at BtB_tBt​, so every print carries a side qt∈{−1,+1}q_t\in\{-1,+1\}qt​∈{−1,+1}. Every expectation, variance, and covariance is taken under the physical measure P\PP.

#The efficient price is a martingale

Behind the quotes sits the value the market estimates. A process (Xt,Ft)(X_t,\Filt_t)(Xt​,Ft​) is a martingale when it is integrable, adapted, and satisfies E[Xt∣Fs]=Xs\E[X_t\mid\Filt_s]=X_sE[Xt​∣Fs​]=Xs​ almost surely for s≤ts\le ts≤t (see the companion martingales chapter), the three clauses the proof below verifies in turn.

Definition1

The efficient price is the conditional expectation of the terminal value V∈L1V\in L^1V∈L1 given the order flow, St∗=E[V∣Ft]S^\ast_t=\E[V\mid\Filt_t]St∗​=E[V∣Ft​].

Theorem2

The efficient price is an (Ft)(\Filt_t)(Ft​)-martingale.

Proof

We verify the three clauses. For integrability, conditional Jensen applied to the convex map x↦∣x∣x\mapsto\lvert x\rvertx↦∣x∣ gives ∣St∗∣≤E[∣V∣∣Ft]\lvert S^\ast_t\rvert\le\E[\lvert V\rvert\mid\Filt_t]∣St∗​∣≤E[∣V∣∣Ft​] almost surely, and taking expectations with the tower property gives E∣St∗∣≤E∣V∣<∞\E\lvert S^\ast_t\rvert\le\E\lvert V\rvert<\inftyE∣St∗​∣≤E∣V∣<∞ for every ttt, so St∗∈L1S^\ast_t\in L^1St∗​∈L1. For adaptedness, St∗S^\ast_tSt∗​ is Ft\Filt_tFt​-measurable by the definition of conditional expectation, and we fix these canonical versions throughout, which is legitimate under completeness. For the martingale identity, the nesting Fs⊆Ft\Filt_s\subseteq\Filt_tFs​⊆Ft​ and the tower property give

E[St∗∣Fs]=E[E[V∣Ft]∣Fs]=E[V∣Fs]=Ss∗(s≤t).(1)\E[S^\ast_t\mid\Filt_s]=\E\big[\E[V\mid\Filt_t]\mid\Filt_s\big]=\E[V\mid\Filt_s]=S^\ast_s \qquad (s\le t). \tag{1}E[St∗​∣Fs​]=E[E[V∣Ft​]∣Fs​]=E[V∣Fs​]=Ss∗​(s≤t).(1)

All three clauses hold, proving the claim.

Subtracting the Fs\Filt_sFs​-measurable Ss∗S^\ast_sSs∗​ from Equation (1) gives the increment form

E[St∗−Ss∗∣Fs]=0(s≤t),(2)\E[S^\ast_t-S^\ast_s\mid\Filt_s]=0\qquad (s\le t), \tag{2}E[St∗​−Ss∗​∣Fs​]=0(s≤t),(2)

so efficient-price increments carry no Fs\Filt_sFs​-forecastable component. This is a theorem, not a hypothesis, because the efficient price is defined as a projection. Among all Ft\Filt_tFt​-measurable square-integrable predictors YYY of VVV, the conditional expectation uniquely minimises E[(V−Y)2]\E[(V-Y)^2]E[(V−Y)2]; it is the L2L^2L2 projection of VVV onto L2(Ft)L^2(\Filt_t)L2(Ft​), with orthogonality E[(V−St∗)Z]=0\E[(V-S^\ast_t)Z]=0E[(V−St∗​)Z]=0 for every bounded Ft\Filt_tFt​-measurable ZZZ. Defining the efficient price as this projection is the optimal use of order-flow information, and the martingale property is the microstructure shadow of the no-arbitrage statement that discounted prices are martingales under a pricing measure, here proved under the physical measure from the definition alone.

The observed mid is a noisy reading of S∗S^\astS∗. Write Mt=St∗+ηtM_t=S^\ast_t+\eta_tMt​=St∗​+ηt​ with ηt:=Mt−St∗\eta_t:=M_t-S^\ast_tηt​:=Mt​−St∗​. Both MMM and S∗S^\astS∗ are Ft\Filt_tFt​-adapted, so ηt\eta_tηt​ is too and E[ηt∣Ft]=ηt\E[\eta_t\mid\Filt_t]=\eta_tE[ηt​∣Ft​]=ηt​, leaving it uninformative against Ft\Filt_tFt​ itself. Centering requires a coarser value filtration Gt⊆Ft\mathcal G_t\subseteq\Filt_tGt​⊆Ft​ that excludes the tick, spread, and queue state, in the sense E[ηt∣Gt]=0\E[\eta_t\mid\mathcal G_t]=0E[ηt​∣Gt​]=0, or unconditionally E[ηt]=0\E[\eta_t]=0E[ηt​]=0. Under either centering the forecastable structure of the mid is carried entirely by the noise, because E[Mt−Ms∣Fs]=E[ηt−ηs∣Fs]\E[M_t-M_s\mid\Filt_s]=\E[\eta_t-\eta_s\mid\Filt_s]E[Mt​−Ms​∣Fs​]=E[ηt​−ηs​∣Fs​] by Equation (2). The bid-ask bounce and short-horizon mean reversion of the mid are properties of η\etaη, not of S∗S^\astS∗, and the empirical content of the decomposition is the centering of η\etaη, which is falsifiable, not the martingale property of S∗S^\astS∗, which is a theorem.

#The bid-ask bounce and the spread

A market order buys at the ask and sells at the bid, so consecutive prints bounce across the spread even when the efficient price stands still. Roll's observation is that the bounce leaves a negative signature in the serial covariance of price changes [1].

Theorem3

Let the efficient price be a random walk mt=mt−1+utm_t=m_{t-1}+u_tmt​=mt−1​+ut​ with utu_tut​ i.i.d., mean zero, variance σ2\sigma^2σ2, and let trades print at pt=mt+12s qtp_t=m_t+\half s\,q_tpt​=mt​+21​sqt​ with side qt∈{−1,+1}q_t\in\{-1,+1\}qt​∈{−1,+1} i.i.d., symmetric, and independent of (ut)(u_t)(ut​). Then

Cov⁡(Δpt,Δpt−1)=−s24≤0,(3)\Cov(\Delta p_t,\Delta p_{t-1})=-\frac{s^2}{4}\le 0, \tag{3}Cov(Δpt​,Δpt−1​)=−4s2​≤0,(3)

so the effective spread is s=2−Cov⁡(Δpt,Δpt−1)s=2\sqrt{-\Cov(\Delta p_t,\Delta p_{t-1})}s=2−Cov(Δpt​,Δpt−1​)​.

Proof

Differencing the print equation and using mt−mt−1=utm_t-m_{t-1}=u_tmt​−mt−1​=ut​,

Δpt=ut+12s (qt−qt−1).(4)\Delta p_t=u_t+\half s\,(q_t-q_{t-1}). \tag{4}Δpt​=ut​+21​s(qt​−qt−1​).(4)

A symmetric ±1\pm 1±1 side has E[qt]=0\E[q_t]=0E[qt​]=0 and E[qt2]=1\E[q_t^2]=1E[qt2​]=1, so Var⁡(qt)=1\Var(q_t)=1Var(qt​)=1, and by the i.i.d. assumption Cov⁡(qi,qj)=1{i=j}\Cov(q_i,q_j)=\one\{i=j\}Cov(qi​,qj​)=1{i=j}. Expanding the covariance of Equation (4) at consecutive dates by bilinearity gives four blocks. The block Cov⁡(ut,ut−1)\Cov(u_t,u_{t-1})Cov(ut​,ut−1​) vanishes because uuu has zero autocovariance. The two cross blocks Cov⁡(ut,qt−1−qt−2)\Cov(u_t,q_{t-1}-q_{t-2})Cov(ut​,qt−1​−qt−2​) and Cov⁡(qt−qt−1,ut−1)\Cov(q_t-q_{t-1},u_{t-1})Cov(qt​−qt−1​,ut−1​) vanish because uuu is independent of the sides, which factors each expectation and cancels it. Only the side block survives,

Cov⁡(Δpt,Δpt−1)=s24 Cov⁡(qt−qt−1, qt−1−qt−2).(5)\Cov(\Delta p_t,\Delta p_{t-1})=\frac{s^2}{4}\,\Cov\big(q_t-q_{t-1},\,q_{t-1}-q_{t-2}\big). \tag{5}Cov(Δpt​,Δpt−1​)=4s2​Cov(qt​−qt−1​,qt−1​−qt−2​).(5)

Expanding the bilinear form into its four terms,

Cov⁡(qt,qt−1)−Cov⁡(qt,qt−2)−Cov⁡(qt−1,qt−1)+Cov⁡(qt−1,qt−2)=0−0−1+0=−1,(6)\Cov(q_t,q_{t-1})-\Cov(q_t,q_{t-2})-\Cov(q_{t-1},q_{t-1})+\Cov(q_{t-1},q_{t-2})=0-0-1+0=-1, \tag{6}Cov(qt​,qt−1​)−Cov(qt​,qt−2​)−Cov(qt−1​,qt−1​)+Cov(qt−1​,qt−2​)=0−0−1+0=−1,(6)

so the side block equals −s2/4-s^2/4−s2/4, which is Equation (3). The inversion takes the positive root because s≥0s\ge 0s≥0, and the population covariance is non-positive, so the root is real.

The drift of mmm never appears, so the spread is read off price data with no model of returns, and three corollaries sharpen the picture.

Proposition4

Under the assumptions of Theorem 3, the autocovariance of price changes vanishes at every lag k≥2k\ge 2k≥2, the efficient-price variance is σ2=Var⁡(Δpt)−s2/2\sigma^2=\Var(\Delta p_t)-s^2/2σ2=Var(Δpt​)−s2/2, and the per-period variance of the kkk-step return is Var⁡(pt−pt−k)/k=σ2+s2/(2k)\Var(p_t-p_{t-k})/k=\sigma^2+s^2/(2k)Var(pt​−pt−k​)/k=σ2+s2/(2k).

Proof

For k≥2k\ge 2k≥2 the side and innovation indices in Δpt\Delta p_tΔpt​ and Δpt−k\Delta p_{t-k}Δpt−k​ are disjoint, so every block vanishes by independence and the autocovariance is zero. Price changes are therefore an MA(1) process with a single negative autocovariance. For the variance, Var⁡(Δpt)=Var⁡(ut)+s24Var⁡(qt−qt−1)=σ2+s24⋅2=σ2+s2/2\Var(\Delta p_t)=\Var(u_t)+\tfrac{s^2}{4}\Var(q_t-q_{t-1})=\sigma^2+\tfrac{s^2}{4}\cdot 2 =\sigma^2+s^2/2Var(Δpt​)=Var(ut​)+4s2​Var(qt​−qt−1​)=σ2+4s2​⋅2=σ2+s2/2, and rearranging recovers σ2\sigma^2σ2. For the kkk-step return, pt−pt−k=(mt−mt−k)+12s(qt−qt−k)p_t-p_{t-k}=(m_t-m_{t-k})+\half s(q_t-q_{t-k})pt​−pt−k​=(mt​−mt−k​)+21​s(qt​−qt−k​) splits into independent pieces of variance kσ2k\sigma^2kσ2 and s24⋅2=s2/2\tfrac{s^2}{4}\cdot 2=s^2/24s2​⋅2=s2/2, so Var⁡(pt−pt−k)=kσ2+s2/2\Var(p_t-p_{t-k})=k\sigma^2+s^2/2Var(pt​−pt−k​)=kσ2+s2/2 and dividing by kkk gives the stated ratio.

The per-period variance Var⁡(pt−pt−k)/k=σ2+s2/(2k)\Var(p_t-p_{t-k})/k=\sigma^2+s^2/(2k)Var(pt​−pt−k​)/k=σ2+s2/(2k) is largest at k=1k=1k=1, where it equals σ2+s2/2\sigma^2+s^2/2σ2+s2/2, and decreases monotonically toward the fundamental variance σ2\sigma^2σ2 as k→∞k\to\inftyk→∞; equivalently the variance ratio VR(k)=V(k)/V(1)\mathrm{VR}(k)=V(k)/V(1)VR(k)=V(k)/V(1) starts at one and falls toward σ2/(σ2+s2/2)<1\sigma^2/(\sigma^2+s^2/2)<1σ2/(σ2+s2/2)<1. Negatively autocorrelated bid-ask bounce gives a variance ratio below one that decays with horizon and plateaus at the long-run level rather than a ratio that rises to one, the volatility signature plot that diagnoses microstructure noise, and σ2=Var⁡(Δpt)−2∣γ1∣\sigma^2=\Var(\Delta p_t)-2\lvert\gamma_1\rvertσ2=Var(Δpt​)−2∣γ1​∣ separates fundamental volatility from the noise variance using only the lag-zero and lag-one autocovariances γ0,γ1\gamma_0,\gamma_1γ0​,γ1​. The idealisation that prints land exactly at m±s/2m\pm s/2m±s/2 makes the recovered sss the effective round-trip cost, which equals the quoted width only without price improvement; real fills inside the quotes shrink the bounce and the estimator returns the smaller effective spread. The sharper caveat is order-flow autocorrelation. If sides persist with Cov⁡(qt,qt−k)=ρk\Cov(q_t,q_{t-k})=\rho_kCov(qt​,qt−k​)=ρk​, the four-term expansion Equation (6) becomes 2ρ1−ρ2−12\rho_1-\rho_2-12ρ1​−ρ2​−1, so Cov⁡(Δpt,Δpt−1)=s24(2ρ1−ρ2−1)\Cov(\Delta p_t,\Delta p_{t-1})=\tfrac{s^2}{4}(2\rho_1-\rho_2-1)Cov(Δpt​,Δpt−1​)=4s2​(2ρ1​−ρ2​−1) and positive persistence ρ1>0\rho_1>0ρ1​>0 pushes the covariance toward zero, biasing the naive estimator downward and voiding it once 2ρ1−ρ2≥12\rho_1-\rho_2\ge 12ρ1​−ρ2​≥1. Roll's formula assumes the bounce is the only source of serial correlation in prints.

As a worked instance take an efficient-price volatility σ=0.01\sigma=0.01σ=0.01 and a spread s=0.05s=0.05s=0.05. The lag-one autocovariance is −s2/4=−6.25×10−4-s^2/4=-6.25\times 10^{-4}−s2/4=−6.25×10−4, inverting to s=26.25×10−4=0.05s=2\sqrt{6.25\times 10^{-4}}=0.05s=26.25×10−4​=0.05, and the per-period return variance falls from σ2+s2/2=1.35×10−3\sigma^2+s^2/2=1.35\times 10^{-3}σ2+s2/2=1.35×10−3 sampled at unit lag toward σ2=10−4\sigma^2=10^{-4}σ2=10−4 at long lag, the signature plot that distinguishes the spread term from the fundamental variance.

#Adverse selection sets a spread

Roll's bounce produces a spread with symmetric information. Glosten and Milgrom show a spread arises from information alone, with zero processing cost, because a resting quote is picked off by traders who know more [2].

Theorem5

Let the value be binary V∈{VL,VH}V\in\{V_L,V_H\}V∈{VL​,VH​} with P(V=VH)=12\P(V=V_H)=\halfP(V=VH​)=21​. A fraction π\piπ of arriving traders are informed and trade in the direction of VVV; the remaining 1−π1-\pi1−π are noise traders who buy or sell with probability 12\half21​ each, independent of VVV. A competitive risk-neutral market maker quotes the conditional expectations

a=E[V∣buy],b=E[V∣sell].(7)a=\E[V\mid\text{buy}],\qquad b=\E[V\mid\text{sell}]. \tag{7}a=E[V∣buy],b=E[V∣sell].(7)

Then the spread is

a−b=π (VH−VL),(8)a-b=\pi\,(V_H-V_L), \tag{8}a−b=π(VH​−VL​),(8)

strictly positive whenever π>0\pi>0π>0, and the quote mid equals the prior mean 12(VH+VL)\half(V_H+V_L)21​(VH​+VL​).

Proof

Take "competitive" to mean free entry, at least two Bertrand-competing makers, so equilibrium drives expected profit per quote to zero. Competition and risk-neutrality then force the quotes in Equation (7), since any ask above E[V∣buy]\E[V\mid\text{buy}]E[V∣buy] is undercut by a rival and any ask below it loses money on average against the informed flow, and symmetrically for the bid. An informed trader buys exactly when V=VHV=V_HV=VH​, so P(buy∣VH)=π+(1−π)12=12(1+π)\P(\text{buy}\mid V_H)=\pi+(1-\pi)\half=\half(1+\pi)P(buy∣VH​)=π+(1−π)21​=21​(1+π) and P(buy∣VL)=(1−π)12=12(1−π)\P(\text{buy}\mid V_L)=(1-\pi)\half=\half(1-\pi)P(buy∣VL​)=(1−π)21​=21​(1−π). With the uniform prior the buy probability is 12\half21​, so Bayes gives P(VH∣buy)=12(1+π)\P(V_H\mid\text{buy})=\half(1+\pi)P(VH​∣buy)=21​(1+π) and P(VL∣buy)=12(1−π)\P(V_L\mid\text{buy})=\half(1-\pi)P(VL​∣buy)=21​(1−π), whence a=VH1+π2+VL1−π2a=V_H\tfrac{1+\pi}{2}+V_L\tfrac{1-\pi}{2}a=VH​21+π​+VL​21−π​. By the symmetry of a sell, b=VH1−π2+VL1+π2b=V_H\tfrac{1-\pi}{2}+V_L\tfrac{1+\pi}{2}b=VH​21−π​+VL​21+π​. Subtracting gives Equation (8), and a+b=VH+VLa+b=V_H+V_La+b=VH​+VL​ gives the mid.

With VH=101V_H=101VH​=101, VL=99V_L=99VL​=99, and an informed fraction π=0.2\pi=0.2π=0.2, the ask is 101⋅0.6+99⋅0.4=100.2101\cdot 0.6+99\cdot 0.4=100.2101⋅0.6+99⋅0.4=100.2, the bid is 101⋅0.4+99⋅0.6=99.8101\cdot 0.4+99\cdot 0.6=99.8101⋅0.4+99⋅0.6=99.8, the spread is π(VH−VL)=0.4\pi(V_H-V_L)=0.4π(VH​−VL​)=0.4, and the mid is the prior mean 100100100. Doubling the informed fraction to π=0.4\pi=0.4π=0.4 doubles the spread to 0.80.80.8, the linear adverse-selection cost of trading against better information.

The static spread is one frame of a dynamic process. With a general prior the quotes still bracket the value, and the belief they encode walks toward the truth as trades accumulate.

Proposition6

For a general prior P(V=VH)=θ\P(V=V_H)=\thetaP(V=VH​)=θ, the quotes a=E[V∣buy]a=\E[V\mid\text{buy}]a=E[V∣buy] and b=E[V∣sell]b=\E[V\mid\text{sell}]b=E[V∣sell] keep a strictly positive spread for every π>0\pi>0π>0, largest at θ=12\theta=\halfθ=21​ and shrinking to zero as θ→0\theta\to 0θ→0 or θ→1\theta\to 1θ→1. The posterior value mt=E[V∣Ft]m_t=\E[V\mid\Filt_t]mt​=E[V∣Ft​] is a martingale, and as trades accumulate it converges almost surely to VVV, so the spread vanishes.

Proof

The trade likelihoods are P(buy∣VH)=12(1+π)\P(\text{buy}\mid V_H)=\half(1+\pi)P(buy∣VH​)=21​(1+π) and P(buy∣VL)=12(1−π)\P(\text{buy}\mid V_L)=\half(1-\pi)P(buy∣VL​)=21​(1−π), with the sell case reflected, so Bayes maps each trade to a posterior update θ↦θ′\theta\mapsto\theta'θ↦θ′ that raises θ\thetaθ on a buy and lowers it on a sell. Writing mt=VL+(VH−VL)θtm_t=V_L+(V_H-V_L)\theta_tmt​=VL​+(VH​−VL​)θt​ with θt=P(V=VH∣Ft)\theta_t=\P(V=V_H\mid\Filt_t)θt​=P(V=VH​∣Ft​), the tower property gives E[θt+1∣Ft]=θt\E[\theta_{t+1}\mid\Filt_t]=\theta_tE[θt+1​∣Ft​]=θt​, so mtm_tmt​ is a bounded martingale and converges almost surely by the martingale convergence theorem. Each trade carries strictly positive information for π>0\pi>0π>0, so the limiting σ\sigmaσ-field distinguishes VHV_HVH​ from VLV_LVL​ and the limit is VVV. The spread is the dispersion of VVV under the trade-conditional posteriors, which is greatest when the prior is most uncertain and contracts as the belief concentrates.

Starting from θ=12\theta=\halfθ=21​ with π=0.2\pi=0.2π=0.2, a buy raises the posterior to θ=0.6\theta=0.6θ=0.6, moves the posterior value from 100100100 to 99+2(0.6)=100.2099+2(0.6)=100.2099+2(0.6)=100.20, and narrows the spread from 0.400.400.40 to 0.3850.3850.385, the quotes tightening as the belief walks toward the truth.

The Roll and Glosten-Milgrom spreads are additive components of the same observed width, one from processing the bounce and one from adverse selection. After a trade the market maker's posterior moves to the executed-side conditional expectation, so the transaction-revised price is a martingale by the tower property, and price impact is revealed as Bayesian updating rather than a separate force. The sequential unit-trade structure here is the simple limit; the batched divisible-quantity limit is Kyle's model below, and both price the same informational wedge.

#Fill probability from queue position

A passive order rests in a first-in, first-out queue at the best bid. Let its queue position qqq be the number of units that must execute before and including the order, so q−1q-1q−1 rest ahead. Assume constant intensities, execution as the only advancement mechanism, and an order that rests indefinitely without own cancellation. Market sell orders arrive as a Poisson process of rate μ\muμ and remove the unit at the front; an adverse move of the best bid arrives as an independent Poisson process of rate κ\kappaκ and abandons the level, leaving the order unfilled [3].

Lemma7

For independent Tμ∼Exp(μ)T_\mu\sim\mathrm{Exp}(\mu)Tμ​∼Exp(μ) and Tκ∼Exp(κ)T_\kappa\sim\mathrm{Exp}(\kappa)Tκ​∼Exp(κ), P(Tμ<Tκ)=μ/(μ+κ)\P(T_\mu<T_\kappa)=\mu/(\mu+\kappa)P(Tμ​<Tκ​)=μ/(μ+κ), the minimum is Exp(μ+κ)\mathrm{Exp}(\mu+\kappa)Exp(μ+κ), and the identity of the winner is independent of the minimum.

Proof

Conditioning on Tμ=tT_\mu=tTμ​=t with density μe−μt\mu e^{-\mu t}μe−μt and using P(Tκ>t)=e−κt\P(T_\kappa>t)=e^{-\kappa t}P(Tκ​>t)=e−κt,

P(Tμ<Tκ)=∫0∞μe−μte−κt dt=μ∫0∞e−(μ+κ)t dt=μμ+κ.(9)\P(T_\mu<T_\kappa)=\int_0^\infty\mu e^{-\mu t}e^{-\kappa t}\,dt =\mu\int_0^\infty e^{-(\mu+\kappa)t}\,dt=\frac{\mu}{\mu+\kappa}. \tag{9}P(Tμ​<Tκ​)=∫0∞​μe−μte−κtdt=μ∫0∞​e−(μ+κ)tdt=μ+κμ​.(9)

The minimum of independent exponentials is exponential with the summed rate, and the joint density factors into a function of the minimum and the winner label, giving independence.

Proposition8

Under the stated assumptions the probability the order is filled before the level moves is

P(fill)=(μμ+κ)q.(10)\P(\text{fill})=\Big(\frac{\mu}{\mu+\kappa}\Big)^{q}. \tag{10}P(fill)=(μ+κμ​)q.(10)
Proof

Superpose the two Poisson processes into one of rate μ+κ\mu+\kappaμ+κ and label each event by its source. By Lemma 7 each event is an execution with probability μ/(μ+κ)\mu/(\mu+\kappa)μ/(μ+κ) and an adverse move with probability κ/(μ+κ)\kappa/(\mu+\kappa)κ/(μ+κ). Independence and stationarity of Poisson increments, together with rates that do not depend on the position, make the labels of successive events independent and identically distributed Bernoulli trials. Pass to the embedded jump chain; by the strong Markov property at each event time the future is independent of the past given the state, and since the split probability is the same in every position the trials are i.i.d. A fill is the event that the first qqq labels are all executions, which has probability (μ/(μ+κ))q(\mu/(\mu+\kappa))^q(μ/(μ+κ))q.

The fill probability decays geometrically in depth and Equation (10) prices queueing behind size. Two extensions matter. First, the result is a lower bound on real fill probability because it excludes cancellations of the orders ahead, which also advance the position. If each of the q−1q-1q−1 orders ahead cancels independently at rate ν\nuν, then in position jjj the advancement rate is μ+(j−1)ν\mu+(j-1)\nuμ+(j−1)ν against abandonment κ\kappaκ, the races stay independent but cease to be identical, and the product becomes

P(fill)=∏j=1qμ+(j−1)νμ+(j−1)ν+κ,(11)\P(\text{fill})=\prod_{j=1}^{q}\frac{\mu+(j-1)\nu}{\mu+(j-1)\nu+\kappa}, \tag{11}P(fill)=j=1∏q​μ+(j−1)ν+κμ+(j−1)ν​,(11)

which exceeds Equation (10) for ν>0\nu>0ν>0 and collapses to it at ν=0\nu=0ν=0. Second, conditioning on a fill leaves each sojourn exponential with rate μ+κ\mu+\kappaμ+κ, so the expected time to fill given a fill is E[T∣fill]=q/(μ+κ)\E[T\mid\text{fill}]=q/(\mu+\kappa)E[T∣fill]=q/(μ+κ), distinct from the unconditional expected time to leave the level, (1−(μ/(μ+κ))q)/κ(1-(\mu/(\mu+\kappa))^q)/\kappa(1−(μ/(μ+κ))q)/κ. A trader weighs the discount of resting, the saved half-spread, against the non-fill risk and the adverse selection of fills that cluster exactly when the price is about to move against the resting side.

For a numerical case take execution rate μ=8\mu=8μ=8 and adverse-move rate κ=2\kappa=2κ=2 per second. A position q=4q=4q=4 fills with probability (8/10)4=0.4096(8/10)^4=0.4096(8/10)4=0.4096, in expected time 4/10=0.44/10=0.44/10=0.4 seconds given a fill. Letting the three orders ahead cancel at rate ν=1\nu=1ν=1 raises the fill probability to the product 810⋅911⋅1012⋅1113=0.462\tfrac{8}{10}\cdot\tfrac{9}{11}\cdot\tfrac{10}{12}\cdot\tfrac{11}{13}=0.462108​⋅119​⋅1210​⋅1311​=0.462 by Equation (11), the gain from queue attrition ahead of the order.

#Which way the mid moves

The same Poisson primitives that fill an order also move the price. Reduce each best queue to a birth-death walk with arrival rate λ\lambdaλ adding depth and depletion rate μ\muμ removing it, and let the mid tick up when the ask queue empties before the bid queue. The single-queue first-passage probability is the gambler's ruin [3].

Theorem9

A birth-death queue of size nnn with up-rate λ\lambdaλ and down-rate μ\muμ, started at 0<n<N0<n<N0<n<N, empties before reaching NNN with probability

h(n)=ρn−ρN1−ρN,ρ=μλ,(12)h(n)=\frac{\rho^{n}-\rho^{N}}{1-\rho^{N}},\qquad \rho=\frac{\mu}{\lambda}, \tag{12}h(n)=1−ρNρn−ρN​,ρ=λμ​,(12)

and when the queue drifts up, ρ<1\rho<1ρ<1, the probability it ever empties is lim⁡N→∞h(n)=ρ n=(μ/λ)n\lim_{N\to\infty}h(n)=\rho^{\,n}=(\mu/\lambda)^{n}limN→∞​h(n)=ρn=(μ/λ)n.

Proof

Only the embedded jump chain matters for which boundary is hit, since the holding times do not affect the order of jumps. In the jump chain the size rises by one with probability p=λ/(λ+μ)p=\lambda/(\lambda+\mu)p=λ/(λ+μ) and falls by one with probability 1−p=μ/(λ+μ)1-p=\mu/(\lambda+\mu)1−p=μ/(λ+μ). The absorption probability h(n)=Pn(hit 0 before N)h(n)=\P_n(\text{hit }0\text{ before }N)h(n)=Pn​(hit 0 before N) satisfies the harmonic equation h(n)=p h(n+1)+(1−p) h(n−1)h(n)=p\,h(n+1)+(1-p)\,h(n-1)h(n)=ph(n+1)+(1−p)h(n−1) with h(0)=1h(0)=1h(0)=1, h(N)=0h(N)=0h(N)=0. The general solution is h(n)=C1+C2ρnh(n)=C_1+C_2\rho^nh(n)=C1​+C2​ρn with ρ=(1−p)/p=μ/λ\rho=(1-p)/p=\mu/\lambdaρ=(1−p)/p=μ/λ, since ρ\rhoρ solves the characteristic equation pρ2−ρ+(1−p)=0p\rho^2-\rho+(1-p)=0pρ2−ρ+(1−p)=0. Imposing the boundary values gives C2=1/(1−ρN)C_2=1/(1-\rho^N)C2​=1/(1−ρN) and C1=−ρN/(1−ρN)C_1=-\rho^N/(1-\rho^N)C1​=−ρN/(1−ρN), which is Equation (12). Letting N→∞N\to\inftyN→∞ with ρ<1\rho<1ρ<1 sends ρN→0\rho^N\to 0ρN→0 and leaves ρn\rho^nρn.

Racing the two best queues, the mid ticks up when the ask empties first, an event whose probability increases in the imbalance I=Qb/(Qb+Qa)I=Q_b/(Q_b+Q_a)I=Qb​/(Qb​+Qa​), the bid share of touch depth. The monotonicity is a coupling argument. Raising QbQ_bQb​ at fixed QaQ_aQa​ lengthens the bid's first-passage time to zero pathwise while leaving the ask's unchanged, so the ask wins more often, and a heavier bid queue predicts an up move. Imbalance is therefore the natural state variable for the fair price, which the next section makes precise.

#The microprice

The mid is not the fair value. A heavy bid queue tilts the next move up, so the value conditional on the book sits above the mid, and the correction is a function of imbalance [4].

Definition10

The microprice is the expected mid at the next price move conditional on the current state, Ptmicro=E[Mτ∣Mt,It]P^{\mathrm{micro}}_t=\E[M_{\tau}\mid M_t,I_t]Ptmicro​=E[Mτ​∣Mt​,It​], where τ\tauτ is the time of the next mid move.

Theorem11

The microprice is the one-step minimum-mean-squared-error predictor of the next observed mid and decomposes as Ptmicro=Mt+g(It)P^{\mathrm{micro}}_t=M_t+g(I_t)Ptmicro​=Mt​+g(It​) with ggg odd about I=12I=\halfI=21​, g(12)=0g(\half)=0g(21​)=0, and ggg increasing in III. To first order in the tick it is the imbalance-weighted touch

Ptmicro=It At+(1−It) Bt.(13)P^{\mathrm{micro}}_t=I_t\,A_t+(1-I_t)\,B_t. \tag{13}Ptmicro​=It​At​+(1−It​)Bt​.(13)
Proof

By construction the microprice is the conditional expectation E[Mτ∣Mt,It]\E[M_\tau\mid M_t,I_t]E[Mτ​∣Mt​,It​], which Proposition 12 shows is the unique state-measurable predictor of MτM_\tauMτ​ minimising mean-squared error; the mid is the suboptimal special case, since E[Mτ∣Mt,It]−Mt=g(It)≠0\E[M_\tau\mid M_t,I_t]-M_t=g(I_t)\neq 0E[Mτ​∣Mt​,It​]−Mt​=g(It​)=0 off balance. The up-move probability of the previous section is increasing in III and symmetric under the swap I↦1−II\mapsto 1-II↦1−I with A↔BA\leftrightarrow BA↔B, so the expected signed mid move inherits oddness about I=12I=\halfI=21​, vanishing at I=12I=\halfI=21​ and increasing in III. Write the next mid move as ±s/2\pm s/2±s/2 to the opposite touch, up with probability pupp_{\mathrm{up}}pup​ and down otherwise, so Ptmicro−Mt=s2(2pup−1)P^{\mathrm{micro}}_t-M_t=\tfrac{s}{2}(2 p_{\mathrm{up}}-1)Ptmicro​−Mt​=2s​(2pup​−1). Linearising the gambler's-ruin up probability of the previous section as pup=It+O(tick)p_{\mathrm{up}}=I_t+O(\text{tick})pup​=It​+O(tick), that is taking imbalance to equal the up probability to first order, matches ItAt+(1−It)Bt=Mt+s(It−12)I_t A_t+(1-I_t)B_t=M_t+s(I_t-\half)It​At​+(1−It​)Bt​=Mt​+s(It​−21​), which is Equation (13).

At I=12I=\halfI=21​ the microprice is the mid; a full bid queue, I→1I\to 1I→1, pulls the fair value to the ask. The mid is a biased predictor of the next price and the microprice removes the bias, and the sense in which it is the right predictor is exact.

Proposition12

Among all predictors of the next mid measurable with respect to the current state, the microprice minimises mean-squared error.

Proof

For any state-measurable predictor ggg,

E[(Mτ−g)2]=E[(Mτ−Pmicro)2]+E[(Pmicro−g)2],(14)\E[(M_\tau-g)^2]=\E[(M_\tau-P^{\mathrm{micro}})^2]+\E[(P^{\mathrm{micro}}-g)^2], \tag{14}E[(Mτ​−g)2]=E[(Mτ​−Pmicro)2]+E[(Pmicro−g)2],(14)

since the cross term E[(Mτ−Pmicro)(Pmicro−g)]\E[(M_\tau-P^{\mathrm{micro}})(P^{\mathrm{micro}}-g)]E[(Mτ​−Pmicro)(Pmicro−g)] vanishes when both PmicroP^{\mathrm{micro}}Pmicro and ggg are state-measurable, by the orthogonality of the conditional expectation. The second term of Equation (14) is nonnegative and is zero exactly when g=Pmicro=E[Mτ∣Mt,It]g=P^{\mathrm{micro}}=\E[M_\tau\mid M_t,I_t]g=Pmicro=E[Mτ​∣Mt​,It​], so the microprice is the unique minimiser. The mid is the special case g=Mtg=M_tg=Mt​, which is suboptimal off balance by the squared bias g(It)2g(I_t)^2g(It​)2.

This is why execution and signal models condition on imbalance rather than on the mid alone.

#Information becomes impact

The spread and the queue defend against one hazard. A resting quote can be hit by a trader who knows more, and Kyle's model makes the resulting price impact exact in a batched auction [5].

Theorem13

A risk-neutral informed trader observes the terminal value V∼N(p0,Σ0)V\sim\mathcal N(p_0,\Sigma_0)V∼N(p0​,Σ0​) and submits demand xxx; noise traders submit u∼N(0,σu2)u\sim\mathcal N(0,\sigma_u^2)u∼N(0,σu2​) independent of VVV; a competitive market maker observes only the aggregate flow y=x+uy=x+uy=x+u and sets p=E[V∣y]p=\E[V\mid y]p=E[V∣y]. The unique linear equilibrium is

x=β (V−p0),p=p0+λ y,β=σuΣ0,λ=Σ02 σu,(15)x=\beta\,(V-p_0),\qquad p=p_0+\lambda\,y,\qquad \beta=\frac{\sigma_u}{\sqrt{\Sigma_0}},\qquad \lambda=\frac{\sqrt{\Sigma_0}}{2\,\sigma_u}, \tag{15}x=β(V−p0​),p=p0​+λy,β=Σ0​​σu​​,λ=2σu​Σ0​​​,(15)

and exactly half the prior variance is resolved, Var⁡(V∣y)=Σ0/2\Var(V\mid y)=\Sigma_0/2Var(V∣y)=Σ0​/2.

Proof

Conjecture the linear forms and solve for a consistent pair (β,λ)(\beta,\lambda)(β,λ). Given p=p0+λyp=p_0+\lambda yp=p0​+λy, and since xxx is a function of the observed VVV while uuu is independent of VVV with mean zero, E[ux∣V]=x E[u]=0\E[ux\mid V]=x\,\E[u]=0E[ux∣V]=xE[u]=0, so the informed trader's expected profit is

E[(V−p) x∣V]=E[(V−p0−λ(x+u)) x∣V]=(V−p0) x−λx2.(16)\E\big[(V-p)\,x\mid V\big]=\E\big[(V-p_0-\lambda(x+u))\,x\mid V\big]=(V-p_0)\,x-\lambda x^2. \tag{16}E[(V−p)x∣V]=E[(V−p0​−λ(x+u))x∣V]=(V−p0​)x−λx2.(16)

The objective is bounded above only if λ>0\lambda>0λ>0, for if λ≤0\lambda\le 0λ≤0 it is convex or linear in xxx and unbounded, so no optimal demand exists and there is no equilibrium. Under λ>0\lambda>0λ>0 the first-order condition (V−p0)−2λx=0(V-p_0)-2\lambda x=0(V−p0​)−2λx=0 gives x=(V−p0)/(2λ)x=(V-p_0)/(2\lambda)x=(V−p0​)/(2λ), the second derivative −2λ<0-2\lambda<0−2λ<0 confirms the maximum, and β=1/(2λ)\beta=1/(2\lambda)β=1/(2λ). Competition forces the maker to break even, p=E[V∣y]p=\E[V\mid y]p=E[V∣y], which Bertrand undercutting between two or more makers selects as the unique no-undercutting schedule. The pair (V,y)(V,y)(V,y) is jointly Gaussian with y=β(V−p0)+uy=\beta(V-p_0)+uy=β(V−p0​)+u of mean zero, so the projection theorem gives

E[V∣y]=p0+Cov⁡(V,y)Var⁡(y) y=p0+βΣ0β2Σ0+σu2 y,(17)\E[V\mid y]=p_0+\frac{\Cov(V,y)}{\Var(y)}\,y=p_0+\frac{\beta\Sigma_0}{\beta^2\Sigma_0+\sigma_u^2}\,y, \tag{17}E[V∣y]=p0​+Var(y)Cov(V,y)​y=p0​+β2Σ0​+σu2​βΣ0​​y,(17)

using Cov⁡(V,y)=βΣ0\Cov(V,y)=\beta\Sigma_0Cov(V,y)=βΣ0​ and Var⁡(y)=β2Σ0+σu2\Var(y)=\beta^2\Sigma_0+\sigma_u^2Var(y)=β2Σ0​+σu2​, so λ=βΣ0/(β2Σ0+σu2)\lambda=\beta\Sigma_0/(\beta^2\Sigma_0+\sigma_u^2)λ=βΣ0​/(β2Σ0​+σu2​). Substituting β=1/(2λ)\beta=1/(2\lambda)β=1/(2λ) and clearing denominators leaves Σ0+4λ2σu2=2Σ0\Sigma_0+4\lambda^2\sigma_u^2=2\Sigma_0Σ0​+4λ2σu2​=2Σ0​, hence λ2=Σ0/(4σu2)\lambda^2=\Sigma_0/(4\sigma_u^2)λ2=Σ0​/(4σu2​); the positive root is forced by λ>0\lambda>0λ>0 and by λ=Cov⁡(V,y)/Var⁡(y)\lambda=\Cov(V,y)/\Var(y)λ=Cov(V,y)/Var(y) sharing the sign of β\betaβ, giving Equation (15). The posterior variance is Var⁡(V∣y)=Σ0−Cov⁡(V,y)2/Var⁡(y)=Σ0−Σ0/2=Σ0/2\Var(V\mid y)=\Sigma_0-\Cov(V,y)^2/\Var(y)=\Sigma_0-\Sigma_0/2=\Sigma_0/2Var(V∣y)=Σ0​−Cov(V,y)2/Var(y)=Σ0​−Σ0​/2=Σ0​/2 on substituting the equilibrium β\betaβ. Within the linear class the system has this single positive solution, so the linear equilibrium is unique.

The impact slope λ\lambdaλ rises with the value uncertainty Σ0\Sigma_0Σ0​ the maker faces and falls with the noise volume σu\sigma_uσu​ that camouflages the informed order. Exactly half the private signal is impounded, since λβ=12\lambda\beta=\halfλβ=21​ gives E[ p−p0∣V ]=12(V−p0)\E[\,p-p_0\mid V\,]=\half(V-p_0)E[p−p0​∣V]=21​(V−p0​), the price companion of the variance result Var⁡(V∣y)=Σ0/2\Var(V\mid y)=\Sigma_0/2Var(V∣y)=Σ0​/2. The informed trader earns E[(V−p)x]=λσu2=12Σ0 σu\E[(V-p)x]=\lambda\sigma_u^2=\half\sqrt{\Sigma_0}\,\sigma_uE[(V−p)x]=λσu2​=21​Σ0​​σu​, paid by the noise traders against the break-even maker, increasing in both prior uncertainty and the noise volume to hide behind. Glosten-Milgrom is the sequential unit-trade dual in which the same wedge appears as a bid-ask spread rather than a slope, and the informed trader here is a strategic monopolist who shades demand, the factor 12\half21​ being exactly that restraint. In the continuous-time limit of NNN auctions the slope is constant in time and equal to Σ0/σu\sqrt{\Sigma_0}/\sigma_uΣ0​​/σu​ without the factor two, the posterior variance falls linearly to zero, Var⁡(V∣Ft)=Σ0(1−t)\Var(V\mid\Filt_t)=\Sigma_0(1-t)Var(V∣Ft​)=Σ0​(1−t), and the price runs as a Brownian bridge from p0p_0p0​ to VVV with full revelation at the close.

Take prior variance Σ0=4\Sigma_0=4Σ0​=4, so Σ0=2\sqrt{\Sigma_0}=2Σ0​​=2, and noise volatility σu=1\sigma_u=1σu​=1. Then λ=2/(2⋅1)=1\lambda=2/(2\cdot 1)=1λ=2/(2⋅1)=1, β=1/2\beta=1/2β=1/2, the product λβ=12\lambda\beta=\halfλβ=21​, the posterior variance is Σ0/2=2\Sigma_0/2=2Σ0​/2=2, and the informed trader's expected profit is 12Σ0 σu=1\half\sqrt{\Sigma_0}\,\sigma_u=121​Σ0​​σu​=1. The continuous-time slope on the same primitives is Σ0/σu=2\sqrt{\Sigma_0}/\sigma_u=2Σ0​​/σu​=2, twice the single-period value, the factor the two settings must not share. Glosten-Milgrom and Kyle price the same informational wedge through different mechanisms.

FeatureGlosten-MilgromKyle
Trade structureSequential unit tradesOne batched auction
Informed traderPrice takerStrategic monopolist
Price objectBid and ask quotesOne linear price
WedgeSpread π(VH−VL)\pi(V_H-V_L)π(VH​−VL​)Slope λ=Σ0/(2σu)\lambda=\sqrt{\Sigma_0}/(2\sigma_u)λ=Σ0​​/(2σu​)
Information revealedToward full over many tradesHalf the variance in one shot

#Inventory and the maker's reservation price

Adverse selection is one cost the maker bears; inventory risk is the other. A maker filled on one side accumulates a position in an asset whose value moves, and a risk-averse maker prices that exposure into its quotes, skewing them to mean-revert inventory toward zero [6].

Theorem14

A maker with constant absolute risk aversion γ\gammaγ holding inventory qqq in an asset whose mid sss follows arithmetic Brownian motion with volatility σ\sigmaσ over a remaining horizon T−tT-tT−t values the inventory at the certainty equivalent s q−12γσ2q2(T−t)s\,q-\half\gamma\sigma^2 q^2(T-t)sq−21​γσ2q2(T−t), and its reservation price, the per-unit indifference value at which it will add one more unit, is

r(s,q,t)=s−q γσ2(T−t).(18)r(s,q,t)=s-q\,\gamma\sigma^2(T-t). \tag{18}r(s,q,t)=s−qγσ2(T−t).(18)
Proof

Under exponential utility and a Gaussian mid the certainty equivalent of holding qqq units to the horizon is the mean value minus a risk penalty equal to half the risk aversion times the variance of the terminal position, E[sT]q−12γVar⁡(sT)q2=s q−12γσ2(T−t)q2\E[s_T]q-\half\gamma\Var(s_T)q^2=s\,q-\half\gamma\sigma^2(T-t)q^2E[sT​]q−21​γVar(sT​)q2=sq−21​γσ2(T−t)q2, since the arithmetic Brownian mid has E[sT]=s\E[s_T]=sE[sT​]=s and Var⁡(sT)=σ2(T−t)\Var(s_T)=\sigma^2(T-t)Var(sT​)=σ2(T−t). The reservation price is the marginal certainty equivalent, the derivative with respect to qqq, ∂q(s q−12γσ2q2(T−t))=s−qγσ2(T−t)\partial_q\big(s\,q-\half\gamma\sigma^2 q^2(T-t)\big)=s-q\gamma\sigma^2(T-t)∂q​(sq−21​γσ2q2(T−t))=s−qγσ2(T−t), which is Equation (18). A long maker, q>0q>0q>0, prices below the mid to encourage selling the inventory off, and a short maker prices above it, with the skew vanishing at the horizon.

The reservation price is where the maker centres its quotes, and the optimal half-spread around it trades the profit of a wider quote against the lower fill rate it implies. Solving the maker's utility maximisation against an exponential fill intensity λ(δ)=A e−κδ\lambda(\delta)=A\,e^{-\kappa\delta}λ(δ)=Ae−κδ in the quote distance δ\deltaδ gives the Avellaneda-Stoikov optimal total spread

δa+δb=γσ2(T−t)+2γln⁡ ⁣(1+γκ),(19)\delta_a+\delta_b=\gamma\sigma^2(T-t)+\frac{2}{\gamma}\ln\!\Big(1+\frac{\gamma}{\kappa}\Big), \tag{19}δa​+δb​=γσ2(T−t)+γ2​ln(1+κγ​),(19)

with the bid and ask placed symmetrically about the reservation price rather than about the mid [7]. As a worked case take s=100s=100s=100, risk aversion γ=0.1\gamma=0.1γ=0.1, volatility σ=0.5\sigma=0.5σ=0.5 so σ2=0.25\sigma^2=0.25σ2=0.25, horizon T−t=1T-t=1T−t=1, and fill decay κ=1.5\kappa=1.5κ=1.5. The total spread is 0.1⋅0.25⋅1+20.1ln⁡(1+0.1/1.5)=0.025+1.291=1.3160.1\cdot 0.25\cdot 1+\tfrac{2}{0.1}\ln(1+0.1/1.5)=0.025+1.291=1.3160.1⋅0.25⋅1+0.12​ln(1+0.1/1.5)=0.025+1.291=1.316, a half-spread of 0.6580.6580.658, and the reservation price and quotes skew with inventory.

Inventory qqqReservation rrrBidAsk
+5+5+5 (long)99.87599.87599.87599.21799.21799.217100.533100.533100.533
000 (flat)100.000100.000100.00099.34299.34299.342100.658100.658100.658
−5-5−5 (short)100.125100.125100.12599.46799.46799.467100.783100.783100.783

The long maker lowers both quotes to sell its position down, the short maker raises them to buy back, and the reservation skew qγσ2(T−t)q\gamma\sigma^2(T-t)qγσ2(T−t) is the inventory leg of the spread that sits beside the adverse-selection leg of Glosten and Milgrom and the order-processing leg of Roll.

#Optimal execution

Price formation tells a trader what the book will do. Execution asks what the trader should do in return, liquidating a position without paying away the impact the previous sections priced [8].

Theorem15

Liquidate XXX shares over [0,T][0,T][0,T] with holdings x(t)x(t)x(t), x(0)=Xx(0)=Xx(0)=X, x(T)=0x(T)=0x(T)=0. Let temporary impact cost the rate η x˙(t)2\eta\,\dot x(t)^2ηx˙(t)2 and let the unaffected price carry volatility σ\sigmaσ, with mean-variance risk aversion γ\gammaγ. The trajectory minimising E[cost]+γVar⁡[cost]\E[\text{cost}]+\gamma \Var[\text{cost}]E[cost]+γVar[cost] solves η x¨=γσ2x\eta\,\ddot x=\gamma\sigma^2 xηx¨=γσ2x, giving

x(t)=X sinh⁡ ⁣(θ(T−t))sinh⁡(θT),θ=γσ2η,(20)x(t)=X\,\frac{\sinh\!\big(\theta(T-t)\big)}{\sinh(\theta T)},\qquad \theta=\sqrt{\frac{\gamma\sigma^2}{\eta}}, \tag{20}x(t)=Xsinh(θT)sinh(θ(T−t))​,θ=ηγσ2​​,(20)

which front-loads selling, and the risk-neutral limit γ→0\gamma\to 0γ→0 is the straight line x(t)=X(1−t/T)x(t)=X(1-t/T)x(t)=X(1−t/T) of constant participation.

Proof

Optimise over deterministic, pre-committed trajectories x(t)x(t)x(t). Temporary impact accumulates expected cost η∫0Tx˙2 dt\eta\int_0^T\dot x^2\,dtη∫0T​x˙2dt, and the residual position held against a random walk of volatility σ\sigmaσ incurs price risk ∫0Tx(t) dWt\int_0^T x(t)\,dW_t∫0T​x(t)dWt​ of mean zero and, by the Ito isometry on the deterministic integrand, variance σ2∫0Tx2 dt\sigma^2\int_0^T x^2\,dtσ2∫0T​x2dt, the permanent-impact term being path-independent and dropped. The objective is the functional

J[x]=∫0T(η x˙2+γσ2x2) dt.(21)J[x]=\int_0^T\big(\eta\,\dot x^2+\gamma\sigma^2 x^2\big)\,dt. \tag{21}J[x]=∫0T​(ηx˙2+γσ2x2)dt.(21)

Its Euler-Lagrange equation ddt(2ηx˙)=2γσ2x\frac{d}{dt}(2\eta\dot x)=2\gamma\sigma^2 xdtd​(2ηx˙)=2γσ2x reduces to ηx¨=γσ2x\eta\ddot x=\gamma\sigma^2 xηx¨=γσ2x, a linear second-order equation with general solution x(t)=C1eθt+C2e−θtx(t)=C_1 e^{\theta t}+C_2 e^{-\theta t}x(t)=C1​eθt+C2​e−θt and θ=γσ2/η\theta=\sqrt{\gamma\sigma^2/\eta}θ=γσ2/η​. The boundary conditions x(0)=Xx(0)=Xx(0)=X, x(T)=0x(T)=0x(T)=0 select the hyperbolic-sine combination Equation (20), the optimal schedule within the deterministic class. As γ→0\gamma\to 0γ→0 the equation becomes x¨=0\ddot x=0x¨=0, whose boundary solution is the straight line, and as γ→∞\gamma\to\inftyγ→∞ the trajectory liquidates immediately.

The two limits are the entire trade-off. A patient risk-neutral trader spreads the order uniformly to minimise impact, and a risk-averse trader front-loads to cut exposure to price risk, the curvature θ\thetaθ setting the urgency. Kyle's λ\lambdaλ is the permanent-impact slope that the trajectory pays once on net, while η\etaη is the temporary slope it pays on every instant of trading, the same linearity producing two distinct costs.

As a worked case set the urgency so that θT=2\theta T=2θT=2. The fraction of the position still held at the midpoint of the schedule is x(T/2)/X=sinh⁡(θT/2)/sinh⁡(θT)=sinh⁡1/sinh⁡2=0.324x(T/2)/X=\sinh(\theta T/2)/\sinh(\theta T)=\sinh 1/\sinh 2=0.324x(T/2)/X=sinh(θT/2)/sinh(θT)=sinh1/sinh2=0.324, so 67.6%67.6\%67.6% of the order is sold in the first half of the window, the front-loading a risk-averse trader chooses. Sending θ→0\theta\to 0θ→0 flattens the curve to the straight-line schedule x(t)=X(1−t/T)x(t)=X(1-t/T)x(t)=X(1−t/T), which holds exactly half the position at t=T/2t=T/2t=T/2.

#Transient impact and resilience

Kyle's impact is permanent and the Almgren-Chriss temporary impact vanishes the instant trading stops. Real impact lies between. A market order consumes depth and pushes the price, then the book replenishes and the price relaxes part of the way back, so impact is transient and the speed of its decay is the resilience of the book [9].

Model the displacement of a signed trade of size vvv at time zero as κv\kappa vκv, relaxing at rate ρ\rhoρ, so its contribution to the price at time ttt is κve−ρt\kappa v e^{-\rho t}κve−ρt. For a trading rate v˙s\dot v_sv˙s​ the impact is the convolution of the flow against the resilience kernel,

It=∫0tG(t−s) v˙s ds,G(τ)=κ e−ρτ.(22)I_t=\int_0^t G(t-s)\,\dot v_s\,ds,\qquad G(\tau)=\kappa\,e^{-\rho\tau}. \tag{22}It​=∫0t​G(t−s)v˙s​ds,G(τ)=κe−ρτ.(22)
Proposition16

Under Equation (22) a constant trading rate v˙s≡c\dot v_s\equiv cv˙s​≡c drives the impact to the steady state I∞=κc/ρI_\infty=\kappa c/\rhoI∞​=κc/ρ, while a single block of size vvv followed by no trading leaves a residual impact that halves every (ln⁡2)/ρ(\ln 2)/\rho(ln2)/ρ in time.

Proof

For the constant rate, It=κc∫0te−ρ(t−s) ds=κcρ(1−e−ρt)→κcρI_t=\kappa c\int_0^t e^{-\rho(t-s)}\,ds=\dfrac{\kappa c}{\rho}(1-e^{-\rho t}) \to\dfrac{\kappa c}{\rho}It​=κc∫0t​e−ρ(t−s)ds=ρκc​(1−e−ρt)→ρκc​. For the block, taking v˙s=v δ(s)\dot v_s=v\,\delta(s)v˙s​=vδ(s) gives It=κve−ρtI_t=\kappa v e^{-\rho t}It​=κve−ρt, which falls by half when e−ρt=12e^{-\rho t}=\halfe−ρt=21​, that is at t=(ln⁡2)/ρt=(\ln 2)/\rhot=(ln2)/ρ.

The steady state is the standing impact a sustained participation rate maintains, the resilience pulling against the trading pushing, and the model recovers the two extremes as limits, ρ→0\rho\to 0ρ→0 giving permanent impact and ρ→∞\rho\to\inftyρ→∞ giving purely temporary impact. A linear propagator must respect a no-arbitrage constraint, since a kernel that relaxed the wrong way would let a round trip profit, and the Gatheral condition gives a sufficient guarantee, that for linear impact a non-increasing and convex kernel GGG excludes price manipulation, a test the exponential resilience passes [10]. Under Equation (22) the optimal liquidation is no longer the smooth Almgren-Chriss curve but a discrete block at the start, a constant rate through the middle, and a block at the close, the trader hitting fresh depth hard, coasting on resilience, and clearing the residual at the end. As a numerical case, three unit buys spaced by τ=(ln⁡2)/ρ\tau=(\ln 2)/\rhoτ=(ln2)/ρ leave cumulative impact κ(1+12+14)=74κ\kappa(1+\half+\tfrac14)=\tfrac74\kappaκ(1+21​+41​)=47​κ just after the third trade, against 3κ3\kappa3κ with no decay, the resilience having absorbed the rest.

#Order-flow memory and the square-root law

The propagator Equation (22) generalises from a single decay rate to an arbitrary kernel, and that generalisation explains the empirical impact law the linear models miss. Write the price as the sum of past trades filtered through a decaying kernel,

pt=p0+∑s<tG(t−s) εs+noise,(23)p_t=p_0+\sum_{s<t}G(t-s)\,\varepsilon_s+\text{noise}, \tag{23}pt​=p0​+s<t∑​G(t−s)εs​+noise,(23)

where εs∈{−1,+1}\varepsilon_s\in\{-1,+1\}εs​∈{−1,+1} is the sign of the trade at sss and G(τ)∝τ−βG(\tau)\propto\tau^{-\beta}G(τ)∝τ−β decays as a power law. The order-flow signs are not independent, since splitting and herding give them long memory, an autocorrelation C(ℓ)=E[εtεt−ℓ]∝ℓ−γC(\ell)=\E[\varepsilon_t\varepsilon_{t-\ell}]\propto\ell^{-\gamma}C(ℓ)=E[εt​εt−ℓ​]∝ℓ−γ with 0<γ<10<\gamma<10<γ<1, so a buy is followed by more buys for a long time.

Persistent flow through a fixed kernel would make the price predictable, which arbitrage forbids, so the kernel decay and the flow memory are locked together. Requiring price increments to be serially uncorrelated, the diffusive efficiency condition, forces

β=1−γ2.(24)\beta=\frac{1-\gamma}{2}. \tag{24}β=21−γ​.(24)

The argument is a scaling balance, since the autocovariance of price increments pairs the kernel response GGG against the flow correlation CCC, and the two power laws cancel to leading order only at this exponent, the delicate balance that keeps a market made of autocorrelated orders statistically efficient [11]. The same balance produces the square-root law, that the impact of a metaorder of size QQQ grows as

ΔP≈Y σQ/V,(25)\Delta P\approx Y\,\sigma\sqrt{Q/\mathcal V}, \tag{25}ΔP≈YσQ/V​,(25)

concave rather than linear against the daily volume V\mathcal VV, because the early child orders of the metaorder are partially relaxed by the power-law kernel before the later ones land, so doubling the size less than doubles the impact. The concavity is a consequence of the decaying propagator and the long memory of flow rather than an independent assumption, while the precise one-half exponent is the robust empirical value that the locally linear latent-supply picture reproduces, and the prefactor YYY is genuinely empirical and of order one. That is the honest status of the law, a concave shape that follows from order-flow memory and resilience, sitting on a measured exponent and prefactor.

#Summary of results

Each model is a statement about the same object under its own assumptions.

ResultStatementKey assumption
Efficient priceSt∗=E[V∣Ft]S^\ast_t=\E[V\mid\Filt_t]St∗​=E[V∣Ft​] is a martingaleV∈L1V\in L^1V∈L1
Roll spreadCov⁡(Δpt,Δpt−1)=−s2/4\Cov(\Delta p_t,\Delta p_{t-1})=-s^2/4Cov(Δpt​,Δpt−1​)=−s2/4I.i.d. symmetric sides, independent of value
Glosten-MilgromSpread =π(VH−VL)=\pi(V_H-V_L)=π(VH​−VL​)Sequential unit trades, competitive maker
Fill probability(μ/(μ+κ))q(\mu/(\mu+\kappa))^q(μ/(μ+κ))qConstant rates, execution-only advance
Mid moveh(n)=(ρn−ρN)/(1−ρN)h(n)=(\rho^n-\rho^N)/(1-\rho^N)h(n)=(ρn−ρN)/(1−ρN)Birth-death queue, embedded jump chain
MicropriceIA+(1−I)BI A+(1-I)BIA+(1−I)B to first orderSymmetric tick moves, imbalance state
Kyle impactλ=Σ0/(2σu)\lambda=\sqrt{\Sigma_0}/(2\sigma_u)λ=Σ0​​/(2σu​)Gaussian value and noise, linear conjecture
Reservation pricer=s−qγσ2(T−t)r=s-q\gamma\sigma^2(T-t)r=s−qγσ2(T−t)CARA maker, Gaussian mid
Executionx(t)=Xsinh⁡(θ(T−t))/sinh⁡(θT)x(t)=X\sinh(\theta(T-t))/\sinh(\theta T)x(t)=Xsinh(θ(T−t))/sinh(θT)Linear temporary impact, mean-variance
Transient impactIt=∫0tκe−ρ(t−s)v˙s dsI_t=\int_0^t\kappa e^{-\rho(t-s)}\dot v_s\,dsIt​=∫0t​κe−ρ(t−s)v˙s​dsExponential resilience, convex kernel
Square-root lawΔP∝Q\Delta P\propto\sqrt{Q}ΔP∝Q​Power-law propagator, long-memory flow

#Numerical illustration

Roll's identity Equation (3) is exact in expectation, so a long simulated print series recovers the spread it was given from the first serial covariance alone.

import numpy as np
from numpy.random import Generator


def simulate_prints(
    sigma: float, spread: float, n: int, rng: Generator
) -> np.ndarray:
    """Simulate transaction prints under Roll's bid-ask bounce model.

    Args:
        sigma: Standard deviation of the efficient-price innovations.
        spread: Effective spread; trades print at the efficient price plus or
            minus half the spread.
        n: Number of prints.
        rng: Seeded generator for reproducibility.

    Returns:
        The transaction price series of length n.
    """
    efficient = np.cumsum(rng.normal(0.0, sigma, size=n))
    side = rng.choice([-1.0, 1.0], size=n)
    return efficient + 0.5 * spread * side


def estimate_spread(prints: np.ndarray) -> float:
    """Recover the effective spread from the first serial covariance.

    Args:
        prints: A transaction price series.

    Returns:
        The Roll estimate 2 * sqrt(-cov) of the spread when the lag-one
        covariance of price changes is negative, and zero otherwise.
    """
    changes = np.diff(prints)
    cov = np.cov(changes[1:], changes[:-1])[0, 1]
    return 2.0 * np.sqrt(-cov) if cov < 0.0 else 0.0


rng = np.random.default_rng(0)
prints = simulate_prints(sigma=0.01, spread=0.05, n=500_000, rng=rng)
recovered = estimate_spread(prints)

The efficient price is the martingale the order book tracks. The spread is the cost of the bounce and of adverse selection, the queue sets who is filled and which way the price tips, the microprice corrects the mid for imbalance, Kyle's slope turns information into impact, and the execution trajectory pays that impact back at the least total cost. Each is a theorem about the same object, a priority queue carrying information.

[1]
R. Roll, “A simple implicit measure of the effective bid-ask spread in an efficient market,” The Journal of Finance, vol. 39, no. 4, pp. 1127–1139, 1984.
[2]
L. R. Glosten and P. R. Milgrom, “Bid, ask and transaction prices in a specialist market with heterogeneously informed traders,” Journal of Financial Economics, vol. 14, no. 1, pp. 71–100, 1985.
[3]
R. Cont, S. Stoikov, and R. Talreja, “A stochastic model for order book dynamics,” Operations Research, vol. 58, no. 3, pp. 549–563, 2010.
[4]
S. Stoikov, “The micro-price: a high-frequency estimator of future prices,” Quantitative Finance, vol. 18, no. 12, pp. 1959–1966, 2018.
[5]
A. S. Kyle, “Continuous auctions and insider trading,” Econometrica, vol. 53, no. 6, pp. 1315–1335, 1985.
[6]
T. Ho and H. R. Stoll, “Optimal dealer pricing under transactions and return uncertainty,” Journal of Financial Economics, vol. 9, no. 1, pp. 47–73, 1981.
[7]
M. Avellaneda and S. Stoikov, “High-frequency trading in a limit order book,” Quantitative Finance, vol. 8, no. 3, pp. 217–224, 2008.
[8]
J.-P. Bouchaud, J. Bonart, J. Donier, and M. Gould, Trades, Quotes and Prices: Financial Markets Under the Microscope. Cambridge University Press, 2018.
[9]
A. A. Obizhaeva and J. Wang, “Optimal trading strategy and supply/demand dynamics,” Journal of Financial Markets, vol. 16, no. 1, pp. 1–32, 2013.
[10]
J. Gatheral, “No-dynamic-arbitrage and market impact,” Quantitative Finance, vol. 10, no. 7, pp. 749–759, 2010.
[11]
J.-P. Bouchaud, Y. Gefen, M. Potters, and M. Wyart, “Fluctuations and response in financial markets: the subtle nature of random price changes,” Quantitative Finance, vol. 4, no. 2, pp. 176–190, 2004.

Part 2 of 2 in Market Microstructure

← previousThe Limit Order Book

Explore connections

see in the atlas →

related

  • Statistical Arbitrage
  • Probability Spaces and Random Variables
  • Martingales

referenced by (2)

  • Convex Duality and the KKT Conditions
  • Convex Sets and Functions
cite
@misc{price-formation-in-the-order-book,
  author = {Zac Kienzle},
  title  = {Price Formation in the Order Book},
  year   = {2026},
  month  = {05},
  url    = {https://zackienzle.com/blog/price-formation-in-the-order-book}
}