The previous lesson handed you the market maker’s P&L and told you the whole job is “quote wide enough and skew cleverly enough.” Lovely advice. How wide? Skew how much? In 2008 Marco Avellaneda and Sasha Stoikov wrote down the answer — the model every modern quoting engine still cribs from. It is the F = ma of market making: two short formulas that take your inventory, your nerves, the volatility, and the clock, and spit out exactly where to put your two prices.
By the end you’ll be able to compute a bid and an ask from scratch, explain why a long maker quotes both prices below the mid, and recite the model’s blind spots so you don’t trade it like gospel.
Before you read — take a guess
A market maker wants to set its bid and ask. Avellaneda–Stoikov says it should first decide on TWO things. Which pair?
The setup: a utility-maximizing maker
Analogy. Picture a market stall owner who must keep buying and selling all day, can’t go home until closing time, and hates being caught holding a pile of unsold stock when the bell rings. Every price tag is a bet: too generous and nobody trades with you, too greedy and you go home with a warehouse full of inventory and a heart full of regret. AS formalizes exactly that anxiety.
The precise model. A single maker quotes a bid and an ask over a finite horizon and wants to maximize the expected exponential utility of terminal wealth:
where is wealth (cash plus inventory marked at the mid) at time and is the risk-aversion coefficient. Exponential (CARA) utility is the trick that makes the math close: it punishes losses more than it rewards equal gains, which is precisely the fear of holding inventory.
Three modeling assumptions do the heavy lifting:
- The mid follows arithmetic Brownian motion with volatility : . No drift — the maker has no directional view, it only fears variance.
- Orders arrive as a Poisson process whose intensity decays with distance from the mid. If your quote sits a distance from the mid, fills arrive at rate Quote close to the mid (small ) and you get hit often but earn a thin edge; quote far (large ) and fills dry up. controls how fast that trade-off bites.
- Two control knobs: the bid distance and ask distance from a center the maker gets to choose.
Why exponential utility?
A risk-neutral maker would just quote to maximize expected spread capture and happily warehouse unlimited inventory. The whole reason AS produces skew is that CARA utility makes the maker dislike the variance its inventory creates — so it pays to shade quotes to bleed inventory off. No risk aversion, no skew.
Match each ingredient of the AS setup to its role.
Pick a term, then click its definition.
The reservation (indifference) price
Analogy. The mid is the market’s fair value. The reservation price is your fair value once you account for the inventory you’re already carrying. If you’re already long a pile of stock, you secretly value it a little lower than the market does — you’d love an excuse to sell — so your personal fair value sits below the mid. Short the stock? Your fair value sits above the mid because you’re itching to buy it back.
The formula. The reservation price is
where is the current mid, is your net inventory (positive = long), risk aversion, variance, and time remaining. It is the price at which you’d be indifferent between holding your current inventory and trading one more unit — hence “indifference price.”
Worked example. Take , (so ), , , and inventory (you’re long 5):
Your personal fair value is 98, a full 2 below the market’s mid of 100 — because you’re long and want out. Now crank the knobs:
| Change | New skew | Reservation |
|---|---|---|
| Base () | 98.0 | |
| Double the time () | 96.0 | |
| Double risk aversion () | 96.0 | |
| Flat inventory () | 100.0 |
More time on the clock and more risk aversion both pull further from the mid: the longer you must carry the position and the more you fear it, the harder you lean to shed it.
Pitfall: the reservation price is not a forecast
is not a prediction that the price is heading to 98. It says nothing about where the market is going — AS assumes zero drift. The shift is purely about your risk: it nudges your quotes so fills tend to flatten your book, not because you think the stock is overvalued.
Fill in the mechanics of the reservation price.
Pick the right option for each blank, then check.
When the maker is long (q > 0), the reservation price sits the mid, so the maker leans to . The gap between r and the mid grows as time-to-close .
The optimal spread
Analogy. The spread is your price for taking the other side. Charge too little and informed flow and variance eat you; charge too much and you never trade. AS shows the optimal width is the sum of two rents: an inventory-risk rent you charge because every fill saddles you with risk, and a liquidity/competition rent that depends on how quickly fills vanish as you back away from the mid.
The formula. The total optimal spread (ask distance plus bid distance) is
- First term, — the inventory/risk term. Pure compensation for the variance you’ll carry: scales with risk aversion, variance, and time left. This is the same quantity (per unit inventory) that skewed the reservation price.
- Second term, — the market/liquidity term. Comes entirely from the order-arrival model. The faster fills decay with distance (large = lots of competition, liquid name), the smaller this term — you can’t afford to quote wide when rivals will undercut you.
Worked example. Use , , , :
So the total optimal spread is about 1.69, and the half-spread is .
Sanity check the two terms separately
When you debug a quoting engine, split the spread into its two pieces. A spread that explodes as the day’s close approaches is the inventory term misbehaving (it should shrink, not grow, as ). A spread that’s wildly wide in a liquid name is the liquidity term — your fitted is too small.
Select every statement about the optimal spread δ_a + δ_b that is TRUE.
Placing the actual quotes
Analogy. You’ve found your personal fair value (the reservation price) and how far apart to set the two tags (the spread). Now just wrap the spread symmetrically around the reservation price — not around the mid. That last word is the whole game.
The formulas. With total spread :
Worked example (carrying our numbers). We had and , so :
Look closely: the mid is 100, yet both quotes — bid 97.155 and ask 98.845 — sit below the mid. The maker is long, so it has shoved its entire price ladder down to make its ask attractive (sell quickly!) and its bid unattractive (please stop selling me more!). That asymmetry around the mid is inventory skew, and it fell straight out of two formulas.
Drag the inventory, risk-aversion, and time sliders below and watch the reservation price and both quotes slide off the mid in real time:
- Inventory skew (r − mid)
- −$2.40
- Optimal spread δ
- $1.69
Long inventory → both quotes shaded DOWN to attract buyers
σ = 2, k = 1.5 (fixed). q·γ·σ²·(T−t) sets the skew; γσ²(T−t) + (2/γ)·ln(1 + γ/k) sets the spread.
The reservation price is the maker’s risk-adjusted fair value: it slides away from the mid as inventory grows, and the optimal spread (set by risk aversion, volatility, time, and order-flow intensity) is wrapped around it. Inventory steers the quotes; the spread sizes them.
Think first
The maker above is long (q = 5) with both quotes below the mid of 100. The maker's ask (98.845) is below the mid. Could a fill at that ask ever be a 'loss' versus the mid — and why is that fine?
Hint: What is the maker trying to achieve by selling, and what is r really measuring?
Comparative statics: which knob does what
Analogy. Think of four dials on the quoting machine. Two outputs you care about: the skew (how far your quotes lean off the mid) and the spread (how wide they are). Each dial pushes these two in characteristic directions.
| Turn up… | Effect on skew | Effect on spread | |---|---|---| | Risk aversion | More skew (lean harder to flatten) | Wider (inventory term up; liquidity term down — inventory usually dominates near close) | | Volatility | More skew (variance is scarier) | Wider (inventory term grows with ) | | Time-to-close | More skew (longer to carry risk) | Wider (inventory term grows) | | Liquidity/competition | No direct effect ( isn’t in ) | Tighter (the log liquidity term shrinks) |
The clean takeaway: inventory pressure () drives both skew and width, while competition () only tightens the market term and never touches your centering.
Sort each change by whether it WIDENS the spread or TIGHTENS it (all else equal).
Place each item in the right group.
The end-of-horizon effect
Analogy. A trader who must be flat by the closing bell stops fearing inventory as the bell approaches — there’s no overnight gap to dread when there’s no overnight. AS bakes this in through the factor.
The mechanics. As , the term , so:
- the skew — the reservation price re-centers on the mid;
- the inventory term of the spread — that half of the spread vanishes.
What’s left at the very end is just the liquidity term : quotes snap back symmetric around the mid and tighten to their competitive floor.
Worked example. Keep and watch run down:
| Skew | Reservation | Spread | |
|---|---|---|---|
| 1.0 | 2.00 | 98.00 | |
| 0.5 | 1.00 | 99.00 | |
| 0.1 | 0.20 | 99.80 | |
| 0.0 | 0.00 | 100.00 |
By the bell, the maker quotes a symmetric around 100 regardless of inventory. Drag the time slider to the far end of the simulator to feel the same collapse:
- Inventory skew (r − mid)
- −$2.40
- Optimal spread δ
- $1.69
Long inventory → both quotes shaded DOWN to attract buyers
σ = 2, k = 1.5 (fixed). q·γ·σ²·(T−t) sets the skew; γσ²(T−t) + (2/γ)·ln(1 + γ/k) sets the spread.
As the clock runs out, the inventory term dies, the reservation price re-centers on the mid, and the spread tightens to its competitive floor.
With q = 5, γ = 0.1, σ² = 4, k = 1.5, what happens to the maker's quotes as t → T (the horizon closes)?
From the formulas back to inventory skew
You may have noticed AS never has a rule that says “if long, shade quotes down.” That behavior is emergent. The reservation price subtracts — proportional to inventory — and the spread wraps symmetrically around it. Combine the two and the algebra produces the skew automatically:
Both quotes ride the same skew off the mid; the spread just sets how far apart they sit. Get long, both slide down; get short, both slide up. This turns a wandering inventory into a mean-reverting one, because the skewed quotes make the flattening side of every trade more likely. The next lesson, Inventory Risk & Quote Skewing, zooms entirely into this behavior — but now you know exactly which line of algebra creates it.
Before you read — take a guess
AS never contains an explicit 'if long, quote lower' instruction. So where does the inventory-skewing behavior come from?
Assumptions & limitations
AS is a model, not a money printer. Know where it bends:
- Constant volatility . Real volatility clusters and spikes; a fixed under-quotes right when you most need width (around news).
- No explicit adverse selection. Order arrivals are assumed independent of the true value — fills don’t carry information. Reality disagrees: the trader lifting your ask often knows the price is about to rise. That’s the Glosten–Milgrom world, a separate lesson, and AS simply doesn’t price it.
- Symmetric half-spreads in the simple form. The closed-form approximation splits evenly (). The exact solution lets the halves differ with inventory; practitioners often re-introduce that asymmetry.
- Finite vs. infinite horizon. The clean formulas assume a fixed terminal time. A continuously running maker has no natural “close,” so practice uses the Guéant–Lehalle–Fernandez-Tapia infinite-horizon closed forms, which replace with a stationary risk term and keep quotes well-behaved indefinitely.
The biggest pitfall: AS output is not a guaranteed edge
The model tells you the risk-optimal quotes given its assumptions — not that those quotes are profitable. Feed it a bad or ignore adverse selection and you’ll quote confidently into a buzzsaw. AS is a disciplined starting point for centering and width; the edge still has to come from good parameters, real adverse-selection control, and queue/latency execution the model never sees.
Which limitation of the basic AS model most directly means a confident-looking quote can still be systematically picked off by informed traders?
Recap
Big picture
The Avellaneda–Stoikov model at a glance
- Avellaneda–Stoikov
- Setup
- Max E[−exp(−γX_T)] over [0,T]
- Mid: arithmetic BM, vol σ, no drift
- Fills: Poisson λ(δ)=A·e^(−kδ)
- Reservation price r
- r = s − qγσ²(T−t)
- Long → r below mid; short → above
- Centering decision (handles inventory)
- Optimal spread δ
- Inventory term γσ²(T−t)
- Liquidity term (2/γ)·ln(1+γ/k)
- Width decision (handles risk & competition)
- Quotes
- ask = r + δ/2
- bid = r − δ/2
- Skew emerges automatically
- Limits
- Constant σ
- No adverse selection
- Guéant–Lehalle for infinite horizon
- Setup
What does the reservation price r represent?
Check your answer to continue.
Key Takeaways
What to remember
- Two decisions, two formulas. Center the quotes with the reservation price ; size them with the optimal spread .
- Quotes wrap around , not the mid: , . When long, both quotes sit below the mid — that’s skew, and it’s emergent, not a bolted-on rule.
- Inventory pressure () drives skew and width; competition () only tightens the spread.
- End-of-horizon: as the terms die — quotes re-center on the mid and tighten to the liquidity floor.
- Mind the blind spots: constant , no adverse selection, symmetric halves. AS is a disciplined starting point, not a guaranteed edge — Guéant–Lehalle gives the infinite-horizon version used in practice.