0/70 completed
Market Analysis Interactive

Market Microstructure

Understand how betting markets work at the order level. Spreads, depth, price discovery, and the flow of information through prices.

๐Ÿ“Š The Bid-Ask Spread

In a two-way market, there's always a gap between buy and sell prices. This spread compensates the market maker for risk and inventory.

  • Bid: Price to buy (Back) = Fair - Spread/2
  • Ask: Price to sell (Lay) = Fair + Spread/2
  • Spread: Market maker's compensation

Current Market

Bid (buy at) -1.5
Fair Value 0.0
Ask (sell at) 1.5
Spread 3 pts

Market Parameters

Spread Width (pts) 3
1 10
Sharp Flow (%) 30
5 80
Liquidity ($) 50000
10000 200000

๐Ÿ“Š Market Quality

Quoted Spread 3 pts
Effective Spread 2.4 pts
Price Impact 2.00 bp/$K

Price Discovery Over Time

Higher sharp flow = faster convergence to fair value. Public noise adds volatility.

Market Structure Elements

Bid-Ask Spread

3 pts

Gap between buy/sell prices

Depth

$50K

Total $ at best prices

Sharp Flow

30%

% of volume from informed traders

Price Impact

2.00 bp/$K

Move per $ bet

๐Ÿ“š Key Concepts

Informed vs Uninformed Flow

  • โ†’ Sharp flow: Moves market toward fair value
  • โ†’ Public flow: Adds noise, creates opportunity
  • โ†’ Market makers widen spreads when sharp flow is high

Price Impact

  • โ†’ Large bets move the market against you
  • โ†’ Split large bets across time/books
  • โ†’ Thin markets = higher impact

R Code Equivalent

# Market microstructure simulation
simulate_price_discovery <- function(n_steps, sharp_frac, fair_value = 0) { 
  prices <- numeric(n_steps + 1)
  prices[1] <- fair_value + rnorm(1, 0, 2)
  
  for (s in 2:(n_steps + 1)) { 
    prev <- prices[s - 1]
    # Sharp flow moves toward fair value
    sharp_move <- (fair_value - prev) * sharp_frac * 0.3
    # Public adds noise
    public_noise <- rnorm(1, 0, (1 - sharp_frac) * 1.5)
    prices[s] <- prev + sharp_move + public_noise
  }
  
  return(prices)
}

# Calculate effective spread
effective_spread <- function(executions, quotes) { 
  # 2 * |execution_price - midpoint|
  mean(2 * abs(executions - (quotes$bid + quotes$ask) / 2))
}

prices <- simulate_price_discovery(20, 0.3)
plot(prices, type = "l", main = "Price Discovery")

โœ… Key Takeaways

  • โ€ข Spread = market maker's compensation
  • โ€ข Sharp flow drives price discovery
  • โ€ข Liquidity determines price impact
  • โ€ข Wide spreads when sharps are active
  • โ€ข Split large bets to reduce impact
  • โ€ข Markets converge to fair value over time

Pricing Models & Frameworks Tutorial

Built for mastery ยท Interactive learning