Quant Sandbox
DerivativesPortfolio & RiskFixed IncomeCorporate FinanceProbability & MeasureStochastic ModelsMarket MicrostructureGuide
Market Microstructure
Order Book
Market Making
LabMarket making desk
Avellaneda–Stoikov
Glosten–Milgrom
Kyle Model
Spread Estimation
Connected Guides
  • Market makers and liquidity
  • Adverse selection and informed trading
  • Market making profit and loss attribution
  • Inventory risk and quote skewing

© 2026 Quant Sandbox · A study aid for quantitative finance

Privacy & dataNo cookies

This site does not use cookies and asks for no personal data. It keeps a few small settings in your browser's local storage — your chosen theme and language, the sidebar layout, and your progress and answers in the Guides — so it remembers them on your next visit. This data never leaves your device; clearing your browser storage removes it. Inputs you change can also be captured in the page URL, so you can share or bookmark a specific setup. The site uses Vercel Web Analytics, a privacy-friendly, cookieless service that records only anonymous, aggregated usage (such as page views) without identifying you or tracking you across other sites.

Market Making

Quote a bid and an ask while customers arrive: earn the spread, manage the inventory you pile up and see when informed traders take your money.

Random seed: 1

Customer flow

Flow
4/s
110
0.50
0.21.5
1.0¢
0.23
0%
00.5
0%
-0.50.5
Income

income ≈ spread × matched volume; fills per side ∝ e^(−k·δ)

A wider half-spread δ earns more per fill but gets fewer fills; informed customers only trade when they win.

Your quotes, live
askbid

Drag the square handles, or focus the rail: ↑/↓ skew both quotes 0.5¢ · ←/→ narrow/widen · P pull/restore · Space start/pause.

Time left
60.0 s
P&L
+$0.00
Fills
0 bought · 0 sold
Half-spread
2.0¢
Inventory0 · flat
Spread earned
+$0.00
Adverse moves
+$0.00
Inventory
+$0.00
Your rounds: spread vs income

Play 3 more round(s) to unlock the theory curve.

2.0¢
08

About this tool

A market maker stands ready to buy at the bid and sell at the ask, all day, to anyone. When a buyer and a seller arrive one after the other, the market maker earns the spread between the two prices. That is the business: income is roughly the spread times the volume that is matched on both sides. The catch is that customers do not arrive in neat pairs. Between trades the market maker holds inventory whose value moves with the market, and some customers trade because they know where the price is going. This lab lets you play the role yourself and see where the money comes from and where it goes.

Frequently asked questions

How does a market maker make money?

By buying at the bid and selling at the ask. Each matched round trip earns the spread, so a first estimate of income is spread × matched volume. A wider spread earns more per trade but attracts fewer customers, because they can find better prices elsewhere or simply decide not to trade. The best spread balances income per trade against the number of trades, which you can find by experiment in the lab.

Why does a wider spread not always mean more profit?

Because the number of fills falls as the spread widens. If the arrival rate of customers decays with the distance of your quote from the fair price, doubling the spread can more than halve the volume. Total income is the product of the two, so it rises at first and then falls. A spread that is too narrow, on the other hand, may not cover the losses to informed traders.

What is inventory risk?

When more customers sell to you than buy from you, you end up long the asset, and the other way round. That position gains or loses as the price moves, often much more than the spread you earned on the trades. Market makers therefore shade their quotes: with a long position they lower both bid and ask to encourage buyers and discourage further sellers, until the inventory comes back towards zero.

What is adverse selection?

Some customers trade because they know the price is about to move. They buy from you just before the price rises and sell to you just before it falls, so every trade with them loses money. A common misconception is that the spread is pure profit; in reality part of it is an insurance premium paid by uninformed traders to cover the losses to informed ones.

Learn the theory

  • Market makers and liquidity — Who provides liquidity, how bid and ask quotes work, the spread as the price of immediacy, makers and takers, and the risks a market maker carries.
  • Adverse selection and informed trading — Why trading with someone who knows more costs money, markouts as the measure of that cost, toxic flow, and how informed traders change the best spread.
  • Market making profit and loss attribution — Splitting a maker's P&L into spread capture, adverse selection, inventory and fees, with markout curves, fill ratios and the numbers a desk watches.
  • Inventory risk and quote skewing — How a maker's position turns price moves into P&L, why that risk grows with position and time, and how shading both quotes pulls inventory back to zero.