Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Optimal Market Making

Introduction

The market-making problem asks: given that you commit to quote firm bid and ask prices, how should those prices depend on your current inventory, the asset’s price dynamics, the arrival rate and price-sensitivity of client orders, your risk preferences, and the liquidity cost of closing your position? Chapter Market Making Fundamentals introduced the economic intuitions qualitatively. This chapter provides the mathematical answers.

We proceed in four stages. We begin with the classic market-microstructure models (Classic market-making models) — Grossman-Miller Grossman & Miller, 1988 and Glosten-Milgrom Glosten & Milgrom, 1985 — and derive their key results in full, treating them as static equilibrium benchmarks that characterize inventory risk and information-asymmetry spreads respectively. We then move to the single-trade model (The single-trade model): a dealer receives one RfQ, quotes a spread, and — if she wins — must liquidate the resulting inventory by end of day at market. This minimal dynamic problem captures all three spread components (static trade uncertainty, inventory risk, liquidity cost) in a single closed-form expression and extends cleanly to the multi-asset case via the covariance matrix of instrument prices.

The Avellaneda-Stoikov (AS) framework (Beyond a single trade: the Avellaneda-Stoikov framework) generalises to a continuous stream of orders: the dealer posts live bid and ask prices that attract arrivals from a Poisson process with exponentially decreasing intensity. We derive the Hamilton–Jacobi–Bellman (HJB) equation in the general multi-asset setting, reducing the optimisation to a system of nonlinear ODEs for a scalar indifference function u(t,q)u(t, \mathbf{q}), and show how the optimal quotes depend on the first- and second-order discrete derivatives of uu with respect to inventory. Section Asymptotic approximations then develops the Guéant-Lehalle-Fernández-Tapia (GLF) infinite-horizon approximation Guéant et al., 2013, which linearises the system and yields closed-form expressions for the optimal spread and inventory-skew, making the parameter dependences explicit.

Section Applications to LOBs and RfQs discusses the application of the AS framework to both limit order books (the original context) and RfQ dealer markets. Finally, section Enriching Avellaneda-Stoikov collects four extensions that enrich the baseline model: a liquidity penalty that closes the loop with the single-trade model; Ornstein-Uhlenbeck mid-price dynamics that incorporate relative-value beliefs; asymmetric order flow (flow imbalance); and client segmentation as treated in the D2C context of chapter Modelling RfQs in Dealer to Client Markets.

Mathematical prerequisites are the stochastic calculus of chapter Stochastic Calculus (Itô’s lemma, Poisson processes) and the stochastic optimal control tools of chapter Stochastic Optimal Control (HJB equations, value functions).

Classic market-making models

Grossman-Miller: inventory risk

The model of Grossman & Miller (1988) isolates inventory risk in a stylised three-period setting. There are nn identical market makers (MMs) and two waves of liquidity traders. At t=1t = 1, a liquidity trader LT1_1 needs to sell i>0i > 0 units immediately. At t=2t = 2, a second liquidity trader LT2_2 needs to buy the same ii units. Time t=3t = 3 is the terminal date at which all agents liquidate. MMs start at t=1t = 1 with cash W0W_0 and zero inventory. The asset price follows

S1=Sˉ,S3=S2+ε,εN(0,σ2)S_1 = \bar{S}, \qquad S_3 = S_2 + \varepsilon, \quad \varepsilon \sim \mathcal{N}(0, \sigma^2)

where S2S_2 is to be determined in equilibrium, and ε\varepsilon is unknown at t=1t = 1. All agents have exponential (CARA) utility U(W)=eγWU(W) = -e^{-\gamma W} with risk-aversion coefficient γ>0\gamma > 0.

Equilibrium at t=2t = 2. When LT2_2 arrives at t=2t = 2, each MM holds i/ni/n units purchased at t=1t = 1. Each MM’s terminal wealth if she sells all her inventory at S2S_2 is deterministic: W0+(S2S1)i/nW_0 + (S_2 - S_1) \cdot i/n. If, instead, some inventory were carried to t=3t = 3 at the risky price S3S_3, the MM would demand a risk premium. In competitive equilibrium with symmetric MMs, LT2_2 absorbs the full supply ii at price S2=S1S_2 = S_1 — MMs sell at the same price they bought, earning zero on the round trip Grossman & Miller, 1988.

Equilibrium at t=1t = 1. The MMs anticipate selling at S2=S1S_2 = S_1 at t=2t = 2, but S1S_1 itself is the quantity to be determined. Each MM purchases q=i/nq = i/n units at price S1=pbidS_1 = p_{\mathrm{bid}}. Her wealth at t=3t = 3 if she unwinds at t=2t = 2 is:

W=W0+(S2pbid)qW = W_0 + (S_2 - p_{\mathrm{bid}}) \cdot q

Since S2S_2 is uncertain from the t=1t=1 perspective (it depends on the new information arriving between t=1t = 1 and t=2t = 2, modelled as S2=Sˉ+ηS_2 = \bar{S} + \eta with ηN(0,σ2)\eta \sim \mathcal{N}(0, \sigma^2)), the MM faces price risk over the holding period. For CARA utility, the certainty equivalent of a normally distributed payoff XN(μ,σ2)X \sim \mathcal{N}(\mu, \sigma^2) is

CE[X]=μγ2σ2\mathrm{CE}[X] = \mu - \frac{\gamma}{2}\sigma^2

The MM’s certainty equivalent of buying q=i/nq = i/n units at pbidp_{\mathrm{bid}} and selling them at the risky S2S_2 is:

CE[W]=W0+(Sˉpbid)inγ2σ2(in)2\mathrm{CE}[W] = W_0 + \bigl(\bar{S} - p_{\mathrm{bid}}\bigr) \cdot \frac{i}{n} - \frac{\gamma}{2}\sigma^2 \cdot \left(\frac{i}{n}\right)^2

For the MM to be willing to absorb LT1_1’s sale — i.e., CE[W]W0\mathrm{CE}[W] \geq W_0 — the bid price must satisfy

pbidSˉγσ2(i/n)1=Sˉiγσ2np_{\mathrm{bid}} \leq \bar{S} - \frac{\gamma\sigma^2 \cdot (i/n)}{1} = \bar{S} - \frac{i\gamma\sigma^2}{n}

In competitive equilibrium, the bid is as large as possible consistent with MM participation, giving the Grossman-Miller spread:

pbid=Sˉiγσ2n,spreadGM=2iγσ2n\boxed{p_{\mathrm{bid}} = \bar{S} - \frac{i\,\gamma\,\sigma^2}{n}, \qquad \text{spread}_{\mathrm{GM}} = 2\,\frac{i\,\gamma\,\sigma^2}{n}}

The spread compensates the nn MMs collectively for bearing inventory risk on ii units for one period. It increases with volatility σ2\sigma^2, trade size ii, and risk aversion γ\gamma, and decreases with the number of competing MMs nn — compression to zero as nn \to \infty reflects perfect competition eliminating rents. Chapter Market Making Fundamentals (Market-making risks and trade-offs) presents the economic interpretation; the notebook notebooks/market_making.ipynb illustrates the parameter sensitivities.

Glosten-Milgrom: information asymmetry

The model of Glosten & Milgrom (1985) isolates adverse selection. A single competitive MM quotes firm bid bb and ask aa. The asset has a binary future value vv:

v=VH with probability p,v=VL with probability 1p,VH>VLv = V_H \text{ with probability } p, \qquad v = V_L \text{ with probability } 1-p, \quad V_H > V_L

with prior mean μ=pVH+(1p)VL\mu = p V_H + (1-p) V_L. A fraction α[0,1]\alpha \in [0,1] of all counterparties are informed traders who know vv; the remaining fraction 1α1-\alpha are uninformed liquidity traders who buy or sell with probability 12\frac{1}{2} each, regardless of prices. Informed traders act optimally: they buy if v=VH>av = V_H > a, sell if v=VL<bv = V_L < b, and do nothing otherwise.

Zero-profit ask. By Bayes’ theorem, the probability the counterparty is informed conditional on a buy order is:

P(informedbuy)=αpαp+(1α)/2P(\text{informed} \mid \text{buy}) = \frac{\alpha p}{\alpha p + (1-\alpha)/2}

The MM’s expected profit on a buy is:

E[πbuy]=aE[vbuy]\mathbb{E}[\pi \mid \text{buy}] = a - \mathbb{E}[v \mid \text{buy}]
E[vbuy]=αpVH+(1α)/2μαp+(1α)/2\mathbb{E}[v \mid \text{buy}] = \frac{\alpha p\, V_H + (1-\alpha)/2\, \cdot \mu}{\alpha p + (1-\alpha)/2}

Setting E[πbuy]=0\mathbb{E}[\pi \mid \text{buy}] = 0 gives the zero-profit ask. Analogously for the bid. For the symmetric case p=12p = \frac{1}{2}, so μ=VH+VL2\mu = \frac{V_H + V_L}{2} and both informed buy/sell flows are equally likely, the expressions simplify:

E[vbuy]=α/2VH+(1α)/2μα/2+(1α)/2=αVH+(1α)μ=μ+α(VHμ)\mathbb{E}[v \mid \text{buy}] = \frac{\alpha/2 \cdot V_H + (1-\alpha)/2 \cdot \mu}{\alpha/2 + (1-\alpha)/2} = \alpha V_H + (1-\alpha)\mu = \mu + \alpha(V_H - \mu)

The Glosten-Milgrom quotes in the symmetric case are therefore:

a=μ+α(VHμ),b=μα(μVL),spreadGL=α(VHVL)\boxed{a = \mu + \alpha(V_H - \mu), \qquad b = \mu - \alpha(\mu - V_L), \qquad \text{spread}_{\mathrm{GL}} = \alpha(V_H - V_L)}

The spread is strictly proportional to α\alpha — the fraction of informed flow — and to the magnitude of the informational asymmetry VHVLV_H - V_L. With α=0\alpha = 0 (no informed traders), competitive pressure eliminates the spread entirely. As α1\alpha \to 1, the ask approaches VHV_H and the bid approaches VLV_L: the MM refuses to quote inside the full range of possible values because any trade would be a loss.

In the general asymmetric case (p12p \neq \frac{1}{2}), the ask and bid shift asymmetrically around μ\mu, but the qualitative message is identical: the spread compensates the MM for the expected loss on informed trades, funded by the expected gain on uninformed trades.

The single-trade model

Before tackling the full dynamic AS framework, we study the simplest non-trivial problem: a dealer receives one RfQ, quotes a half-spread δ\delta, and — if she wins — must unwind the resulting inventory by the end of the day TT. This model connects directly to chapter Modelling RfQs in Dealer to Client Markets but adds the explicit inventory liquidation and its market-impact cost.

Setup

The dealer holds an existing multi-asset inventory q0Rd\mathbf{q}_0 \in \mathbb{R}^d at time t0t_0. A client sends an RfQ for instrument ii of size qˉ\bar{q} (e.g. a buy RfQ: the client wishes to buy qˉ\bar{q} units). The multi-asset mid-price vector St0=s0\mathbf{S}_{t_0} = \mathbf{s}_0 evolves as

dSt=ΣdWtd\mathbf{S}_t = \boldsymbol{\Sigma}\, d\mathbf{W}_t

where ΣRd×d\boldsymbol{\Sigma} \in \mathbb{R}^{d \times d} and Wt\mathbf{W}_t is a dd-dimensional Brownian motion, so STs0N(0,Γ(Tt0))\mathbf{S}_T - \mathbf{s}_0 \sim \mathcal{N}(\mathbf{0},\, \boldsymbol{\Gamma}(T-t_0)) with covariance matrix Γ=ΣΣTRd×d\boldsymbol{\Gamma} = \boldsymbol{\Sigma}\boldsymbol{\Sigma}^T \in \mathbb{R}^{d\times d}.

If the dealer wins the RfQ with half-spread δi\delta^i (she sells qˉ\bar{q} units at s0i+δis_0^i + \delta^i), her new inventory is q1=q0qˉei\mathbf{q}_1 = \mathbf{q}_0 - \bar{q}\,\mathbf{e}_i. She then liquidates q1\mathbf{q}_1 by time TT at market, incurring a liquidity cost (q1)\ell(\mathbf{q}_1) to account for the bid-offer spread and market impact of closing a position of that size. The client’s RfQ hit probability is f(δi)=ekδif(\delta^i) = e^{-k\delta^i} (exponential demand, as in chapter Modelling RfQs in Dealer to Client Markets).

Optimal spread

The dealer’s terminal wealth if she wins is:

WThit=qˉ(s0i+δi)qˉSTi+q1ST(q1)W_T^{\mathrm{hit}} = \bar{q}(s_0^i + \delta^i) - \bar{q}\,S_T^i + \mathbf{q}_1 \cdot \mathbf{S}_T - \ell(\mathbf{q}_1)

The first two terms represent the transaction: she sells at s0i+δis_0^i + \delta^i and eventually buys back at STiS_T^i (which equals s0is_0^i plus the Brownian increment). The third term is the mark-to-market of the residual position. Rearranging:

WThit=qˉδi+q0s0+q1(STs0)(q1)W_T^{\mathrm{hit}} = \bar{q}\,\delta^i + \mathbf{q}_0\cdot\mathbf{s}_0 + \mathbf{q}_1\cdot(\mathbf{S}_T - \mathbf{s}_0) - \ell(\mathbf{q}_1)

where q1(STs0)N(0,τq1TΓq1)\mathbf{q}_1 \cdot (\mathbf{S}_T - \mathbf{s}_0) \sim \mathcal{N}(0,\, \tau\, \mathbf{q}_1^T \boldsymbol{\Gamma}\mathbf{q}_1) with τ=Tt0\tau = T - t_0. Under CARA utility, the certainty equivalent is:

CE[WThit]=qˉδi+q0s0(q1)γτ2q1TΓq1\mathrm{CE}[W_T^{\mathrm{hit}}] = \bar{q}\,\delta^i + \mathbf{q}_0\cdot\mathbf{s}_0 - \ell(\mathbf{q}_1) - \frac{\gamma\tau}{2}\,\mathbf{q}_1^T\boldsymbol{\Gamma}\mathbf{q}_1

The incremental gain from hitting the RfQ relative to not hitting (keeping inventory q0\mathbf{q}_0) is:

ΔCE=qˉδi[(q1)(q0)]Δγτ2[q1TΓq1q0TΓq0]Δ(qTΓq)\Delta\mathrm{CE} = \bar{q}\,\delta^i - \underbrace{\bigl[\ell(\mathbf{q}_1) - \ell(\mathbf{q}_0)\bigr]}_{\Delta\ell} - \frac{\gamma\tau}{2}\underbrace{\bigl[\mathbf{q}_1^T\boldsymbol{\Gamma}\mathbf{q}_1 - \mathbf{q}_0^T\boldsymbol{\Gamma}\mathbf{q}_0\bigr]}_{\Delta(\mathbf{q}^T\boldsymbol{\Gamma}\mathbf{q})}

Expanding the quadratic difference Δ(qTΓq)\Delta(\mathbf{q}^T\boldsymbol{\Gamma}\mathbf{q}) with q1=q0qˉei\mathbf{q}_1 = \mathbf{q}_0 - \bar{q}\mathbf{e}_i:

Δ(qTΓq)=2qˉ(Γq0)i+qˉ2Γii\Delta(\mathbf{q}^T\boldsymbol{\Gamma}\mathbf{q}) = -2\bar{q}\,(\boldsymbol{\Gamma}\mathbf{q}_0)_i + \bar{q}^2\,\Gamma_{ii}

The dealer maximises expected utility: maxδif(δi)ΔCE\max_{\delta^i} f(\delta^i)\,\Delta\mathrm{CE}. With f=ekδif = e^{-k\delta^i}, the first-order condition gives qˉ=kΔCE\bar{q} = k\,\Delta\mathrm{CE}, or equivalently:

δi=1kstatic+Δqˉliquidityγτ(Γq0)iqˉcross-hedge skew+γτΓii2qˉnew risk\boxed{\delta^{i*} = \underbrace{\frac{1}{k}}_{\text{static}} + \underbrace{\frac{\Delta\ell}{\bar{q}}}_{\text{liquidity}} - \underbrace{\frac{\gamma\tau(\boldsymbol{\Gamma}\mathbf{q}_0)_i}{\bar{q}}}_{\text{cross-hedge skew}} + \underbrace{\frac{\gamma\tau\,\Gamma_{ii}}{2}\,\bar{q}}_{\text{new risk}}}

The third term carries a minus sign: when the existing inventory is positively correlated with instrument ii — meaning the new trade would add to risk — the cross-hedge term is positive and widens the spread; when the new trade reduces book risk it is negative, lowering the spread. This follows directly from the FOC qˉ=kΔCE\bar{q} = k\,\Delta\mathrm{CE}:

δi=1k+Δqˉγτ(Γq0)iqˉ+γτΓii2qˉ\delta^{i*} = \frac{1}{k} + \frac{\Delta\ell}{\bar{q}} - \frac{\gamma\tau(\boldsymbol{\Gamma}\mathbf{q}_0)_i}{\bar{q}} + \frac{\gamma\tau\,\Gamma_{ii}}{2}\,\bar{q}

The four components have natural interpretations:

  1. Static uncertainty (1/k1/k): even with zero price risk, the dealer incurs an option cost from the trade decision. The inverse of the demand elasticity kk is the unit spread needed to achieve the optimal trade frequency. This term is independent of risk or liquidity costs.

  2. Liquidity cost (Δ/qˉ\Delta\ell / \bar{q}): the per-unit cost of closing the new inventory q1\mathbf{q}_1 at market, over and above the cost of closing the existing inventory q0\mathbf{q}_0. For linear spread costs (q)=jjqj\ell(\mathbf{q}) = \sum_j \ell_j |q_j|, this becomes ±i\pm\ell_i per unit (adding to the position adds cost; reducing it may save cost).

  3. Cross-hedging skew (γτ(Γq0)i/qˉ-\gamma\tau(\boldsymbol{\Gamma}\mathbf{q}_0)_i / \bar{q}): if the existing inventory q0\mathbf{q}_0 is positively correlated with instrument ii (and the new trade increases this exposure), the dealer demands a wider spread to compensate for incremental risk. If the new trade is a natural hedge against existing inventory, the spread narrows — the dealer offers a better price to reduce her book risk. This is the mathematical foundation for the inventory skew discussed qualitatively in chapter Market Making Fundamentals.

  4. New-position risk (γτΓiiqˉ/2\gamma\tau\,\Gamma_{ii}\,\bar{q}/2): the pure inventory risk premium from holding qˉ\bar{q} units of instrument ii for the remaining horizon τ\tau, proportional to the instrument’s variance Γii\Gamma_{ii}, trade size qˉ\bar{q}, and the dealer’s risk aversion γ\gamma.

Single-asset specialisation. For d=1d = 1, q0=q0\mathbf{q}_0 = q_0, Γ11=σ2\Gamma_{11} = \sigma^2:

δ=1k+Δqˉγτσ2q0qˉ+γτσ22qˉ\delta^* = \frac{1}{k} + \frac{\Delta\ell}{\bar{q}} - \gamma\tau\sigma^2\,\frac{q_0}{\bar{q}} + \frac{\gamma\tau\sigma^2}{2}\,\bar{q}

When q0=0q_0 = 0 (clean book), the formula reduces to the three-term result previewed in section Classic market-making models and consistent with case 2 of the RfQ pricing formula in chapter Modelling RfQs in Dealer to Client Markets. The q0q_0-dependent skew term is the new ingredient: it shifts the entire quoted half-spread by γτσ2q0/qˉ-\gamma\tau\sigma^2 q_0 / \bar{q}, so a long existing inventory reduces the optimal half-spread on a sell-side RfQ (the dealer is willing to sell more cheaply to rebalance the book).

Beyond a single trade: the Avellaneda-Stoikov framework

The single-trade model fixes the quoting problem to a single event. In practice, a market maker faces a continuous stream of RfQs or limit-order-book arrivals, and her inventory qt\mathbf{q}_t changes continuously. The Avellaneda-Stoikov framework Avellaneda & Stoikov, 2008, extended by Guéant et al. (2013), provides the dynamic stochastic control solution to this problem.

Model setup

We work in the general dd-asset setting. The state at time tt is the triple (qt,St,Xt)(\mathbf{q}_t, \mathbf{S}_t, X_t) where qtRd\mathbf{q}_t \in \mathbb{R}^d is the inventory vector, StRd\mathbf{S}_t \in \mathbb{R}^d is the mid-price vector, and XtRX_t \in \mathbb{R} is cash. The mid-price dynamics follow:

dSt=ΣdWt,Γ=ΣΣTd\mathbf{S}_t = \boldsymbol{\Sigma}\, d\mathbf{W}_t, \qquad \boldsymbol{\Gamma} = \boldsymbol{\Sigma}\boldsymbol{\Sigma}^T

For each instrument i=1,,di = 1, \ldots, d, the market maker posts a bid half-spread δtb,i0\delta^{b,i}_t \geq 0 and an ask half-spread δta,i0\delta^{a,i}_t \geq 0:

ptb,i=Stiδtb,i(bid),pta,i=Sti+δta,i(ask)p^{b,i}_t = S^i_t - \delta^{b,i}_t \quad \text{(bid)}, \qquad p^{a,i}_t = S^i_t + \delta^{a,i}_t \quad \text{(ask)}

Client orders arrive as independent Poisson processes Ntb,iN^{b,i}_t (buy orders for instrument ii, executed against the ask) and Nta,iN^{a,i}_t (sell orders, executed against the bid) with intensities:

λb,i(δb,i)=Aekδb,i,λa,i(δa,i)=Aekδa,i\lambda^{b,i}(\delta^{b,i}) = A\,e^{-k\delta^{b,i}}, \qquad \lambda^{a,i}(\delta^{a,i}) = A\,e^{-k\delta^{a,i}}

The inventory and cash evolve according to:

dqti=dNtb,idNta,idq^i_t = dN^{b,i}_t - dN^{a,i}_t
dXt=i=1d[(Sti+δta,i)dNtb,i(Stiδtb,i)dNta,i]dX_t = \sum_{i=1}^{d}\Bigl[(S^i_t + \delta^{a,i}_t)\,dN^{b,i}_t - (S^i_t - \delta^{b,i}_t)\,dN^{a,i}_t\Bigr]

(Note: a client’s buy order goes against the market maker’s ask, adding to the MM’s cash and reducing her inventory.)

Objective and value function

The market maker maximises the expected CARA utility of terminal wealth including a quadratic inventory liquidation penalty (qT)=AT2qT2\ell(\mathbf{q}_T) = \frac{A_T}{2}\|\mathbf{q}_T\|^2 (the cost of closing remaining inventory at market, generalising the single-trade penalty):

V(t,x)=sup{δsb,i,δsa,i}tsTE[eγ(XT+qTST(qT))]V(t, \mathbf{x}) = \sup_{\{\delta^{b,i}_s, \delta^{a,i}_s\}_{t \leq s \leq T}} \mathbb{E}\left[-e^{-\gamma\bigl(X_T + \mathbf{q}_T \cdot \mathbf{S}_T - \ell(\mathbf{q}_T)\bigr)}\right]

where x=(x,q,s)\mathbf{x} = (x, \mathbf{q}, \mathbf{s}) collects the state variables. The terminal mark-to-market XT+qTSTX_T + \mathbf{q}_T\cdot\mathbf{S}_T is the total portfolio value; the penalty (qT)\ell(\mathbf{q}_T) accounts for the cost of liquidating any remaining inventory.

Ansatz and dimensionality reduction

The exponential utility and Gaussian mid-price dynamics suggest the change-of-variable ansatz:

V(t,x,q,s)=eγ(x+qs+u(t,q))V(t, x, \mathbf{q}, \mathbf{s}) = -e^{-\gamma\bigl(x + \mathbf{q}\cdot\mathbf{s} + u(t, \mathbf{q})\bigr)}

where u(t,q)u(t, \mathbf{q}) is a scalar function of time and inventory only — independent of cash xx (by the CARA structure) and of the mid-price s\mathbf{s} (because mid-price changes enter wealth only through qTST\mathbf{q}_T\cdot\mathbf{S}_T, which is already accounted for in the qs\mathbf{q}\cdot\mathbf{s} term of the ansatz). The function u(t,q)u(t,\mathbf{q}) is the indifference value adjustment: it measures how much the optimal pricing problem is worth relative to the mark-to-market of the current position.

The terminal condition on uu follows from V(T,)=eγ((q))V(T, \cdot) = -e^{-\gamma(\cdot - \ell(\mathbf{q}))}:

u(T,q)=(q)=AT2q2u(T, \mathbf{q}) = -\ell(\mathbf{q}) = -\frac{A_T}{2}\|\mathbf{q}\|^2

The HJB equation

Substituting the ansatz into the HJB equation (see chapter Stochastic Optimal Control, The Hamilton–Jacobi–Bellman equation), the multi-asset diffusion term gives:

12tr(ΣΣTs2V)=Vγ22qTΓq\frac{1}{2}\mathrm{tr}\bigl(\boldsymbol{\Sigma}\boldsymbol{\Sigma}^T \nabla^2_\mathbf{s} V\bigr) = V\cdot\frac{\gamma^2}{2}\,\mathbf{q}^T\boldsymbol{\Gamma}\mathbf{q}

For each instrument ii, a bid arrival (buy order) transforms the state by xx(siδb,i)x \to x - (s^i - \delta^{b,i}) and qiqi+1q^i \to q^i + 1, so the change in VV is:

V(t,x(siδb,i),q+ei,s)=Veγ(δb,i+Δi+u)V(t, x-(s^i-\delta^{b,i}), \mathbf{q}+\mathbf{e}_i, \mathbf{s}) = V \cdot e^{-\gamma\bigl(\delta^{b,i} + \Delta^+_i u\bigr)}

where Δi+u=u(t,q+ei)u(t,q)\Delta^+_i u = u(t, \mathbf{q}+\mathbf{e}_i) - u(t, \mathbf{q}) is the forward finite difference of uu in dimension ii. Analogously, an ask arrival (sell order) produces:

V(t,x+(si+δa,i),qei,s)=Veγ(δa,iΔiu)V(t, x+(s^i+\delta^{a,i}), \mathbf{q}-\mathbf{e}_i, \mathbf{s}) = V \cdot e^{-\gamma\bigl(\delta^{a,i} - \Delta^-_i u\bigr)}

where Δiu=u(t,q)u(t,qei)\Delta^-_i u = u(t,\mathbf{q}) - u(t,\mathbf{q}-\mathbf{e}_i). Dividing the full HJB equation by VV (which is negative), the equation for uu is:

tuγ2qTΓq+i=1d[maxδb,iAekδb,ieγ(δb,i+Δi+u)1γ+maxδa,iAekδa,ieγ(δa,iΔiu)1γ]=0\partial_t u - \frac{\gamma}{2}\mathbf{q}^T\boldsymbol{\Gamma}\mathbf{q} + \sum_{i=1}^d \Bigl[\max_{\delta^{b,i}}\, A e^{-k\delta^{b,i}}\frac{e^{-\gamma(\delta^{b,i}+\Delta^+_i u)}-1}{\gamma} + \max_{\delta^{a,i}}\, A e^{-k\delta^{a,i}}\frac{e^{-\gamma(\delta^{a,i}-\Delta^-_i u)}-1}{\gamma}\Bigr] = 0

Optimal half-spreads

Each inner maximisation involves only one decision variable. For the bid side, we maximise over δb,i\delta^{b,i}:

maxδb,i  Aekδb,i[eγ(δb,i+Δi+u)1]\max_{\delta^{b,i}} \; A e^{-k\delta^{b,i}}\bigl[e^{-\gamma(\delta^{b,i}+\Delta^+_i u)}-1\bigr]

Taking the derivative and setting to zero yields a single equation. Defining Φb,i=δb,i+Δi+u\Phi^{b,i} = \delta^{b,i} + \Delta^+_i u, the first-order condition is:

(k+γ)eγΦb,i=k    Φb,i=1γln ⁣(1+γk)(k+\gamma)\,e^{-\gamma \Phi^{b,i}} = k \implies \Phi^{b,i} = \frac{1}{\gamma}\ln\!\left(1+\frac{\gamma}{k}\right)

Hence the optimal bid half-spread:

δb,i=1γln ⁣(1+γk)Δi+u(t,q)\boxed{\delta^{b,i*} = \frac{1}{\gamma}\ln\!\left(1+\frac{\gamma}{k}\right) - \Delta^+_i u(t,\mathbf{q})}

An identical calculation for the ask side yields Φa,i=δa,iΔiu=1γln(1+γ/k)\Phi^{a,i} = \delta^{a,i*} - \Delta^-_i u = \frac{1}{\gamma}\ln(1+\gamma/k), so:

δa,i=1γln ⁣(1+γk)+Δiu(t,q)\boxed{\delta^{a,i*} = \frac{1}{\gamma}\ln\!\left(1+\frac{\gamma}{k}\right) + \Delta^-_i u(t,\mathbf{q})}

Defining the static half-spread η:=1γln(1+γ/k)\eta := \frac{1}{\gamma}\ln(1+\gamma/k), the optimal quotes on instrument ii are:

pb,i=Stiδb,i=Stiη+Δi+u,pa,i=Sti+δa,i=Sti+η+Δiup^{b,i*} = S^i_t - \delta^{b,i*} = S^i_t - \eta + \Delta^+_i u, \qquad p^{a,i*} = S^i_t + \delta^{a,i*} = S^i_t + \eta + \Delta^-_i u

The reservation price for instrument ii is the mid-point of the optimal bid and ask:

rti:=pa,i+pb,i2=Sti+Δiu+Δi+u2=Sti+u(t,q+ei)u(t,qei)2r^i_t := \frac{p^{a,i*} + p^{b,i*}}{2} = S^i_t + \frac{\Delta^-_i u + \Delta^+_i u}{2} = S^i_t + \frac{u(t,\mathbf{q}+\mathbf{e}_i) - u(t,\mathbf{q}-\mathbf{e}_i)}{2}

The quoted spread for instrument ii:

pa,ipb,i=2η+ΔiuΔi+u=2η+[2u(t,q)u(t,q+ei)u(t,qei)]=2ηΔi2up^{a,i*} - p^{b,i*} = 2\eta + \Delta^-_i u - \Delta^+_i u = 2\eta + \bigl[2u(t,\mathbf{q}) - u(t,\mathbf{q}+\mathbf{e}_i) - u(t,\mathbf{q}-\mathbf{e}_i)\bigr] = 2\eta - \Delta^2_i u

where Δi2u\Delta^2_i u is the second discrete derivative of uu in dimension ii. For a concave uu (which is always the case here — the value function is concave in inventory due to risk aversion), Δi2u<0\Delta^2_i u < 0 and therefore 2ηΔi2u>2η2\eta - \Delta^2_i u > 2\eta: the spread exceeds its static minimum, with the excess reflecting the curvature of the inventory risk.

The equation for u(t,q)u(t,\mathbf{q})

Substituting the optimal half-spreads back into the HJB, and defining the constant c=A(1+γ/k)k/γ/(k+γ)c = A(1+\gamma/k)^{-k/\gamma}/(k+\gamma), the value function satisfies:

tu=γ2qTΓq+ci=1d[ekΔi+u+ekΔiu]\partial_t u = \frac{\gamma}{2}\mathbf{q}^T\boldsymbol{\Gamma}\mathbf{q} + c\sum_{i=1}^d \bigl[e^{k\Delta^+_i u} + e^{k\Delta^-_i u}\bigr]

with terminal condition u(T,q)=AT2q2u(T, \mathbf{q}) = -\frac{A_T}{2}\|\mathbf{q}\|^2. This is a coupled system of nonlinear ODEs in time (one per inventory state qZd\mathbf{q} \in \mathbb{Z}^d), where the coupling arises through the discrete differences in uu. The system can be solved numerically by backward integration from TT to t0t_0, typically by truncating q\mathbf{q} to a bounded grid qiQmax|q^i| \leq Q_{\max}.

For the single-asset case (d=1d = 1), the equation for u(t,q)u(t, q) is:

tu(t,q)=γσ2q22+c[ek(u(t,q+1)u(t,q))+ek(u(t,q)u(t,q1))]\partial_t u(t,q) = \frac{\gamma\sigma^2 q^2}{2} + c\bigl[e^{k(u(t,q+1)-u(t,q))} + e^{k(u(t,q)-u(t,q-1))}\bigr]

The left side drives the concavity: for large q|q|, the γσ2q2/2\gamma\sigma^2 q^2/2 term creates strong curvature in uu that translates into wide spreads and aggressive skewing.

Asymptotic approximations

The nonlinear ODE system for uu has no closed-form solution in general. Guéant et al. (2013) derive a tractable approximation valid for the infinite-horizon (stationary) problem, in which the horizon TT \to \infty and u(t,q)u(t,\mathbf{q}) converges to a time-independent function u(q)u^\infty(\mathbf{q}).

The quadratic approximation

In the single-asset stationary problem, symmetry around q=0q = 0 and the convexity structure of the ODE suggest the quadratic ansatz:

u(q)u0θ2q2u^\infty(q) \approx u_0 - \frac{\theta}{2}q^2

for constants u0u_0 and θ>0\theta > 0. The discrete differences under this ansatz are:

Δ+u=u(q+1)u(q)=θqθ2,Δu=u(q)u(q1)=θq+θ2\Delta^+u = u^\infty(q+1) - u^\infty(q) = -\theta q - \frac{\theta}{2}, \qquad \Delta^-u = u^\infty(q) - u^\infty(q-1) = -\theta q + \frac{\theta}{2}

Reservation price. From the AS formula derived above, ri=Si+u(q+1)u(q1)2r^i = S^i + \frac{u(q+1)-u(q-1)}{2}. Under the quadratic ansatz u(q)=u0θ2q2u^\infty(q) = u_0 - \frac{\theta}{2}q^2:

u(q+1)u(q1)=θ2[(q+1)2(q1)2]=θ24q=2θqu(q+1) - u(q-1) = -\frac{\theta}{2}\bigl[(q+1)^2 - (q-1)^2\bigr] = -\frac{\theta}{2}\cdot 4q = -2\theta q

Therefore the reservation price and its skew:

r=Sθq,ψ=θq\boxed{r^\infty = S - \theta q, \qquad \psi^\infty = -\theta q}

The quoted bid and ask are symmetric around rr^\infty:

pa=r+η=Sθq+η,pb=rη=Sθqηp^{a*} = r^\infty + \eta = S - \theta q + \eta, \qquad p^{b*} = r^\infty - \eta = S - \theta q - \eta

The spread is constant at 2η=2γln(1+γ/k)2\eta = \frac{2}{\gamma}\ln(1+\gamma/k), independent of inventory; the inventory effect appears entirely in the location of the bid-ask band.

Determining θ\theta: the GLF result

Substituting the quadratic ansatz into the stationary HJB (tu=0\partial_t u = 0) and expanding at leading order in qq:

0=γσ2q22+2ccosh(kθ/2)ekqθ0 = \frac{\gamma\sigma^2 q^2}{2} + 2c\cosh(k\theta/2) e^{-kq\theta}

This equation cannot hold for all qq simultaneously with the quadratic approximation. The GLF approach instead matches the equation at q=0q = 0 and uses a linearisation in θ\theta (valid for small θ\theta) to extract θ\theta. The result of this procedure is:

θ=γσ22Ak1(1+γ/k)k/γ+1\boxed{\theta = \frac{\gamma\sigma^2}{\sqrt{2Ak^{-1}(1+\gamma/k)^{k/\gamma+1}}}}

or equivalently, in terms of the characteristic spread η^=2η=2γln(1+γ/k)\hat\eta = 2\eta = \frac{2}{\gamma}\ln(1+\gamma/k):

θ=γσ212Aln(1+γ/k)=γσ22Aη^γ\theta = \gamma\sigma^2\sqrt{\frac{1}{2A\ln(1+\gamma/k)}} = \frac{\gamma\sigma^2}{\sqrt{2A\hat\eta\gamma}}

The full optimal GLF quotes in the single-asset stationary case are therefore:

pa=S+ηθq,pb=Sηθq\boxed{p^{a*} = S + \eta - \theta q, \qquad p^{b*} = S - \eta - \theta q}
spread=2η=2γln ⁣(1+γk),skew=θq=γσ22Aln(1+γ/k)q\text{spread}^* = 2\eta = \frac{2}{\gamma}\ln\!\left(1+\frac{\gamma}{k}\right), \qquad \text{skew}^* = -\theta q = -\frac{\gamma\sigma^2}{\sqrt{2A\ln(1+\gamma/k)}}\,q

Parameter dependences

The GLF formula makes the parameter dependences explicit and confirms the corrections introduced in chapter Market Making Fundamentals:

ComponentFormulaDepends on
Static spread2γln(1+γ/k)\frac{2}{\gamma}\ln(1+\gamma/k)γ\gamma, kk
Skew per unit inventoryθ=γσ22Aln(1+γ/k)\theta = \frac{\gamma\sigma^2}{\sqrt{2A\ln(1+\gamma/k)}}γ\gamma, σ2\sigma^2, AA, kk

The skew sensitivity θ\theta is not simply γσ2\gamma\sigma^2 — it also depends on the arrival rate AA and the demand elasticity kk. Higher order flow AA reduces θ\theta: a busy market maker can rebalance inventory quickly through trading, so she need not skew as aggressively for a given inventory imbalance. Higher demand elasticity kk also reduces θ\theta (more responsive clients means tighter necessary skew) but amplifies the static spread component.

AS/GLF parameter sensitivities. Top row: static spread 2\eta = \frac{2}{\gamma}\ln(1+\gamma/k) as a function of risk aversion \gamma (left) and demand elasticity k (centre), with the third panel showing how the optimal bid, ask and reservation price shift linearly with inventory q at baseline parameters (\sigma=2, A=140, k=1.5, \gamma=0.1). Bottom row: skew coefficient \theta as a function of volatility \sigma (left), arrival rate A (centre), and demand elasticity k (right). The dashed vertical line marks the baseline parameter value in each panel.

Figure 1:AS/GLF parameter sensitivities. Top row: static spread 2η=2γln(1+γ/k)2\eta = \frac{2}{\gamma}\ln(1+\gamma/k) as a function of risk aversion γ\gamma (left) and demand elasticity kk (centre), with the third panel showing how the optimal bid, ask and reservation price shift linearly with inventory qq at baseline parameters (σ=2\sigma=2, A=140A=140, k=1.5k=1.5, γ=0.1\gamma=0.1). Bottom row: skew coefficient θ\theta as a function of volatility σ\sigma (left), arrival rate AA (centre), and demand elasticity kk (right). The dashed vertical line marks the baseline parameter value in each panel.

Multi-asset generalisation

In the multi-asset stationary problem, the quadratic approximation takes the form u(q)=u012qTΘqu^\infty(\mathbf{q}) = u_0 - \frac{1}{2}\mathbf{q}^T\boldsymbol{\Theta}\mathbf{q} for a positive semi-definite matrix ΘRd×d\boldsymbol{\Theta} \in \mathbb{R}^{d\times d}. The reservation price vector is:

r=SΘq\mathbf{r}^\infty = \mathbf{S} - \boldsymbol{\Theta}\mathbf{q}

so the skew in instrument ii depends on the full inventory vector through the off-diagonal elements of Θ\boldsymbol{\Theta}:

ri,=SijΘijqjr^{i,\infty} = S^i - \sum_j \Theta_{ij}\,q^j

The matrix Θ\boldsymbol{\Theta} is determined by the multi-asset analogue of the GLF equation, and its entries depend on Γ\boldsymbol{\Gamma}, AA, kk, and γ\gamma. The key economic message is that correlated instruments share their inventory skew: being long in one instrument shifts the reservation price downward not only for that instrument but also for all positively correlated ones, reflecting the cross-hedging structure of the multi-asset covariance.

Applications to LOBs and RfQs

Limit order books

The AS framework was originally formulated for a market maker posting limit orders in a continuous limit order book Avellaneda & Stoikov, 2008. The original setting is the single-asset case (d=1d=1) with the quoted mid-price following a zero-drift Brownian motion. The market maker maintains a bid and ask limit order and earns the spread whenever a market order arrives. The key assumption of exponential order arrival intensity λ(δ)=Aekδ\lambda(\delta) = Ae^{-k\delta} approximates the empirical observation that the book thins out exponentially as orders are placed farther from the best bid and offer.

In the LOB context, the “hold-to-horizon” framework with a terminal liquidation penalty is appropriate when the market maker takes a position at the start of the day and manages it until a hard close. Intraday, the inventory qtq_t fluctuates with each fill; the optimal quotes respond continuously via the finite-difference terms in uu.

The GLF approximation is practically useful because it produces a simple real-time quoting formula: at any time tt, compute the reservation price rt=Stθqtr_t = S_t - \theta q_t (shifting the mid by the GLF skew) and quote bid rtηr_t - \eta and ask rt+ηr_t + \eta. The formula depends only on the current mid price, the current inventory, and the two pre-computed constants η\eta and θ\theta.

RfQ dealer markets

In dealer-to-client RfQ markets (chapter Modelling RfQs in Dealer to Client Markets), the single-trade model of The single-trade model is directly applicable as the unit decision. The stream of RfQs maps to repeated single-trade problems, where between RfQs the inventory evolves (from hedges and prior trades) and the remaining horizon τ=Tt\tau = T - t shrinks.

The connection between the single-trade formula and the AS framework is clearest in the serial approximation: treat each new RfQ as a fresh single-trade problem with the current inventory qtq_t and remaining horizon τt=Tt\tau_t = T - t. The optimal spread is then:

δ(t,qt)=1k+Δqˉγτtσ2qtqˉ+γτtσ2qˉ2\delta^*(t, q_t) = \frac{1}{k} + \frac{\Delta\ell}{\bar{q}} - \frac{\gamma\tau_t\sigma^2 q_t}{\bar{q}} + \frac{\gamma\tau_t\sigma^2\bar{q}}{2}

The third term γτtσ2qt/qˉ-\gamma\tau_t\sigma^2 q_t/\bar{q} is the skew: it grows with the remaining horizon τt\tau_t (as in the AS finite-horizon formula) and shrinks toward zero at the end of the day as the urgency to rebalance the book increases. This formula can be used directly in a market-making system without solving the full HJB, at the cost of ignoring the interaction between the current RfQ and future arrivals.

Backtesting and performance comparison

Theoretical optimality guarantees are derived under the model’s own assumptions (Brownian mid-price, Poisson arrivals, CARA utility). To assess practical performance, Avellaneda & Stoikov (2008) propose a Monte Carlo back-test: simulate many independent trading days, record the terminal P&L after end-of-day liquidation, and compare strategies by the distribution of daily outcomes rather than by a single expected-utility number.

We implement three strategies under the baseline parameters (σ=2\sigma = 2, A=140A = 140, k=1.5k = 1.5, γ=0.1\gamma = 0.1, T=1T = 1, S0=100S_0 = 100):

  1. GLF stationary: quotes at rt=Stθqtr_t = S_t - \theta q_t with constant half-spread η\eta — the closed-form approximation derived above.

  2. Single-trade (EOD): at each step uses the finite-horizon formula derived in The single-trade model, with the current inventory and remaining horizon τt\tau_t. The spread widens early in the day (large inventory-risk premium) and narrows to 2/k2/k at close.

  3. Symmetric benchmark: fixed spread 2η2\eta around mid with no inventory management — a naive strategy that ignores the uu-adjustment entirely.

A quadratic EOD liquidation penalty AliqqT2A_{\mathrm{liq}}q_T^2 (with Aliq=1/(2k)A_{\mathrm{liq}} = 1/(2k)) accounts for the residual cost of crossing the market with any inventory remaining at close.

Single simulated trading day. Left column: GLF stationary strategy. Right column: single-trade (EOD liquidation) strategy. Top row: mid-price trajectory (black) with shaded bid-ask band; the GLF band translates rigidly as inventory changes (constant width 2\eta), while the single-trade band widens in the morning and narrows toward close. Middle row: inventory q_t — the GLF strategy keeps the inventory closer to zero through continuous skewing; the single-trade strategy allows larger inventories early in the day. Bottom row: mark-to-market P&L.

Figure 2:Single simulated trading day. Left column: GLF stationary strategy. Right column: single-trade (EOD liquidation) strategy. Top row: mid-price trajectory (black) with shaded bid-ask band; the GLF band translates rigidly as inventory changes (constant width 2η2\eta), while the single-trade band widens in the morning and narrows toward close. Middle row: inventory qtq_t — the GLF strategy keeps the inventory closer to zero through continuous skewing; the single-trade strategy allows larger inventories early in the day. Bottom row: mark-to-market P&L.

Daily P&L distributions across 500 simulated trading days. Left: kernel density estimates of terminal P&L for all three strategies (dashed vertical lines mark the mean). Right: box plots showing IQR and 5/95th percentiles. Both inventory-managing strategies (GLF and single-trade) substantially outperform the symmetric benchmark in both mean and tail risk — the symmetric strategy incurs large liquidation penalties from unchecked inventory drift. The GLF and single-trade strategies are comparable in mean P&L but differ in tail behaviour: the single-trade strategy controls inventory more conservatively (its wider early-day spread attracts fewer trades) and has slightly lighter tails; the GLF strategy fills more aggressively and achieves a higher mean at the cost of occasional larger left-tail outcomes.

Figure 3:Daily P&L distributions across 500 simulated trading days. Left: kernel density estimates of terminal P&L for all three strategies (dashed vertical lines mark the mean). Right: box plots showing IQR and 5/95th percentiles. Both inventory-managing strategies (GLF and single-trade) substantially outperform the symmetric benchmark in both mean and tail risk — the symmetric strategy incurs large liquidation penalties from unchecked inventory drift. The GLF and single-trade strategies are comparable in mean P&L but differ in tail behaviour: the single-trade strategy controls inventory more conservatively (its wider early-day spread attracts fewer trades) and has slightly lighter tails; the GLF strategy fills more aggressively and achieves a higher mean at the cost of occasional larger left-tail outcomes.

The notebook notebooks/market_making.ipynb also produces a third figure (mm_spread_dynamics.png) showing the intraday spread schedule: the GLF spread is constant while the single-trade spread narrows monotonically from wide in the morning to 2/k2/k at close, and the skew (difference between ask and bid half-spreads) vanishes at end of day for the single-trade strategy regardless of the current inventory level.

Enriching Avellaneda-Stoikov

Liquidity: closing the position at market

The baseline AS framework with (qT)=AT2qT2\ell(\mathbf{q}_T) = \frac{A_T}{2}\|\mathbf{q}_T\|^2 already introduces a liquidation cost at the terminal time. A natural extension for the dealer market is to allow partial liquidation throughout the day by trading at market with a spread cost.

Let δmkt\delta^{\mathrm{mkt}} be the half-spread the dealer pays to cross the market (hedge in the inter-dealer book). Then the dealer has a continuous control: in addition to choosing the customer half-spreads δb,i\delta^{b,i} and δa,i\delta^{a,i}, she can also execute a hedge of size vtiv^i_t at a cost of δmktvti\delta^{\mathrm{mkt}}|v^i_t| per unit. The cash and inventory dynamics gain the hedging terms:

dXthedge=i(Sti±δmkt)vtidt,dqti+=vtidtdX_t^{\mathrm{hedge}} = -\sum_i (S^i_t \pm \delta^{\mathrm{mkt}}) v^i_t \, dt, \qquad dq^i_t \mathrel{+}= v^i_t \, dt

In the HJB, the hedging control vt\mathbf{v}_t contributes an additional maximisation. For the quadratic penalty, the optimal hedge is:

vti=1δmktqiu(t,qt)v^{i*}_t = -\frac{1}{\delta^{\mathrm{mkt}}} \cdot \partial_{q^i} u(t, \mathbf{q}_t)

which drives inventory toward zero at a rate proportional to the indifference gradient divided by the hedging cost. When δmkt\delta^{\mathrm{mkt}} is small (liquid inter-dealer market), the dealer hedges aggressively; when it is large (illiquid hedge), she relies more on skewing client quotes.

The unified model — optimising jointly over client quotes δ\boldsymbol{\delta} and hedge trades v\mathbf{v} — is the framework of Guéant (2017) and of chapter 10 of Cartea et al. (2015). The single-trade formula of The single-trade model corresponds to the limiting case v=0v = 0 (no intraday hedging) with a one-shot terminal liquidation, i.e., AT=kδmkt/2A_T = k\delta^{\mathrm{mkt}}/2.

Relative value: Ornstein-Uhlenbeck mid-price

The AS baseline assumes dSt=ΣdWtd\mathbf{S}_t = \boldsymbol{\Sigma}d\mathbf{W}_t — mid prices are martingales with no drift. In spread products, pairs trading, or relative value strategies, the market maker may hold a mean-reverting view on the price. The natural model replaces the Brownian motion with a vector Ornstein-Uhlenbeck (OU) process:

dSt=κ(μSt)dt+ΣdWtd\mathbf{S}_t = \boldsymbol{\kappa}(\boldsymbol{\mu} - \mathbf{S}_t)\,dt + \boldsymbol{\Sigma}\,d\mathbf{W}_t

where κRd×d\boldsymbol{\kappa} \in \mathbb{R}^{d\times d} is the mean-reversion matrix and μRd\boldsymbol{\mu} \in \mathbb{R}^d is the long-run mean.

The HJB equation acquires a drift term. With the same CARA ansatz V=eγ(x+qs+u(t,q,s))V = -e^{-\gamma(x + \mathbf{q}\cdot\mathbf{s} + u(t,\mathbf{q},\mathbf{s}))}, the reservation price becomes state-dependent:

ri(t,q,s)=Si+qiu(t,q,s)r^i(t, \mathbf{q}, \mathbf{s}) = S^i + \partial_{q^i} u(t, \mathbf{q}, \mathbf{s})

The indifference function uu now satisfies a PDE in both (t,q,s)(t, \mathbf{q}, \mathbf{s}) rather than just (t,q)(t, \mathbf{q}). In the single-asset OU case, the solution has the form Cartea et al., 2015:

u(t,q,s)=A(t)sq+B(t)q2+C(t)u(t, q, s) = A(t) s q + B(t) q^2 + C(t)

where AA, BB, CC satisfy a system of Riccati-type ODEs (see chapter Stochastic Optimal Control, Linear–Quadratic Stochastic Control). The reservation price becomes:

r(t,q,s)=s+A(t)qsq+...=s+A(t)s+2B(t)qr(t, q, s) = s + A(t) q \cdot \frac{\partial s}{\partial q} + ... = s + A(t)s + 2B(t)q

and includes a directional component A(t)sA(t) s: when St>μS_t > \mu (price above its mean), A(t)<0A(t) < 0 (for a mean-reverting process), so the reservation price shifts downward — the market maker expects the price to fall and quotes more aggressively on the sell side. This embeds a relative-value directional view into the quoting strategy without abandoning the optimal control framework.

Flow imbalance

In the baseline AS model, the arrival rates of buy and sell orders are symmetric: λb(δb)=λa(δa)=Aekδ\lambda^b(\delta^b) = \lambda^a(\delta^a) = Ae^{-k\delta}. In practice, order flow is often imbalanced: the rate of customer buy orders AbA^b differs from the rate of sell orders AaA^a. This asymmetry may be persistent (a client base that predominantly sells, e.g., a corporate issuer hedging) or transient (intraday momentum in order flow).

Incorporating asymmetric intensities λb,i(δb)=Aibekδb\lambda^{b,i}(\delta^b) = A^b_i e^{-k\delta^b} and λa,i(δa)=Aiaekδa\lambda^{a,i}(\delta^a) = A^a_i e^{-k\delta^a} modifies the HJB. After the same ansatz, the optimal half-spreads become:

δb,i=ηΔi+u,δa,i=η+Δiu\delta^{b,i*} = \eta - \Delta^+_i u, \qquad \delta^{a,i*} = \eta + \Delta^-_i u

where η\eta is unchanged (only kk and γ\gamma enter the static half-spread), but the equation for uu picks up the asymmetry:

tu=γ2qTΓq+i[cibekΔi+u+ciaekΔiu]\partial_t u = \frac{\gamma}{2}\mathbf{q}^T\boldsymbol{\Gamma}\mathbf{q} + \sum_i\bigl[c^b_i\,e^{k\Delta^+_i u} + c^a_i\,e^{k\Delta^-_i u}\bigr]

where cib=Aib(1+γ/k)k/γ/(k+γ)c^b_i = A^b_i(1+\gamma/k)^{-k/\gamma}/(k+\gamma) and cia=Aia(1+γ/k)k/γ/(k+γ)c^a_i = A^a_i(1+\gamma/k)^{-k/\gamma}/(k+\gamma). When AibAiaA^b_i \neq A^a_i, the stationary u(q)u^\infty(q) is no longer symmetric around q=0q = 0, and the optimal reservation price shifts in the direction of the dominant flow even at zero inventory.

Concretely, if Aib>AiaA^b_i > A^a_i (buy flow dominates), the market maker expects her inventory to drift negative (she sells more than she buys). The optimal response is to quote a slightly tighter ask (to attract the available buyers and prevent the drift from becoming too negative) and to widen the bid (since sellers are relatively rare). The flow imbalance thus introduces a flow-driven skew on top of the inventory-driven skew of the baseline model Cartea et al., 2015.

Client segmentation in dealer-to-client markets

In dealer-to-client markets, unlike anonymous LOBs, the identity of each counterparty is known at the time of quoting. This information is economically valuable: different clients have different price sensitivities kck_c, different flow toxicities αc\alpha_c (the probability their trade is informationally motivated), and different average trade sizes qˉc\bar{q}_c. The AS framework can be extended to exploit this structure Guéant & Manziuk, 2019.

The key extension replaces the single arrival process with a superposition of CC client-class processes:

λcb,i(δb)=Acekcδb,c=1,,C\lambda^{b,i}_c(\delta^b) = A_c\,e^{-k_c\delta^b}, \qquad c = 1, \ldots, C

Each client class cc has its own parameters (Ac,kc)(A_c, k_c); the market maker observes the client identity before quoting and can therefore select a different spread δci\delta^i_c for each client. The optimal quote for client cc is:

δci=1γcln ⁣(1+γckc)+Δi±u\delta^{i*}_c = \frac{1}{\gamma_c}\ln\!\left(1+\frac{\gamma_c}{k_c}\right) + \Delta^\pm_i u

where γc\gamma_c is an effective risk-aversion coefficient that accounts for client toxicity: γc=γ+αckc\gamma_c = \gamma + \alpha_c \cdot k_c (the more toxic the client, the higher the effective risk aversion of the market maker toward that client’s flow). The function uu itself remains common across clients — it reflects the total inventory risk, not the risk from any single client — but the optimal static component of the spread is client-specific.

The practical implications are significant. A market maker dealing with a highly informed institutional client should quote wider spreads (γc\gamma_c large, so ηc=1γcln(1+γc/kc)\eta_c = \frac{1}{\gamma_c}\ln(1+\gamma_c/k_c) is wider) even when her current inventory is comfortable. Conversely, uninformed retail or corporate clients (αc0\alpha_c \approx 0) receive tighter spreads, and the market maker can be more aggressive in winning their business to rebalance the book. This framework provides the mathematical foundation for the client analytics component of the market-making system described in chapter Market Making Fundamentals (Components of a market-making system).

In the multi-asset, multi-client setting, the full model becomes computationally challenging. Guéant & Manziuk (2019) develop a deep reinforcement learning approach that parametrises the value function with a neural network and optimises over client quotes directly, enabling solution of market-making problems with dozens of instruments and hundreds of clients.

Optimal market-making using Reinforcerment Learning

Search for papers to add

Exercises

  1. Grossman-Miller derivation. Suppose p=1/2p = 1/2 in the GM model and the price uncertainty between t=1t=1 and t=2t=2 is σintra2\sigma^2_\text{intra} (not the full day volatility). The MM faces n=3n = 3 competitors and the LT sells i=200i = 200 units with γ=5\gamma = 5 and σintra=0.015\sigma_\text{intra} = 0.015. Compute the equilibrium bid price and the bid-ask spread. How does the spread change if a fourth MM enters the market? What happens in the limit nn \to \infty?

  2. Glosten-Milgrom full derivation. Consider the asymmetric case with p=0.7p = 0.7, VH=105V_H = 105, VL=95V_L = 95, and α=0.3\alpha = 0.3. (a) Compute the prior μ\mu. (b) Derive the zero-profit ask and bid without the p=1/2p = 1/2 simplification. (c) Compare the resulting spread to the symmetric-case formula. Does the spread depend on pp in the general case?

  3. Single-trade model — multi-asset skew. A dealer has existing inventory q01=10q_0^1 = 10 (DV01 in EUR bonds) and q02=5q_0^2 = -5 (DV01 in USD bonds). The covariance matrix of daily returns is Γ=(4223)×104\boldsymbol{\Gamma} = \begin{pmatrix} 4 & 2 \\ 2 & 3 \end{pmatrix} \times 10^{-4}. She receives a buy RfQ for qˉ=8\bar{q} = 8 EUR bond DV01 with τ=0.5\tau = 0.5 (half-day remaining), γ=10\gamma = 10, k=20k = 20, and liquidity penalty Δ/qˉ=0.002\Delta\ell/\bar{q} = 0.002. Compute the optimal spread δ1\delta^{1*}. How does the cross-hedging from the USD inventory affect the spread relative to the clean-book case?

  4. Avellaneda-Stoikov optimal spreads. In the single-asset AS model with σ=0.01\sigma = 0.01, A=2A = 2 (arrivals per second), k=1.5k = 1.5 (per unit spread), γ=0.1\gamma = 0.1, and Tt=1800T - t = 1800 seconds: (a) Compute the static half-spread η=1γln(1+γ/k)\eta = \frac{1}{\gamma}\ln(1+\gamma/k). (b) For inventory q=5q = 5, compute the optimal bid and ask under the finite-horizon approximation δbη(u(t,q+1)u(t,q))η+θq\delta^{b*} \approx \eta - (u(t,q+1)-u(t,q)) \approx \eta + \theta q (using the quadratic approximation for uu). (c) Compute θ\theta from the GLF formula and confirm the skew direction is consistent with the inventory.

  5. GLF parameter sensitivities. A market maker uses the GLF approximation with γ=0.2\gamma = 0.2, k=1.0k = 1.0, σ=0.012\sigma = 0.012, A=1.5A = 1.5. (a) Compute the optimal spread and the skew coefficient θ\theta. (b) Suppose volatility doubles to σ=0.024\sigma = 0.024. How does the spread change? How does θ\theta change? (c) Suppose the arrival rate AA doubles. How does θ\theta change? Interpret the result economically.

  6. Client segmentation. A dealer serves two client classes: (A) uninformed retail clients with kA=3k_A = 3, αA=0.05\alpha_A = 0.05; (B) sophisticated fund managers with kB=1k_B = 1, αB=0.4\alpha_B = 0.4. The dealer’s risk aversion is γ=0.1\gamma = 0.1 and her inventory is currently flat. (a) Compute the effective risk aversion γc=γ+αckc\gamma_c = \gamma + \alpha_c k_c for each client class. (b) Compute the static half-spread ηc\eta_c for each class. (c) Explain how the optimal quotes would differ if the dealer has a large long position versus a flat book. Which client is more useful for rebalancing the book?

References
  1. Grossman, S. J., & Miller, M. H. (1988). Liquidity and Market Structure. The Journal of Finance, 43(3), 617–633. 10.1111/j.1540-6261.1988.tb04594.x
  2. Glosten, L. R., & Milgrom, P. R. (1985). Bid, Ask and Transaction Prices in a Specialist Market with Heterogeneously Informed Traders. Journal of Financial Economics, 14(1), 71–100. 10.1016/0304-405X(85)90044-3
  3. Guéant, O., Lehalle, C.-A., & Fernandez-Tapia, J. (2013). Dealing with the Inventory Risk: A Solution to the Market Making Problem. Mathematics and Financial Economics, 7(4), 477–507. 10.1007/s11579-012-0087-0
  4. Avellaneda, M., & Stoikov, S. (2008). High-frequency trading in a limit order book. Quantitative Finance, 8(3), 217–224. 10.1080/14697680701381228
  5. Guéant, O. (2017). Optimal Market Making. Applied Mathematical Finance, 24(2), 112–154. 10.1080/1350486X.2017.1342552
  6. Cartea, Á., Jaimungal, S., & Penalva, J. (2015). Algorithmic and High-Frequency Trading. Cambridge University Press.
  7. Guéant, O., & Manziuk, I. (2019). Deep Reinforcement Learning for Market Making in Corporate Bonds: Beating the Curse of Dimensionality. Applied Mathematical Finance, 26(5), 387–452. 10.1080/1350486X.2020.1714455