Market Microstructure: Bid-Ask Spread Dynamics
Quoted, effective, and realized spreads as microstructure state variables. Decomposing the cost of immediacy for execution models.
The bid-ask spread is far more than a simple transaction cost — it is a compressed summary of inventory risk, adverse selection, and market-maker expectations about future order flow. This paper formalizes quoted, effective, and realized spreads as microstructure state variables and provides a Python implementation for decomposing the cost of immediacy in execution models.
Key Takeaways
- The quoted spread captures the raw cost of crossing the book; the effective spread measures actual execution quality relative to the midpoint.
- The realized spread isolates ex-post dealer revenue net of information effects, revealing the adverse selection component.
- Spread widening is driven by inventory risk, processing costs, and adverse selection from informed order flow.
- Microstructure-aware models must treat spread alongside depth imbalance, cancellation rates, and order flow — not in isolation.
Spread Decomposition
At the surface, the bid-ask spread looks trivial. But in market microstructure, the spread is not merely a transaction cost — it is a compressed summary of inventory risk, adverse selection, tick-size constraints, queue competition, and market-maker expectations about future order flow.
The effective spread measures how far the trade price deviates from the midpoint, adjusted for trade direction (\(D_t = +1\) for buyer-initiated, \(D_t = -1\) for seller-initiated):
The realized spread compares the execution price to a later midpoint \(M_{t+\Delta}\), showing ex-post dealer revenue net of information effects:
Why Do Spreads Widen?
- Inventory risk: dealers need compensation when they accumulate too much long or short exposure
- Processing costs: technology, clearing, capital, and exchange fees
- Adverse selection: if incoming orders are likely informed, a passive market maker expects to lose on average after the trade
Python Implementation
import pandas as pd import numpy as np def compute_spreads(df: pd.DataFrame, horizon=5) -> pd.DataFrame: out = df.copy() out["mid"] = (out["bid"] + out["ask"]) / 2 out["quoted_spread"] = out["ask"] - out["bid"] out["effective_spread"] = 2 * out["trade_sign"] * (out["trade_price"] - out["mid"]) out["mid_future"] = out["mid"].shift(-horizon) out["realized_spread"] = 2 * out["trade_sign"] * (out["trade_price"] - out["mid_future"]) out["price_impact"] = out["effective_spread"] - out["realized_spread"] return out
Spread behavior is endogenous — it reflects the interaction between the limit order book and expected future price movement. This is why microstructure-aware models often include spread, queue position, depth imbalance, cancellation rates, and order flow imbalance together rather than in isolation. The spread is the market's local price of immediacy.
Related Research
- Sentiment Analysis in the Turkish Market (BIST) — Building a financial NLP pipeline with Qwen and Llama
- Sovereign AI: Local LLMs for Quant Research — Why self-hosted models are structurally superior for investment research
- Automating Alpha Discovery with Genetic Algorithms — Evolutionary search for automated signal generation
- All Research Papers — Full paper collection on QuantMedia
Assumptions
- The Roll estimator assumes an efficient price plus bid-ask bounce. Serial covariance of price changes is negative only because trades alternate between bid and ask. Any genuine short-horizon momentum or mean reversion in the efficient price contaminates the estimate.
- Trades are equally likely at bid and ask. Systematically one-sided flow breaks the symmetry the estimator depends on.
- The spread is constant over the estimation window. It is not, particularly around the open, the close and scheduled news.
- Quoted is not effective. Quoted spread is an upper bound; executions inside the quote make the effective spread smaller, and the gap between them is itself informative.
Robustness: what would change the conclusion
The estimator fails loudly and often. When the sample covariance of consecutive price changes is positive, the Roll formula requires the square root of a negative number and returns nothing. Published implementations differ in how they handle it — discarding the window, flooring at zero, or substituting a different estimator — and the choice materially changes any average computed across many windows.
Decomposition is model-dependent. Splitting the spread into order-processing, inventory-holding and adverse-selection components requires a structural model. Different models attribute the same observed spread quite differently, so component shares should be read as model output, not measurement.
Tick-size regimes are not comparable. Spread series that straddle a tick-size change, a decimalisation event or a venue-structure change are measuring different things before and after.
Limitations
- Decomposition is model-dependent. Splitting the spread into order-processing, inventory and adverse-selection components requires a structural model. Different models attribute the same observed spread differently.
- Quoted is not effective. Quoted spreads overstate the cost actually paid when trades execute inside the quotes, and understate it when orders walk the book.
- Fragmentation. US equities trade across many venues and dark pools. A spread measured on one venue is not the consolidated cost of liquidity.
- Intraday non-stationarity. Spreads follow a strong intraday pattern and widen around events. Daily averages conceal most of what matters for execution.
References
- Roll, R. (1984). “A Simple Implicit Measure of the Effective Bid-Ask Spread in an Efficient Market.” Journal of Finance 39(4), 1127–1139.
- Glosten, L. & Milgrom, P. (1985). “Bid, Ask and Transaction Prices in a Specialist Market with Heterogeneously Informed Traders.” Journal of Financial Economics 14(1), 71–100.
- Amihud, Y. & Mendelson, H. (1986). “Asset Pricing and the Bid-Ask Spread.” Journal of Financial Economics 17(2), 223–249.
- Huang, R. & Stoll, H. (1997). “The Components of the Bid-Ask Spread: A General Approach.” Review of Financial Studies 10(4), 995–1034.
- Corwin, S. & Schultz, P. (2012). “A Simple Way to Estimate Bid-Ask Spreads from Daily High and Low Prices.” Journal of Finance 67(2), 719–760.
QuantMedia research is independent and not peer reviewed. These references are the primary sources the analysis draws on; readers are encouraged to consult them directly rather than relying on this summary.
Research record
- Author
- Cemil Ertürk · QuantMedia Research
- Published
- February 5, 2026
- Last material revision
- August 16, 2026
- Research version
- 1.1
- Topic
- Microstructure
- Review status
- Independent research. Not peer reviewed.
How to cite this research
Cemil Ertürk. "Market Microstructure: Bid-Ask Spread Dynamics." QuantMedia, 2026. https://quantmedia.io/paper-bid-ask-spread-dynamics.html
BibTeX
@misc{erturk2026bid,
author = {Ert{\"u}rk, Cemil},
title = {Market Microstructure: Bid-Ask Spread Dynamics},
year = {2026},
howpublished = {QuantMedia},
url = {https://quantmedia.io/paper-bid-ask-spread-dynamics.html},
note = {Accessed: <date>}
}