Read the first chapter
The whole of chapter one, free. About 11 min. Turn the pages with the arrows, your keyboard, or a swipe.
Chapter 1
Bid-Ask Spread Decomposition
A trader can watch a market quote a tight bid-ask spread for minutes and still end up paying a wide effective spread. The gap between the quoted spread (what the screen shows) and the effective spread (what you actually pay after fills) shows up precisely when liquidity is “real” but not equally available to every order. If you trade size, work orders, or rebalance inventory, you need to understand where that gap comes from - otherwise you end up tuning your execution strategy by feel.
This chapter teaches you how quoted and effective spreads arise from three concrete mechanisms: adverse selection, order processing, and inventory effects. You will learn how to break the spread into parts you can observe in your own prints, then map each part to an execution decision you can test. After reading, you will be able to look at a day of fills and say, with numbers, whether you paid mainly for toxic flow, for queueing and latency, or for your own inventory footprint.
Why the spread splits into quoted vs effective (and what each cause buys you)
Quoted spread comes from how the best bid and best ask get posted, while effective spread comes from how your orders interact with the incoming order flow and the book’s operational limits. When you buy at the ask (or cross it indirectly), you usually assume you “paid the spread.” In practice, the market often widens before your order completes, or the liquidity you hit moves away, or your fills cluster in price levels that reflect who you are and what you already hold.
Adverse selection means the market makers or liquidity providers adjust their quotes because they suspect your order contains information they do not have. If they think you are more likely to buy before price rises (or sell before it falls), they demand compensation through a wider spread. You will often see this as a pattern: your marketable buys occur during upticks, your marketable sells occur during downticks, and the effective spread you pay increases when your order direction aligns with short-term price moves.
Order processing covers the mechanical delay between “you sent a message” and “the exchange matched it,” plus any internal routing and matching logic. Even in a low-latency environment, you rarely match exactly at the moment you decide. Queue position, symbol-level throttles, and order-handling rules create a gap between the displayed quote and the quote you actually trade. This effect tends to show up as systematic underperformance when the book is fast, thin, or you run close to your message timing limits.
Inventory effects capture the fact that liquidity providers manage risk across their own inventory. If they already hold a lot of the asset, they may shade quotes to discourage more of the same side of flow, effectively widening the spread for your subsequent trades. This cause becomes visible when your own trading (or the broker’s aggregated flow) repeatedly leans on one side, and the effective spread responds more strongly than the quoted spread does.
The practical problem this chapter solves: you cannot improve what you cannot separate. If you lump every pain point into “the spread was wide,” you will over-tune your limit prices, chase liquidity that is not actually there, or misdiagnose latency as toxic flow. The Spread Mirror Framework gives you a way to mirror your trades against the book’s evolution and classify the dominant driver.
How the Spread Mirror Framework decomposes spread into actionable parts
The Spread Mirror Framework works by comparing three things at the same time: (1) the quoted spread around each decision time, (2) the mid-price movement before and after your fill, and (3) the direction and intensity of your own order pressure relative to the book depth. You then map each comparison to adverse selection, order processing, or inventory effects.
Use this method on a single symbol over a controlled window first. Start with a day where you have a clean mix of resting orders and marketable orders, then expand to longer periods once your labels stabilize.
1. Align each fill to the quote state you actually traded For every execution, record the best bid and best ask (or at least the midpoint) at the earliest timestamp you can reliably associate with the order entry and the timestamp of the fill. Compute the quoted spread at both times. If you cannot get millisecond-level quote snapshots, use exchange-level “event time” from your feed and keep your analysis at that resolution. Expected outcome: you will see whether your effective cost comes from the spread changing after you decide (often order processing) or from the market moving against you (often adverse selection).
2. Compute an effective-vs-quoted spread gap per trade For each fill price \(P\), define the trade-side sign \(s\): \(+1\) for buys, \(-1\) for sells. Let \(M\) be the midpoint at decision time and \(SP\) be the quoted spread at decision time. A simple mirror metric is - Signed effective half-spread = \(s \cdot (P - M)\) - Signed quoted half-spread = \(s \cdot (SP/2)\) The gap = signed effective half-spread minus signed quoted half-spread. Expected outcome: - If the gap often flips sign or grows when your side matches short-term price drift, you likely face adverse selection. - If the gap clusters in periods of rapid quote updates or your fill timestamps trail decision timestamps consistently, you likely face order processing.
3. Attribute adverse selection using “price drift after your side” For each fill, measure the midpoint change over a short window after the fill - pick something you can measure, like 100 ms or the next few book update events in your feed. Compute average midpoint change conditional on your trade sign. You do not need a causal claim; you need a directional pattern. Expected outcome: if marketable buys tend to occur before upward mid drift and sells before downward drift, the market likely saw your order as informative and widened quotes in advance. Your effective spread will grow relative to the quoted spread even when the posted spread looks stable right before you arrive.
4. Attribute inventory effects using “your side pressure vs subsequent quote shading” Build a simple proxy for inventory pressure: net signed quantity you trade over a short window (for example, 30 trades or 1 minute), scaled by average depth at the top of book. Then check whether the quoted spread and depth on the opposite side widen after your net pressure, even when immediate price drift stays small. Expected outcome: inventory effects show up as quote shading that persists beyond the immediate price move. You will often find that repeated buys increase the cost of later buys more than it increases the cost of sells, or vice versa, depending on how you net out.
A concrete micro example helps. Suppose you trade 1,000 shares of an equity near the open. At decision time, the bid is 99.90 and ask is 100.00, so \(SP=0.10\) and half-spread is 0.05. You buy at 100.02, so your signed effective half-spread is \(+0.06\) relative to the midpoint 99.95. The gap is \(0.06-0.05=0.01\). Now look at midpoint movement: over the next 100 ms, midpoint rises another 0.03. That pattern points to adverse selection: the book likely widened because it expected your buys to arrive before price rises, or because it learned something from your order flow. If instead midpoint hardly moves but the gap concentrates whenever your fill timestamps lag your decision times and the book updates aggressively, you likely face order processing.
Inventory effects often show up with a different signature. Imagine you repeatedly buy and then stop. The mid stabilizes, but the ask you would hit next time stays elevated and depth on the ask shrinks relative to the bid. Your pressure likely made liquidity providers carry more long inventory risk, so they shaded quotes.
Putting it into practice on Elena Park’s equity execution workflow
Elena Park trades equities with an execution style that mixes resting orders and occasional marketable sweeps when she sees momentum. She keeps a tight record of her fills and the top-of-book snapshots from her market data feed. Her goal for this workflow is not to “optimize” abstractly; it is to label why her effective spread exceeded her expectations on a specific day so she can change exactly one thing the next day.
Assume Elena trades a liquid large-cap and uses a typical window: 1,000 ms around each order decision. She tags each fill with side, quantity, and the midpoint and quoted spread at decision time. Then she runs the Spread Mirror Framework.
1. Extract a per-fill dataset with consistent timing For each execution, store: - Fill price \(P\) and side \(s\) - Midpoint \(M\) and quoted spread \(SP\) at decision time - Midpoint change \(\Delta M\) over the next 100 ms (or next N book update events) - Top-of-book depth at bid and ask at decision time Expected outcome: you can compute the signed effective half-spread and the gap per fill without mixing time resolutions.
2. Compute the signed effective half-spread gap For each fill, compute: - Signed effective half-spread = \(s \cdot (P - M)\) - Signed quoted half-spread = \(s \cdot (SP/2)\) - Gap = effective half-spread minus quoted half-spread Then split gaps by sign of \(\Delta M\) (midpoint drift) and by your trade side. Expected outcome: gaps that grow when your side aligns with favorable short-term drift point toward adverse selection; gaps that grow when you see fast quote updates with little drift point toward order processing.
3. Run a simple adverse-selection check Compute the average \(\Delta M\) over 100 ms conditional on your trade side. If buys precede upward midpoint shifts and sells precede downward shifts, you label those fills as adverse-selection-prone. Expected outcome: Elena finds that the fills where she bought at the ask had systematically positive midpoint drift after the fill, even when the quoted spread looked stable right before she traded.
4. Run a simple inventory-effect check Compute net signed quantity traded in 1-minute buckets and scale by average top-of-book depth. Then check whether later quoted spreads on the same side widen after heavy net pressure, controlling for immediate midpoint drift. Expected outcome: Elena discovers that after a burst of buys, the ask-side depth thins and the quoted spread widens for additional buys more than for sells, even when midpoint drift in the next 100 ms does not explain the entire gap.
5. Translate labels into execution changes and retest - If adverse selection dominates: reduce marketability when drift runs against your direction signal; add time to let information content pass, and rely more on passive orders when your side tends to move the market. - If order processing dominates: slow down decision-to-send by a few milliseconds, reduce message rate spikes, or change order type to one with fewer internal steps (for example, avoid frequent reprice loops that create queueing). - If inventory dominates: cap continuous one-sided pressure; rebalance using smaller clips or alternate sides with tighter risk limits so you do not force persistent quote shading.
Quick checklist: - Compute the per-fill gap between signed effective half-spread and signed quoted half-spread. - Measure midpoint drift after each fill over 100 ms (or your nearest reliable window). - Label adverse selection when your trade side predicts short-term midpoint drift. - Label order processing when the gap clusters around fast quote updates with weak drift. - Label inventory effects when quote shading persists after one-sided net pressure.
Within Elena’s tooling, the Spread Mirror Framework produces labels she can act on. She does not need to know the internal logic of every liquidity provider; she only needs a stable mapping from her actions to the three mechanisms.
What to watch for: edge cases that fool the decomposition
Even with clean data, a few traps can make you attribute the wrong mechanism. The fixes are practical and measurable.
Latency smear When your timestamps do not line up with decision time, you can accidentally attribute order processing to adverse selection. For example, if you record midpoint at “order entry” but your feed timestamps the “first touch” later, the midpoint drift you attribute to adverse selection may actually belong to the delay. Do this: Use the earliest timestamp you can trust for decision state, and run the gap computation twice: once using decision-time midpoint, once using fill-time midpoint. If the mechanism label flips, you have a timing alignment problem. Not this: Compare quoted spread at one timestamp to effective spread at another without checking whether the mid and spread evolved in between.
Hidden order type effects If you use pegged orders, midpoint pegging, or reserve/hidden orders, your fill mechanics can differ from the displayed top-of-book state. The market may quote a tight spread, but your order executes when the displayed quote has already moved because your order only becomes eligible under certain conditions. This can masquerade as order processing or adverse selection depending on how your hidden liquidity interacts with the book. Do this: For each fill type, compute the gap separately by order type and by whether you crossed the spread or stayed passive. Keep the decomposition inside order-type buckets. Not this: Mix all fills into one dataset and then conclude “adverse selection dominates” because the overall gap widened.
Inventory vs drift confusion during momentum In momentum regimes, adverse selection and inventory effects can both look like “your side predicts drift.” If the market trends, your buys will often come with upward drift regardless of whether liquidity providers widened for informational reasons or because they manage inventory risk. Do this: Add a drift-neutral filter: compare fills where the immediate midpoint drift is small but your subsequent quoted spread shading changes. If shading changes persist without drift, inventory effects likely dominate. Not this: Treat every realized drift as evidence of adverse selection. Realized drift can come from the broader market, not from the information content of your order.
The takeaway is simple but sharp: quoted spread tells you what liquidity promises at a moment in time; effective spread tells you what that promise costs once your order hits the book and the market reacts. When you mirror your fills against quote evolution and midpoint drift, you stop guessing which part of the spread you pay for - and you start changing the one lever that actually moves your cost.
End of chapter one. 7 more chapters in the full book.
Swipe or use the arrows to turn the page
What's inside: 8 chapters
- 1. Bid-Ask Spread Decomposition
- 2. Liquidity Measures and Microstructure Data
- 3. Order Book Depth and Shape Effects
- 4. Price Impact Models for Execution
- 5. Limit Orders vs Market Orders
- 6. Measuring and Attributing Slippage
- 7. Optimal Execution with Almgren-Chriss
- 8. Microstructure Regimes and Robust Backtesting
About this book
"Market Microstructure" is a finance book by Michael Burney with 8 chapters and approximately 17,669 words. Trading market microstructure: liquidity, spreads, and price formation.
This book was created using Inkfluence AI, an AI-powered book generation platform that helps authors write, design, and publish complete books. It was made with the AI Ebook Generator.
Frequently Asked Questions
What is "Market Microstructure" about?
Trading market microstructure: liquidity, spreads, and price formation
How many chapters are in "Market Microstructure"?
The book contains 8 chapters and approximately 17,669 words. Topics covered include Bid-Ask Spread Decomposition, Liquidity Measures and Microstructure Data, Order Book Depth and Shape Effects, Price Impact Models for Execution, and more.
Who wrote "Market Microstructure"?
This book was written by Michael Burney and created using Inkfluence AI, an AI book generation platform that helps authors write, design, and publish books.
How can I create a similar finance book?
You can create your own finance book using Inkfluence AI. Describe your idea, choose your style, and the AI writes the full book for you. It's free to start.
Write your own finance book with AI
Describe your idea and Inkfluence writes the whole thing. Free to start.
Start writingCreated with Inkfluence AI