Home Markets News Equities Quantum Papers Microstructure About
Paper 05 Microstructure Spreads Execution Adverse Selection

Market Microstructure: Bid-Ask Spread Dynamics

Quoted, effective, and realized spreads as microstructure state variables. Decomposing the cost of immediacy for execution models.

Abstract

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.

Quoted Spread
$$\text{Quoted Spread}_t = Ask_t - Bid_t$$
Midpoint
$$M_t = \frac{Ask_t + Bid_t}{2}$$

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):

Effective Spread
$$\text{Effective Spread}_t = 2 D_t (P_t - M_t)$$

The realized spread compares the execution price to a later midpoint \(M_{t+\Delta}\), showing ex-post dealer revenue net of information effects:

Realized Spread
$$\text{Realized Spread}_t = 2 D_t (P_t - M_{t+\Delta})$$

Why Do Spreads Widen?

Python Implementation

spreads.py Python
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.

⚡ Daily Stock Signals Dashboard
180 liquid US equities scored against 30 technical signals after each close. Free, rules-based, research use only.
View Signals →

Assumptions

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

References

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>}
}
Get Research Updates
Daily pre-open briefing with market signals, research highlights, and quantitative analysis. Free, no spam.
No spam. Unsubscribe anytime. Privacy Policy