Library

Inventory risk

8 items in the Thuztra Learn library carry the topic inventory risk: 6 reference articles, 1 puzzle and 1 interview question. They are gathered here so one idea can be met in every form it takes, which is usually the difference between recognising a term and being able to use it.

7 of them have pages of their own, linked below. Everything else is listed with the summary its author wrote. The 2 problems on this topic are set out under their own headings, and the longest are quoted in full.

Problems in full

Quoted exactly as the library sets them, so the topic is something you can try rather than something you have read about.

How wide to quote when inventory is charged for

We make a two-sided market for a horizon of T=600T = 600 seconds. The mid-price is a driftless Brownian motion, dSt=σ dWtdS_t = \sigma\, dW_t, with σ=0.3\sigma = 0.3 ticks per square root second.

We pick one number and hold it: a half-spread δ\delta, quoted symmetrically at St−δS_t - \delta and St+δS_t + \delta. Fills arrive on each side as independent Poisson processes whose intensity decays exponentially in distance from the mid,

λ(δ)=Ae−kδ,A=2 fills per second,k=0.8 per tick\lambda(\delta) = A e^{-k\delta}, \qquad A = 2 \text{ fills per second}, \qquad k = 0.8 \text{ per tick}

Fills arrive at a rate that falls away exponentially with how far our quote sits from the mid, so each extra tick of width shaves off a fixed fraction of the flow.

λ(δ)=Ae−kδ,A=2 fills per second,k=0.8 per tick\lambda(\delta) = A e^{-k\delta}, \qquad A = 2 \text{ fills per second}, \qquad k = 0.8 \text{ per tick}

Each fill is one lot. Inventory qtq_t is buys minus sells, and we mark to the mid throughout.

We are charged for carrying inventory at a rate γ2σ2qt2\tfrac{\gamma}{2}\sigma^2 q_t^2 per unit time, with γ=0.01\gamma = 0.01 per tick, so the objective is

J(δ)=2λ(δ) Tδ⏟expected spread revenue−γ2σ2 E ⁣∫0Tqt2 dtJ(\delta) = \underbrace{2\lambda(\delta)\, T \delta}_{\text{expected spread revenue}} - \frac{\gamma}{2}\sigma^2 \, \mathbb{E}\!\int_0^T q_t^2 \, dt

What we are trying to make as large as we can is the spread collected on the fills we expect, minus a charge for the inventory we expect to be sitting on along the way.

J(δ)=2λ(δ) Tδ⏟expected spread revenue−γ2σ2 E ⁣∫0Tqt2 dtJ(\delta) = \underbrace{2\lambda(\delta)\, T \delta}_{\text{expected spread revenue}} - \frac{\gamma}{2}\sigma^2 \, \mathbb{E}\!\int_0^T q_t^2 \, dt
  1. Justify the revenue term, evaluate the penalty term, and find δ∗\delta^* in closed form.
  2. Put the numbers in. What spread do we show, and what did risk aversion cost us in fills relative to a risk-neutral maker?
  3. What did that purchase in terminal inventory standard deviation?
  4. Swap the running penalty for a terminal one, γ2σ2T E[qT2]\tfrac{\gamma}{2}\sigma^2 T\, \mathbb{E}[q_T^2]. What changes, and how does the result sit against the Avellaneda-Stoikov spread?

Skewing quotes to shed inventory

We are long some quantity of a stock whose mid-price is SS. We quote a bid and an offer placed symmetrically at distance h=0.05h = 0.05 dollars either side of a reference price r=S−sr = S - s, where s≥0s \ge 0 is a downward shift we choose. So the market we show is 2h2h wide and its centre sits ss below the mid.

Fills arrive as independent Poisson processes whose intensity decays exponentially in the distance of the quote from the mid,

λ(δ)=Ae−kδ,A=1.4 fills per second,k=20 per dollar\lambda(\delta) = A e^{-k\delta}, \qquad A = 1.4 \text{ fills per second}, \qquad k = 20 \text{ per dollar}

The rate at which a quote gets hit falls away exponentially the further that quote sits from the mid, with one constant fixing the rate at the mid itself and another fixing how sharply it decays.

λ(δ)=Ae−kδ,A=1.4 fills per second,k=20 per dollar\lambda(\delta) = A e^{-k\delta}, \qquad A = 1.4 \text{ fills per second}, \qquad k = 20 \text{ per dollar}

so improving a quote by one cent multiplies its fill rate by e0.2e^{0.2}.

The rest of the question is for members

Reference articles

Avellaneda-Stoikov market making

The reservation price, the optimal spread, and the derivation behind both. Then the missing term that dominates real market-making profit and loss.

Gueant-Lehalle-Fernandez-Tapia quotes

The change of variables that collapses the market-making HJB to linear ODEs, the hard inventory bound that makes the problem well posed, and stationary quotes.

How crypto market making works, from the order book to the pool

How crypto market making works, in worked numbers: the order book, spread, inventory and adverse selection, perpetual hedges and pools that quote by formula.

Inventory risk aversion against fill rate

Risk aversion buys inventory control by giving up fills. Width and skew are the two ways to spend it, they are not the same trade, and only one of them is cheap.

What a market maker is paid for

Quote ten cents wide, fill a thousand times, end the day flat, and still lose. Two separate costs eat the posted edge, and only one of them averages out.

What a real high-frequency market maker earned

One firm, two venues, 200 days of audit-level data. Where the revenue came from, where it went back out, and why the fee schedule mattered more than the spread.

Puzzles

How wide to quote when inventory is charged for

Quote tighter and trade more, quote wider and carry less. Put a price on the inventory, optimise, and find out what the wider quote actually bought.

Interview questions

Skewing quotes to shed inventory

A long book and two quotes. The instinct is to widen. Under exponentially decaying fill rates the arithmetic says move them instead, and says exactly how far.

Related topics

The ideas this one is most often carried alongside, ranked by how much of each collection the two share.

Also in the library