market-microstructure-traditionallisted
Install: claude install-skill Serennity007/claude-trading-skills-67
# Market Microstructure (Traditional)
Market microstructure studies how orders become trades and how trades become
prices. Understanding these mechanics is essential for execution optimization,
market making, and detecting informed flow. This skill covers limit order book
(LOB) theory as applied to crypto markets on centralized exchanges, and compares
LOB mechanics to the AMM-based structure of DEXes.
## Core Concepts
| Concept | What It Tells You |
|---|---|
| **Bid-ask spread** | Cost of immediacy — how much you pay to trade now vs later |
| **Price impact** | How your order moves the market price |
| **Order book imbalance** | Short-term directional predictor from queue sizes |
| **Adverse selection** | Risk of trading against informed counterparties |
| **Inventory risk** | Market maker exposure from accumulated positions |
| **Execution quality** | How well your fills compare to a benchmark |
---
## Bid-Ask Spread Decomposition
The bid-ask spread is not a single thing. It decomposes into three components
(Roll, 1984; Glosten & Harris, 1988):
1. **Adverse selection** — compensation for trading against informed traders
2. **Inventory holding** — compensation for carrying risk
3. **Order processing** — fixed costs of providing liquidity (fees, infrastructure)
### Spread Measures
```python
# Quoted spread: what you see on the order book
quoted_spread = best_ask - best_bid
quoted_spread_bps = (best_ask - best_bid) / midprice * 10_000
# Effective spread: what you