---
title: "Betting and Market-Making Games"
book: "The Interview Book"
subject: quant
language: en
chapter: 13
exercises: 0
source: https://one-course.com/books/quant/18/en/chapter/13-betting-and-market-making-games
---

# Chapter 13 — Betting and Market-Making Games

“Make me a market on the sum of three dice.” The candidate says 8 at 10. The interviewer buys. “Again.” 8 at 10. Buys again. “Again.” The fair value is 10.5, and she has sold twice below it, to a counterparty who knows nothing more than she does and kept buying for exactly one reason. Everything in this chapter is about what the second “again” should have told her: where the fair value is, how wide to quote around it, how much to bet when the odds are in your favour, and when a trade is information.

## 13.1 Pricing a bet

The vocabulary of odds and edge is One Quant Book 2’s (chapter 29). A bet’s fair price is its expected payoff; its edge is the expected profit per unit staked at the offered price; odds of $b$ to 1 against an event imply a probability of $1/(b+1)$ at which the bet is fair.

**Method 13.1 (Pricing any bet in three lines).**

1. List the outcomes with their probabilities and payoffs, net of the stake.
2. Take the expectation; compare it with zero (or with the price asked).
3. Say the edge as a fraction of the stake and the variance, since the size of the bet will depend on both.

**Example 13.2 (Odds against a six).**

A bet paying 5 to 1 on a single die showing six wins 5 with probability $\tfrac16$ and loses 1 with probability $\tfrac56$: expectation 0, fair. At 6 to 1 the edge is $\tfrac16$ of the stake; at 4 to 1 it is $-\tfrac16$.

## 13.2 Sizing

Knowing a bet is favourable does not say how much to stake. Maximising the expected logarithm of wealth, the Kelly criterion of One Quant Book 2, chapter 29, gives the fraction $f^\ast = p - q/b$ for a bet that pays $b$ to 1 with probability $p$, and in general the $f$ that solves $\sum_i p_i r_i/(1 + r_i f) = 0$ over outcomes with net returns $r_i$. Fractions of Kelly trade growth for safety.

**Proposition 13.3 (Halving under fractional Kelly).**

In the continuous-time approximation, betting $c$ times the Kelly fraction on a favourable bet, the chance of ever falling to a fraction $x$ of starting wealth is $x^{2/c - 1}$ (One Quant Book 2, chapter 29). Full Kelly halves wealth at some point with probability $\tfrac12$; half Kelly with probability $\tfrac18$.

**Example 13.4 (An even-money coin at 60%).**

$f^\ast = 0.6 - 0.4 = 0.2$. Betting 20% of wealth each time grows wealth at about 2% a bet in the median, and the chance of a halving along the way is one half: that is why desks that size by Kelly use a fraction of it.

## 13.3 Making a market on an unknown

The mechanics are One Quant Book 2’s (chapter 30): a two-sided price, a width, and updates as trades arrive. Interviews test three habits.

**Method 13.5 (Making a market in an interview).**

1. *Centre* on the expected value, computed or estimated, and say it.
2. *Width* from the uncertainty (a fraction of a standard deviation) and from who may trade with you: wider if the counterparty may know more.
3. *Update* on information (a card shown, a die revealed) by recomputing the expectation, and on trades by asking what a counterparty who trades there knows: a trade from someone who knows nothing tells you nothing, and a trade from someone who knows something tells you what they know.
4. *Track* your position and its risk; say when you are long and by how much.

The hook’s candidate failed the first step: 8 at 10 is centred at 9, below the 10.5 of three dice, so an uninformed counterparty buys at 10 with a half-point edge every time. Moving the market up because of the trade is the right reflex for the wrong reason; the reason is that the centre was wrong.

**Example 13.6 (A trade that is information).**

The interviewer rolls three dice, looks at one and buys whenever that die shows 4 or more. After a buy the fair value is the mean of that die given it is at least 4, which is 5, plus 7 for the other two: 12. A second buy by the same player on the same information adds nothing, so the market moves once, not twice.

## 13.4 Informed counterparties and when not to trade

A market maker who faces some traders who know the value and some who do not earns the width from the second group and loses to the first, and the balance sets the best width, or says that no width is profitable (Glosten and Milgrom, 1985; the adverse selection of One Quant Book 1, chapter 1). The chapter’s model makes it concrete: the value is uniform on $[0, 100]$ and the market maker quotes $50 \pm h$; with probability $\alpha$ the arriving trader knows the value and trades whenever it lies outside the quotes, and otherwise an uninformed trader buys or sells with probability $\max(0, 1 - h/20)$, less often the wider the market. The expected profit per arrival is $(1-\alpha)\,h\,(1 - h/20) - \alpha(50 - h)^2/100$ for $h \le 20$.

![A market maker’s expected profit per arriving trader against the half-width of the quote, in the chapter’s model (value uniform on (0, 100), uninformed demand falling linearly to zero at h = 20). With 5% or 15% informed traders the best half-width is about 10.4 or 11.4; with 30% no width makes money, and the right answer is not to quote. Exact computation; data: fig_iv_width.py.](https://one-course.com/images/onecourse/chapters/quant-18/iv-betting-and-market-making-games/fig-b53627416a8f.svg)

***Figure 13.1.** A market maker’s expected profit per arriving trader against the half-width of the quote, in the chapter’s model (value uniform on $[0, 100]$, uninformed demand falling linearly to zero at $h = 20$). With 5% or 15% informed traders the best half-width is about 10.4 or 11.4; with 30% no width makes money, and the right answer is not to quote. Exact computation; data: `fig_iv_width.py`.*

Two related traps complete the family. In a sealed-bid auction for a common value, bidding one’s own estimate loses on average, because winning selects the bidder whose estimate is too high: the winner’s curse of One Quant Book 2, chapter 30, and One Quant Book 4, chapter 29, on common-value auctions and bid shading. And in a game where one may stop at any time, the value of the option to stop must be computed by [backward induction](https://one-course.com/books/quant/18/en/chapter/12-brainteasers-and-logic#def-iv-brainteasers-and-logic-backward), not guessed.

## 13.5 Worked answers

**Example 13.7 (A market on a skewed quantity).**

*“Make me a market on the number of rolls of a die until the first six.”* The count is geometric with mean 6 and standard deviation $\sqrt{30} \approx 5.5$, so “5 at 7” is centred on the mean. The candidate who stops there misses what the interviewer is looking for: the distribution is skewed. The median is 4 (the chance of a six within three rolls is $1 - (5/6)^3 \approx 0.42$, within four $\approx 0.52$). A buyer at 7 loses two times in three (the six comes by the sixth roll with probability $1 - (5/6)^6 \approx 0.67$) and profits only when it comes after the seventh roll, about 28% of the time, but then by a lot. Say so: a counterparty who trades on what usually happens will sell to your bid more often than buy your offer, and a market centred on the median would be mispriced by two rolls. Then quote, and be ready to move.

**Example 13.8 (Locking in a bet that has moved).**

*“You bet 100 at 3 to 1 on outcome A. The odds are now even money on each side. What do you do if you want no risk, and what have you made?”* Bet $h$ on B at evens: if A wins you collect 300 and lose $h$; if B wins you lose 100 and collect $h$. Setting $300 - h = h - 100$ gives $h = 200$ and a locked profit of 100 either way. The profit is the move in the odds: the first bet implied a 25% chance and even money implies 50%, and the hedge converts that repricing into cash. *Check:* if the odds had not moved (3 to 1 against A, so 1 to 3 on B), the same algebra gives a locked profit of zero, as it must.

## 13.6 Question bank

**Interview question 13.1 ★ trader • market maker.**

You pay 4 to play: a die is rolled and you receive twice its face if it is even and nothing if it is odd. Is the game fair?

**Solution of Interview question 13.1.**

The payoff averages $2 \times (2 + 4 + 6)/6 = 4$, the price: fair. The variance is high (half the time you receive nothing), which matters for sizing but not for the price.

*What the interviewer is looking for: the expectation over the six faces and a word on variance.*

**Interview question 13.2 ★ trader • proprietary firm.**

A bookmaker offers 3 to 1 against an event. What probability does that imply? If you think the probability is 30%, what is your edge per unit staked?

**Solution of Interview question 13.2.**

3 to 1 against implies $\tfrac14$. At 30%: $0.3 \times 3 - 0.7 \times 1 = 0.2$ per unit staked, a 20% edge; the bookmaker’s implied probability is below yours.

*What the interviewer is looking for: converting odds to probability and computing the edge.*

**Interview question 13.3 ★ trader • market maker.**

Two dice are rolled; the contract pays the larger face minus the smaller. Make me a market, and justify the centre and the width.

**Solution of Interview question 13.3.**

The gap is 0 with probability $6/36$ and $k = 1, \dots, 5$ with probability $2(6-k)/36$, so its mean is $70/36 \approx
1.94$ and its variance $210/36 - (70/36)^2 \approx 2.05$, a standard deviation of about 1.43. A market of 1.5 at 2.5 is centred and about a third of a standard deviation each side; the distribution is skewed (a gap of 0 or 1 four times in nine), so a buyer at 2.5 needs a gap of 3 or more, which comes up a third of the time. Widen it if the interviewer can see the dice.

*What the interviewer is looking for: the distribution written down, mean and spread computed, and a width tied to both.*

**Interview question 13.4 ★ trader • market maker.**

Make me a market on the number of heads in ten tosses of a fair coin.

**Solution of Interview question 13.4.**

Centre 5, standard deviation $\sqrt{10 \times 0.25} \approx 1.58$; quote 4.5 at 5.5, say, and say that the distribution is symmetric, so there is no reason to skew.

*What the interviewer is looking for: the binomial mean and spread, and a symmetric quote.*

**Interview question 13.5 ★ trader, researcher • market maker.**

What is the fair value of a contract paying the largest of three dice?

**Solution of Interview question 13.5.**

$\P(\max \le k) = (k/6)^3$, so $\E[\max] = \sum_{k=1}^6 \P(\max \ge k) = \sum_k \big(1 - ((k-1)/6)^3\big) =
119/24 \approx 4.96$. A quick check: it must exceed the two-dice value $161/36 \approx 4.47$.

*What the interviewer is looking for: the tail-sum formula and a [sanity check](https://one-course.com/books/quant/18/en/chapter/5-phone-and-technical-screens#def-iv-phone-and-technical-screens-sanity) against the two-dice case.*

**Interview question 13.6 ★★ trader, risk • proprietary firm.**

A wager returns three times the stake net with probability 0.35 and loses the stake otherwise. What fraction of your wealth do you commit each time to maximise long-run growth?

**Solution of Interview question 13.6.**

With net odds $b = 3$, $f^\ast = p - q/b = 0.35 - 0.65/3 = 2/15 \approx 0.133$: commit about 13% of wealth each time. The wager has a large edge ($0.35 \times 3 - 0.65 = 0.40$ per unit) but loses almost two times in three, which keeps the fraction small.

*What the interviewer is looking for: the Kelly formula for net odds $b$ and a reading of why it is small.*

**Interview question 13.7 ★★ trader, researcher • proprietary firm.**

Per unit staked, a bet returns $+2$ with probability 0.3, 0 with probability 0.3 and $-1$ with probability 0.4. What is the Kelly fraction, and what is the growth rate at that fraction?

**Solution of Interview question 13.7.**

Maximise $0.3\ln(1 + 2f) + 0.4\ln(1 - f)$ (the zero outcome contributes nothing): $0.6/(1 + 2f) = 0.4/(1 - f)$ gives $f = 1/7 \approx 0.143$. The growth rate there is about 0.0137 per bet (1.4%), lower than at slightly smaller or larger fractions, as the chapter’s code checks.

*What the interviewer is looking for: setting up the log-growth first-order condition with several outcomes.*

**Interview question 13.8 ★★ trader, risk • market maker.**

You bet repeatedly on a favourable bet. What is the chance your wealth ever halves if you bet the full Kelly fraction? Half of it? What would you tell a trader who says full Kelly is optimal?

**Solution of Interview question 13.8.**

By [Proposition 13.3](#prop-iv-betting-and-market-making-games-halving), $\tfrac12$ at full Kelly and $(\tfrac12)^3 = \tfrac18$ at half Kelly; a simulation of geometric Brownian motion in the chapter’s code agrees. Full Kelly maximises long-run growth only if the edge is known exactly; it is not, and overestimating the edge by a factor of two turns full Kelly into double Kelly, whose growth is zero. At half the Kelly fraction the growth rate is still three quarters of its maximum, and deep drawdowns become far rarer.

*What the interviewer is looking for: the drawdown formula and the argument from uncertainty in the edge.*

**Interview question 13.9 ★★ trader • market maker.**

Make me a market on the number of red cards among the top ten of a shuffled deck. The first three are turned over and all are red. Where is fair value now?

**Solution of Interview question 13.9.**

The count is hypergeometric: mean $10 \times 26/52 = 5$, variance $10 \times \tfrac12 \times \tfrac12 \times 42/51
= 35/17$, standard deviation about 1.43; quote 4.5 at 5.5. After three reds, the other seven come from 49 cards with 23 red: fair value $3 + 7 \times 23/49 = 44/7 \approx 6.29$.

*What the interviewer is looking for: sampling without replacement, and conditioning by removing the seen cards.*

**Interview question 13.10 ★★ trader • market maker.**

Three dice are rolled; the interviewer looks at one of them and buys from you whenever it shows 4 or more. You quote 10 at 11 and are bought from. Where is fair value? You are bought from again. Where is it now?

**Solution of Interview question 13.10.**

Before any trade, 10.5. The buy says the seen die is at least 4, mean 5: fair value $5 + 7 = 12$. The second buy carries no new information (same die, same rule), so fair value stays 12: move your market to about 11.5 at 12.5 once, and do not keep walking it up.

*What the interviewer is looking for: updating on what the trade reveals, and recognising a repeated trade as no new information.*

**Interview question 13.11 ★★★ trader, researcher • market maker.**

In the chapter’s model (value uniform on $[0, 100]$, quote $50 \pm h$, a share $\alpha$ of informed traders, uninformed demand $\max(0, 1 - h/20)$), what half-width maximises profit when $\alpha = 0.15$, and what is the profit? What do you do when $\alpha = 0.3$?

**Solution of Interview question 13.11.**

Maximising $(1 - \alpha)h(1 - h/20) - \alpha(50 - h)^2/100$ over $h$ with $\alpha = 0.15$ gives $h \approx 11.4$ and a profit of about 1.93 per arrival (with $\alpha = 0.05$, $h \approx 10.4$ and 3.96; [Figure 13.1](#fig-iv-betting-and-market-making-games-width)). With $\alpha = 0.3$ every half-width below 50 loses money: the informed flow costs more than the uninformed pays. Do not quote, or quote so wide that nobody trades, and find out who the informed traders are before quoting again.

*What the interviewer is looking for: the trade-off between width and informed losses, and recognising when not to trade.*

**Interview question 13.12 ★★★ trader, researcher • proprietary firm.**

Two firms bid in a sealed-bid auction for an asset worth $V$ to both; each sees $V$ plus independent noise uniform on $[-10, 10]$, bids its estimate minus $k$, and the higher bid wins and pays its bid. For what $k$ does the winner break even on average? Why is it not zero?

**Solution of Interview question 13.12.**

With both bidding their estimate minus $k$, the winner is the one with the larger noise and pays $V + \max(e_1, e_2) -
k$, so its average profit is $k - \E[\max(e_1, e_2)]$. For two uniform variables on $[-10, 10]$ the expected maximum is $10/3$, so the winner breaks even at $k = 10/3 \approx 3.3$. Winning is information: it tells you your estimate was the higher one, and so probably too high (the winner’s curse). The calculation ignores the edges of $V$’s range.

*What the interviewer is looking for: conditioning on winning, and the expected maximum of the noise.*

**Interview question 13.13 ★★★ trader • market maker.**

A deck of 10 red and 10 black cards is turned over one card at a time. Each red pays you 1 and each black costs you 1, and you may stop at any moment. What is the game worth with optimal stopping? Why is it worth more than zero when the deck is balanced?

**Solution of Interview question 13.13.**

By [backward induction](https://one-course.com/books/quant/18/en/chapter/12-brainteasers-and-logic#def-iv-brainteasers-and-logic-backward) on (reds left, blacks left): stop when the continuation value is not positive. For 10 and 10 the value is $26\,995/16\,796 \approx 1.61$; for a full deck, about 2.62. It is positive because you can stop when ahead and are never forced to take the negative tail: stopping at zero is always available, which makes the value the expectation of a non-negative option.

*What the interviewer is looking for: a dynamic programme over the deck’s state, and the option-value intuition.*

**Interview question 13.14 ★★★ trader, risk • proprietary firm.**

With a bankroll of 1 000 you must bet exactly 100 at even money on each of 100 rounds of a coin that wins with probability 0.55, stopping only if you are broke. What is the chance of ruin, and what is your expected final bankroll? How does fixed-size betting compare with betting a fraction of wealth?

**Solution of Interview question 13.14.**

In units of 100, start at 10, move $\pm1$ with $p = 0.55$ for 100 rounds, absorbed at 0. The exact distribution gives a ruin probability of about 0.090 and an expected final bankroll of about 19.55 units, 1 955. Betting a fixed fraction of wealth instead can never go to zero in finitely many rounds and scales the bet down after losses, which is why fractional sizing survives streaks that ruin fixed bets; its median growth is set by the Kelly analysis.

*What the interviewer is looking for: a small dynamic programme for ruin with a horizon, and the contrast with proportional betting.*

Sources and further reading

- J. L. Kelly, “A new interpretation of information rate”, *Bell System Technical Journal* 35(4), 1956, 917–926.
- L. R. Glosten and P. R. Milgrom, “Bid, ask and transaction prices in a specialist market with heterogeneously informed traders”, *Journal of Financial Economics* 14(1), 1985, 71–100.
- One Quant Book 2, chapters 29–30 (expected value, Kelly, market-making games); One Quant Book 4, chapter 29 (auctions).
