Reading about market making only gets you so far. This lesson is a game in the style firms use: a market on a sum of dice, revealed one at a time, against a counterparty who knows a little more than you.
The rules
- Five dice are rolled and hidden. You are making a market on their sum.
- Before each die is revealed, show a two-sided market, bid @ ask, between 1 and 6 wide.
- The trader has peeked at the next die. They buy one lot at your ask if it is at least 1 below their estimate, sell one lot at your bid if it is at least 1 above it, and otherwise pass. Now and then they trade at random.
- After the fifth die, everything settles at the true sum.
Your theoretical value
Each hidden die has mean 3.5 and variance . With the sum of the revealed dice and dice still hidden:
At the start that is . The readout shows it live; the quote boxes are pre-filled with fair value ± 2, which you are free to change.
Figure 19.1Dice market game
How to play it well
- Width follows uncertainty. Early, with five dice hidden, you know little and the trader knows a lot relative to you. Late, the uncertainty is small, so you can tighten.
- Trades are information. If they buy, the die they’ve seen is likely 5 or 6. If you are now short, raising your market both protects you and reflects the news.
- Watch your position. Ending long 3 when the last die comes up 1 is how games are lost. Skew to get flat before the end.
- You will lose sometimes. An informed trader takes money from a market maker on average. The skill is losing small when you’re picked off and earning the spread from the random trades.
In code
import numpy as np
rng = np.random.default_rng(15)
def play(width=4.0, games=20_000):
pnl = 0.0
for _ in range(games):
dice = rng.integers(1, 7, 5)
pos = cash = 0.0
for shown in range(5):
fair = dice[:shown].sum() + 3.5 * (5 - shown)
bid, ask = fair - width / 2, fair + width / 2
trader = dice[:shown + 1].sum() + 3.5 * (5 - shown - 1) # sees one die ahead
if trader - ask >= 1: pos -= 1; cash += ask
elif bid - trader >= 1: pos += 1; cash -= bid
pnl += cash + pos * dice.sum()
return pnl / games
for w in (2, 4, 6):
print(w, round(play(w), 3)) # wider markets lose less to the informed trader
Check yourself
Three dice are revealed (sum 9) and two are hidden. What is your fair value for the final sum?
Each hidden die is worth 3.5 on average: .