Case Study 1: Order Book Analysis of a High-Profile Polymarket Event
Overview
In this case study, we analyze synthetic but realistic order book data from a high-profile prediction market event: a hypothetical presidential debate night on a Polymarket-style exchange. The contract is "Will Candidate A win the 2024 Presidential Election?" and we examine how the order book behaves before, during, and after a televised debate that dramatically shifts market expectations.
We will: 1. Generate realistic synthetic order book snapshots 2. Track spread dynamics across three phases (pre-debate, during debate, post-debate) 3. Identify informed trading patterns 4. Measure liquidity changes over time 5. Draw conclusions about market microstructure during information events
This case study ties together concepts from Sections 7.1 through 7.8 of the chapter.
Background
Contract: "Candidate A Wins 2024 Presidential Election" - Pays $1.00 if Candidate A wins, $0.00 otherwise. - Pre-debate consensus price: approximately $0.55 (55% implied probability). - The debate begins at 9:00 PM and lasts approximately 90 minutes. - During the debate, Candidate A delivers an unexpectedly strong performance, causing their perceived probability of winning to rise.
Data: We simulate order book snapshots at 10-minute intervals from 8:00 PM to 11:00 PM (19 snapshots total), covering: - Pre-debate (8:00 PM - 8:50 PM): Normal trading, stable price - Debate (9:00 PM - 10:30 PM): Active information flow, price movement - Post-debate (10:40 PM - 11:00 PM): New equilibrium
Phase 1: Pre-Debate (8:00 PM - 8:50 PM)
Order Book Snapshot at 8:30 PM
BIDS ASKS
Price Qty Cum. Price Qty Cum.
$0.55 400 400 | $0.56 350 350
$0.54 300 700 | $0.57 250 600
$0.53 500 1,200 | $0.58 400 1,000
$0.52 200 1,400 | $0.59 150 1,150
$0.50 800 2,200 | $0.60 600 1,750
Observations: - Spread: $0.01 (tight for a prediction market) - Midpoint: $0.555 - Depth at best: 750 contracts (400 bid + 350 ask) - Total depth: 3,950 contracts - Order imbalance: (2,200 - 1,750) / (2,200 + 1,750) = +0.114 (slightly bullish)
The pre-debate book is well-organized with: - Symmetric depth on both sides - Tight 1-cent spread maintained by multiple market makers - Strong support at $0.50 (800 contracts) and resistance at $0.60 (600 contracts) - Relatively stable -- this is a mature market where participants have already priced in publicly available information
Pre-Debate Metrics Summary
| Time | Best Bid | Best Ask | Spread | Midpoint | Bid Depth | Ask Depth | OBI |
|---|---|---|---|---|---|---|---|
| 8:00 PM | $0.55 | $0.56 | $0.01 | $0.555 | 2,100 | 1,800 | +0.077 | ||
| 8:10 PM | $0.55 | $0.56 | $0.01 | $0.555 | 2,200 | 1,700 | +0.128 | ||
| 8:20 PM | $0.55 | $0.56 | $0.01 | $0.555 | 2,150 | 1,750 | +0.103 | ||
| 8:30 PM | $0.55 | $0.56 | $0.01 | $0.555 | 2,200 | 1,750 | +0.114 | ||
| 8:40 PM | $0.55 | $0.56 | $0.01 | $0.555 | 2,300 | 1,800 | +0.122 | ||
| 8:50 PM | $0.55 | $0.57 | $0.02 | $0.560 | 2,400 | 1,600 | +0.200 |
Key insight at 8:50 PM: The spread widened to $0.02 and the OBI increased to +0.200. This is characteristic of pre-event positioning -- market makers widen their quotes to protect against the uncertainty of the debate, and some early informed buying may be occurring.
Phase 2: During the Debate (9:00 PM - 10:30 PM)
The Opening Shock (9:00 PM - 9:20 PM)
At 9:00 PM, the debate begins. Within the first 10 minutes, Candidate A delivers a particularly strong opening statement.
Order Book Snapshot at 9:10 PM:
BIDS ASKS
Price Qty Cum. Price Qty Cum.
$0.58 200 200 | $0.62 100 100
$0.57 150 350 | $0.63 80 180
$0.56 100 450 | $0.65 200 380
$0.55 300 750 | $0.68 150 530
$0.53 400 1,150 | $0.70 300 830
What happened: - Spread exploded: From $0.01 to $0.04 (9:10 PM) - Ask side thinned dramatically: From 1,600 contracts to 830. Sellers pulled their orders as they reassessed. - Bid side shifted up: New bids at $0.57 and $0.58 appeared. The old best bid ($0.55) is no longer the best. - Midpoint jumped: From $0.560 to $0.600 (a 4-cent move in 20 minutes) - OBI surged: To +0.162 (buying pressure)
Trades observed (9:00 - 9:10 PM):
| Time | Price | Qty | Direction |
|---|---|---|---|
| 9:01 | $0.57 | 80 | BUY |
| 9:02 | $0.57 | 50 | BUY |
| 9:03 | $0.58 | 120 | BUY |
| 9:04 | $0.58 | 100 | BUY |
| 9:05 | $0.59 | 200 | BUY |
| 9:06 | $0.60 | 150 | BUY |
| 9:07 | $0.60 | 100 | BUY |
| 9:08 | $0.61 | 50 | BUY |
| 9:08 | $0.55 | 30 | SELL |
| 9:09 | $0.62 | 80 | BUY |
Analysis: The trade flow is overwhelmingly buyer-initiated (9 buys vs 1 sell). The prices of buyer-initiated trades are rising rapidly, suggesting aggressive buying as traders react to the debate in real time. The single sell at $0.55 at 9:08 PM is likely a trader who set a stop-loss or was slow to react.
The Middle Phase (9:20 PM - 9:50 PM)
As the debate continues and Candidate A maintains a strong performance, the market reaches a new temporary equilibrium.
Order Book Snapshot at 9:40 PM:
BIDS ASKS
Price Qty Cum. Price Qty Cum.
$0.63 250 250 | $0.65 200 200
$0.62 300 550 | $0.66 150 350
$0.61 400 950 | $0.67 300 650
$0.60 350 1,300 | $0.68 200 850
$0.58 500 1,800 | $0.70 400 1,250
Observations: - Spread narrowed: Back to $0.02 as market makers re-engaged at new price levels - Midpoint: $0.640 (up from $0.555 pre-debate) - Depth recovering: Total depth of 3,050 is approaching pre-debate levels - OBI: (1,800 - 1,250) / (1,800 + 1,250) = +0.180 (still bullish)
The market is stabilizing. Market makers have moved their quotes to the $0.63-$0.65 range, reflecting the new consensus. Depth is rebuilding as participants gain confidence in the new price level.
Late Debate Surge (9:50 PM - 10:20 PM)
Late in the debate, Candidate A delivers another strong moment, triggering a second wave of buying.
Order Book Snapshot at 10:10 PM:
BIDS ASKS
Price Qty Cum. Price Qty Cum.
$0.67 150 150 | $0.70 100 100
$0.66 200 350 | $0.71 80 180
$0.65 350 700 | $0.72 150 330
$0.64 300 1,000 | $0.73 200 530
$0.62 400 1,400 | $0.75 350 880
Pattern recognition: This second surge shows the same signature as the first: 1. Ask side thins (sellers pull back) 2. Bids shift upward 3. Spread widens temporarily 4. Aggressive buy orders walk the book
Phase 3: Post-Debate (10:30 PM - 11:00 PM)
Equilibrium Formation
After the debate ends, the market processes the overall assessment and settles into a new equilibrium.
Order Book Snapshot at 10:50 PM:
BIDS ASKS
Price Qty Cum. Price Qty Cum.
$0.68 500 500 | $0.69 400 400
$0.67 400 900 | $0.70 350 750
$0.66 600 1,500 | $0.71 500 1,250
$0.65 300 1,800 | $0.72 200 1,450
$0.63 700 2,500 | $0.75 550 2,000
Post-debate metrics: - Spread: $0.01 (back to pre-debate tightness) - Midpoint: $0.685 - Depth at best: 900 contracts (even deeper than pre-debate) - Total depth: 4,500 contracts (exceeds pre-debate) - OBI: (2,500 - 2,000) / (2,500 + 2,000) = +0.111
The market has found a new consensus. The midpoint moved from $0.555 to $0.685 -- a 13-cent increase representing a shift in perceived probability from 55.5% to 68.5%.
Complete Timeline Analysis
Spread Dynamics
| Time | Spread | Phase |
|---|---|---|
| 8:00 PM | $0.01 | Pre-debate (stable) |
| 8:30 PM | $0.01 | Pre-debate (stable) |
| 8:50 PM | $0.02 | Pre-debate (widening as uncertainty rises) |
| 9:00 PM | $0.03 | Debate start (initial shock) |
| 9:10 PM | $0.04 | Debate (peak spread during rapid move) |
| 9:20 PM | $0.03 | Debate (beginning to stabilize) |
| 9:30 PM | $0.02 | Debate (market makers re-engage) |
| 9:40 PM | $0.02 | Debate (temporary equilibrium) |
| 9:50 PM | $0.03 | Debate (second surge begins) |
| 10:00 PM | $0.04 | Debate (second peak spread) |
| 10:10 PM | $0.03 | Debate (settling) |
| 10:20 PM | $0.02 | Debate (late stabilization) |
| 10:30 PM | $0.02 | Debate ends |
| 10:40 PM | $0.01 | Post-debate (equilibrium forming) |
| 10:50 PM | $0.01 | Post-debate (stable) |
| 11:00 PM | $0.01 | Post-debate (stable) |
Key pattern: Spreads widen during information arrival and narrow during stable periods. The two debate surges created twin peaks in the spread time series.
Depth Dynamics
| Time | Total Bid | Total Ask | Total | OBI |
|---|---|---|---|---|
| 8:00 PM | 2,100 | 1,800 | 3,900 | +0.077 |
| 8:50 PM | 2,400 | 1,600 | 4,000 | +0.200 |
| 9:10 PM | 1,150 | 830 | 1,980 | +0.162 |
| 9:40 PM | 1,800 | 1,250 | 3,050 | +0.180 |
| 10:10 PM | 1,400 | 880 | 2,280 | +0.228 |
| 10:50 PM | 2,500 | 2,000 | 4,500 | +0.111 |
Key pattern: Total depth drops sharply during information events (from 4,000 to 1,980 at the first surge) as market makers pull orders. It recovers during stable periods as participants re-enter. The OBI remains consistently positive throughout, reflecting the bullish nature of the information.
Midpoint Price Movement
$0.70 | ●━━━●━━━●
| ●━━━●
$0.65 | ●━━━●
| ●━━━●
$0.60 | ●━━━●
| ●━━━●
$0.55 | ●━━━●━━━●━━━●━━━●━━●
|
$0.50 └──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──
8:00 8:30 9:00 9:30 10:00 10:30 11:00
Time
The midpoint shows a classic "information absorption" pattern: 1. Flat pre-event 2. Rapid increase during event (with two distinct jumps) 3. Flat at new level post-event
Identifying Informed Trading Patterns
Signal 1: Early Positioning
At 8:50 PM (10 minutes before the debate), we observed: - Spread widening from $0.01 to $0.02 - OBI increasing from +0.122 to +0.200 - Bid depth increasing while ask depth decreased
This suggests that some traders may have had advance knowledge of Candidate A's debate preparation quality, or simply anticipated that debates tend to benefit this particular candidate.
Signal 2: Trade Size During the Event
During the debate (9:00-10:20 PM), the average trade size for buyer-initiated trades was 112 contracts, compared to 45 contracts for seller-initiated trades. Large buyer-initiated trades are a hallmark of informed trading -- traders who have processed the debate information faster than others and are acting on their updated beliefs.
Signal 3: Order Cancellation Patterns
At 9:01 PM (one minute after the debate started), 80% of resting ask orders within 5 cents of the best ask were cancelled within 30 seconds. This rapid cancellation indicates that sellers (those betting against Candidate A) quickly recognized that their offering prices were too low given the new information, and pulled their orders to avoid being adversely selected.
Signal 4: Quote Stuffing Suspicious Activity
At 9:15 PM, we observed a burst of 50 orders placed and cancelled within 2 seconds at $0.61 on the bid side. This pattern is consistent with quote stuffing or testing the market's response. While not conclusive evidence of manipulation, this activity warrants further investigation.
Liquidity Analysis
Cost of Trading Over Time
We measure the cost of executing a hypothetical 500-contract market buy at each snapshot:
| Time | VWAP for 500 Buy | Cost vs Midpoint |
|---|---|---|
| 8:00 PM | $0.566 | $0.011 | |
| 8:50 PM | $0.575 | $0.015 | |
| 9:10 PM | $0.647 | $0.047 | |
| 9:40 PM | $0.660 | $0.020 | |
| 10:10 PM | $0.726 | $0.046 | |
| 10:50 PM | $0.700 | $0.015 |
Insight: Trading costs (measured as the difference between execution VWAP and midpoint) more than tripled during the information events. This is the "price of information" -- when new information arrives, the cost of immediacy spikes because liquidity providers demand more compensation for the risk of being on the wrong side.
Conclusions
Key Findings
-
Spreads are a barometer of uncertainty: The spread time series perfectly tracked the phases of information arrival, widening during the debate and narrowing during stable periods.
-
Depth evaporates during events: Total depth dropped by 50% during peak information flow as market makers pulled their orders.
-
Order flow predicts direction: The overwhelmingly buyer-initiated trade flow during the debate was a strong signal of the direction of price movement.
-
Pre-event signals exist: The 10-minute pre-debate period showed subtle signs of informed positioning through OBI changes and spread widening.
-
New equilibrium forms quickly: Within 20 minutes of the debate ending, the market had formed a stable new equilibrium with spreads and depth comparable to pre-debate levels.
-
Trading costs spike during events: Executing large orders during peak information flow can cost 3-4x more than during quiet periods.
Practical Implications for Traders
-
If you have an opinion before a major event: Place your orders before the event, when spreads are tight and liquidity is available. Waiting until the event is underway means paying wider spreads and suffering more slippage.
-
If you are a market maker: Widen your quotes before major events and reduce your order sizes. The risk of adverse selection (being picked off by informed traders) spikes during events.
-
If you are analyzing past events: Order book data during events is a gold mine for understanding how markets process information. The patterns identified here -- spread dynamics, depth changes, order flow imbalance -- are consistent across many types of events.
Code Reference
The Python code for reproducing this analysis is available in code/case-study-code.py. It includes functions for:
- Generating synthetic order book snapshots
- Calculating spread, depth, and OBI time series
- Plotting the midpoint, spread, and depth evolution
- Identifying informed trading signals