Inventory-Averse Quoting with Quadratic Penalty

Optimization · Hard · Free problem

You make a market in a single asset with mid-price $\mu$. You currently hold inventory $I$ units (positive is long, negative is short). You post an ask at $a = \mu + \delta_a$ and a bid at $b = \mu - \delta_b$, with offsets $\delta_a, \delta_b > 0$.

Fills follow an Avellaneda-Stoikov exponential model. Over the next interval, at most one trade arrives: $P(\text{ask filled}) = A\,e^{-k\,\delta_a}, \qquad P(\text{bid filled}) = A\,e^{-k\,\delta_b},$ with $A>0$, $k>0$, and $A e^{-k\delta_a} + A e^{-k\delta_b} \le 1$. A wider offset lowers the chance of being hit. If your ask is filled you earn the offset $\delta_a$ and inventory becomes $I-1$; if your bid is filled you earn $\delta_b$ and inventory becomes $I+1$.

You maximize expected edge minus a quadratic inventory penalty: $J(\delta_a, \delta_b) = \mathbb{E}[\text{edge}] - \gamma\,\sigma^2\,\mathbb{E}[I_{\text{new}}^2],$ where $\sigma$ is the per-interval price volatility and $\gamma>0$ is the risk-aversion coefficient.

  1. Write $J$ explicitly as a function of $\delta_a$ and $\delta_b$.
  2. Derive the optimal offsets $\delta_a^{*}$ and $\delta_b^{*}$ from the first-order conditions.
  3. Give the optimal total spread $S^{*} = \delta_a^{*} + \delta_b^{*}$ and the reservation-price skew (the shift of the quote midpoint away from $\mu$), and explain why the optimum is finite.

Numbers: $\mu = 100$, $\sigma = 2$, $\gamma = 0.05$, $A = 0.9$, $k = 0.8$, and current inventory $I = 2$. Report $\delta_a^{*}$, $\delta_b^{*}$, $S^{*}$, the skew, and the resulting quotes $a^{*}, b^{*}$.

Hints

  1. Set $p_a = A e^{-k\delta_a}$ and $p_b = A e^{-k\delta_b}$. Write the expected edge as $A\delta_a e^{-k\delta_a} + A\delta_b e^{-k\delta_b}$ and the expected squared inventory as $I^2 + p_a(1-2I) + p_b(1+2I)$.
  2. Notice that $\delta_a$ appears only through $e^{-k\delta_a}$ and $\delta_b$ only through $e^{-k\delta_b}$, so the first-order conditions decouple into two independent single-variable equations.
  3. After differentiating, divide by $A e^{-k\delta}>0$; the exponential cancels and you are left with a linear equation giving $\delta^{*} = 1/k + \gamma\sigma^2(1 \mp 2I)$. The total spread is inventory-independent and the midpoint skews by $-2\gamma\sigma^2 I$.

Worked Solution

How to Think About It: This is the canonical Avellaneda-Stoikov market-making problem. You want offsets wide enough to capture edge on each fill, but tight enough that you actually trade. On top of that you are penalized for inventory: holding a position exposes you to price moves whose variance is $\sigma^2 I^2$. The exponential fill model is what keeps the problem honest -- pushing an offset out kills its fill probability geometrically, so there is a real cost to widening. The skew comes entirely from the inventory term: if you are long you want to encourage sells (tighten the ask) and discourage buys (widen the bid).

Quick Estimate: With no inventory the problem is symmetric, so each offset should sit near

/k$ plus a small risk premium of order $\gamma\sigma^2$. Here
/k = 1.25$ and $\gamma\sigma^2 = 0.2$, so a flat offset of about
.45$ per side is the zero-inventory baseline. Being long $I=2$ then skews the two sides apart by roughly
\gamma\sigma^2 I = 0.8$ each, so expect the ask near $0.65$ and the bid near .25$. The total spread should stay near (1/k) + 2\gamma\sigma^2 \approx 2.9$ regardless of inventory.

Approach: Write the expected edge and expected squared inventory under the exponential fill model, form $J$, and take first-order conditions. The two offsets decouple, so each FOC is a single-variable equation in $\delta_a$ or $\delta_b$.

Formal Solution:

Step 1 -- Build the objective. Write $p_a = A e^{-k\delta_a}$ and $p_b = A e^{-k\delta_b}$ for the fill probabilities. An ask fill earns $\delta_a$ and sends inventory to $I-1$; a bid fill earns $\delta_b$ and sends it to $I+1$. The expected edge is $\mathbb{E}[\text{edge}] = A\,\delta_a\,e^{-k\delta_a} + A\,\delta_b\,e^{-k\delta_b}.$ For the inventory term, with probability $p_a$ inventory is $(I-1)^2$, with probability $p_b$ it is $(I+1)^2$, and with the remaining probability it stays $I^2$: $\mathbb{E}[I_{\text{new}}^2] = I^2 + p_a\big((I-1)^2 - I^2\big) + p_b\big((I+1)^2 - I^2\big) = I^2 + p_a(1 - 2I) + p_b(1 + 2I).$ Hence $J = A\,\delta_a e^{-k\delta_a} + A\,\delta_b e^{-k\delta_b} - \gamma\sigma^2\Big[I^2 + A e^{-k\delta_a}(1-2I) + A e^{-k\delta_b}(1+2I)\Big].$

Step 2 -- First-order conditions decouple. Only the $e^{-k\delta_a}$ terms involve $\delta_a$, and only the $e^{-k\delta_b}$ terms involve $\delta_b$, so the two offsets optimize independently. Differentiating in $\delta_a$: $\frac{\partial J}{\partial \delta_a} = A e^{-k\delta_a}(1 - k\delta_a) - \gamma\sigma^2\,(1-2I)\,(-k)\,A e^{-k\delta_a} = 0.$ Divide through by $A e^{-k\delta_a} > 0$: $1 - k\delta_a + k\,\gamma\sigma^2(1 - 2I) = 0 \;\Longrightarrow\; \delta_a^{*} = \frac{1}{k} + \gamma\sigma^2(1 - 2I).$ By the same computation in $\delta_b$ (the inventory factor is

+2I$): $\delta_b^{*} = \frac{1}{k} + \gamma\sigma^2(1 + 2I).$

Step 3 -- Spread, skew, and why it is finite. Adding and subtracting: $S^{*} = \delta_a^{*} + \delta_b^{*} = \frac{2}{k} + 2\gamma\sigma^2 \quad(\text{independent of } I),$ $\text{skew} = \frac{\delta_a^{*} - \delta_b^{*}}{2} \cdot(\text{sign on the mid}) = -2\gamma\sigma^2 I,$ i.e. the quote midpoint $\tfrac{a+b}{2} = \mu + \tfrac{1}{2}(\delta_a - \delta_b)$ shifts by $-2\gamma\sigma^2 I$ relative to $\mu$. When you are long ($I>0$) the mid shades down to attract sellers. The solution is valid while both offsets stay positive, $|I| < \dfrac{1/k + \gamma\sigma^2}{2\gamma\sigma^2}$.

The optimum is finite because the fill probability decays exponentially: as an offset grows, $\delta\,e^{-k\delta}$ peaks at $\delta = 1/k$ and then falls, and the fills vanish, so $J \to -\gamma\sigma^2 I^2$ from below. A linear fill model (probability $\propto$ the other side's offset) has no interior optimum -- widening the spread always looks better -- which was the flaw in the original linear specification.

Step 4 -- Plug in the numbers. With

/k = 1.25$, $\gamma\sigma^2 = 0.05\cdot 4 = 0.2$, and $I = 2$: $\delta_a^{*} = 1.25 + 0.2(1 - 4) = 1.25 - 0.6 = 0.65,$ $\delta_b^{*} = 1.25 + 0.2(1 + 4) = 1.25 + 1.0 = 2.25,$ $S^{*} = 2(1.25) + 2(0.2) = 2.90, \qquad \text{skew} = -2(0.2)(2) = -0.80.$ The quotes are $a^{*} = 100 + 0.65 = 100.65$ and $b^{*} = 100 - 2.25 = 97.75$.

Answer: $\boxed{\;\delta_a^{*} = \frac{1}{k} + \gamma\sigma^2(1 - 2I), \qquad \delta_b^{*} = \frac{1}{k} + \gamma\sigma^2(1 + 2I)\;}$ $\boxed{\;S^{*} = \frac{2}{k} + 2\gamma\sigma^2 \;(\text{inventory-independent}), \qquad \text{midpoint skew} = -2\gamma\sigma^2 I\;}$ For the given numbers ($\mu=100,\sigma=2,\gamma=0.05,A=0.9,k=0.8,I=2$): $\delta_a^{*} = 0.65$, $\delta_b^{*} = 2.25$, $S^{*} = 2.90$, skew $= -0.80$, giving quotes $a^{*} = 100.65$ and $b^{*} = 97.75$. Being long, you tighten the ask and widen the bid to shed inventory.

Intuition

This problem captures the central tension in market making: you earn the spread on every trade, but each trade changes your inventory and exposes you to risk. The quadratic penalty $\gamma I^2$ is a tractable proxy for the real cost of inventory -- your P&L variance grows with $I^2$, and if you get margin-called or forced to liquidate at a bad price, the cost is super-linear in position size. The beautiful result is that optimal quoting decomposes cleanly into two independent decisions: how wide to set your total spread (driven by adverse selection and the fill probability model) and how much to skew your midpoint (driven purely by inventory). The skew is linear in $I$ -- a long position shifts your quotes down dollar-for-dollar with the aversion parameter, which is exactly what you see on real trading desks where the quoting engine adjusts the mid based on current Greeks.

In practice, this is the foundation of the Avellaneda-Stoikov (2008) framework that most electronic market-making desks use as a starting point. The real-world complications -- stochastic volatility, discrete tick sizes, multi-asset inventory, adverse selection from informed flow -- all layer on top of this basic structure. But the core insight never changes: your quotes should be centered not at fair value, but at fair value minus a term proportional to your inventory. If you remember one thing from market microstructure, it is this.

Open the full interactive solver →