Millennium's Bid-Ask and Market-Making Question
Millennium pairs clean object design with trading intuition. This market-making question starts as a tidy value class, then asks you to quote around a market price, then to lean those quotes against your inventory. Here is the full question, Java for each part, and a detailed rubric.
The question
Part 1: design a BidAskSpread class with a bid and an ask. Expose the spread, the mid price, and the spread as a percentage of mid. Reject a bid greater than the ask.
Part 2: a MarketMaker that, given a market price and a spread width, returns a symmetric bid-ask quote.
Part 3: make the maker skew its quotes against its current inventory to manage risk.
Part 1 · The bid-ask spread
A small value class with an enforced invariant. Guard the constructor, and watch the divide-by-zero in the percentage.
class BidAskSpread {
final double bid, ask;
BidAskSpread(double bid, double ask) {
if (bid > ask) throw new IllegalArgumentException("bid cannot exceed ask");
this.bid = bid; this.ask = ask;
}
double spread() { return ask - bid; }
double midPrice() { return (bid + ask) / 2.0; }
double spreadPercentage() {
double mid = midPrice();
return mid == 0 ? 0 : spread() / mid * 100; // avoid divide-by-zero
}
}
Part 2 · A symmetric market maker
Center a quote on the market price and place the bid and ask half the spread width on each side.
class MarketMaker {
final double spreadWidth;
MarketMaker(double spreadWidth) { this.spreadWidth = spreadWidth; }
BidAskSpread quote(double marketPrice) {
double half = spreadWidth / 2.0;
return new BidAskSpread(marketPrice - half, marketPrice + half);
}
}
Part 3 · Skew against inventory
A real maker does not quote symmetrically forever. When it is long, it shifts both quotes down to attract sells and discourage buys; when short, it shifts up. The skew is proportional to inventory, and the spread width is preserved.
class InventoryAwareMaker {
final double spreadWidth, skewPerUnit;
double inventory; // positive = long, negative = short
InventoryAwareMaker(double spreadWidth, double skewPerUnit) {
this.spreadWidth = spreadWidth; this.skewPerUnit = skewPerUnit;
}
BidAskSpread quote(double marketPrice) {
double half = spreadWidth / 2.0;
double center = marketPrice - inventory * skewPerUnit; // long -> quote lower
return new BidAskSpread(center - half, center + half);
}
void onFill(double signedQty) { inventory += signedQty; } // +buy, -sell
}
Skewing the center while holding the width constant is the key idea: you keep your edge per trade but bias which side gets hit, nudging inventory back toward flat. Quoting symmetrically regardless of position is the answer that misses the point of market making.
How Millennium scores it
| Dimension | Weak | Strong |
|---|---|---|
| Invariant | Allows bid above ask | Rejects an inverted quote in the constructor |
| Spread math | Divide-by-zero on percentage | Correct spread, mid, and guarded percentage |
| Quoting | Asymmetric or wrong width | Symmetric bid-ask of the requested width |
| Inventory skew | Quotes symmetrically regardless of position | Shifts the center against inventory, keeps width |
| Risk intuition | No sense of why skew exists | Explains skew as inventory-risk control |
| Design | Mixed responsibilities | Clean value class plus a separate maker |
This is one question of 9 pages
Get the full Millennium question bank
The full Millennium bank carries the coding, market-making, and ML rounds, each problem with its follow-ups and a rubric, compiled from people familiar with the process and cross-verified across sources.
Millennium interview FAQ
What does the Millennium coding interview ask?+
Object-oriented design with a trading flavor, plus DP and ML questions. The market-making question tests a clean bid-ask abstraction, correct spread and mid math, and whether you understand quoting and inventory risk.
What is inventory skew in market making?+
When a market maker accumulates a long position, it lowers its quotes to encourage selling and discourage buying, and vice versa when short. Skewing quotes against inventory reduces directional risk, which is the Part 3 extension here.
How is the Millennium coding round scored?+
On enforcing bid not exceeding ask, correct spread, mid, and percentage math including division by zero, a symmetric quote around the market price, and a sound inventory-skew rule, all in clean object-oriented code.
Where can I find real Millennium interview questions?+
Pichup maintains a Millennium Management question bank compiled from people familiar with the process, with the coding, market-making, and ML rounds, their follow-ups, and rubrics. The question in this guide is one of them.