Market Microstructure

The study of how trading mechanisms affect price formation. Includes order book dynamics, bid-ask spreads, and trade execution mechanics. Accurate microstructure modeling is what separates realistic backtests from misleading ones.

Market microstructure is the branch of finance that studies how trading mechanisms and institutional rules affect the process of price discovery and trade execution. It encompasses the mechanics of how orders are submitted, matched, and executed; how information is incorporated into prices; and how market design influences trading costs, liquidity, and price efficiency.

Core concepts

The order book is central to market microstructure. It is a real-time record of all outstanding buy and sell limit orders at various price levels. The highest buy order (bid) and lowest sell order (ask) define the bid-ask spread, which represents the cost of immediate execution. The depth of the order book, meaning the quantity of orders at each price level, determines how much volume can be traded before moving the price.

Price formation is the process by which new information gets reflected in asset prices. In a well-functioning market, prices adjust quickly and efficiently to new information. Market microstructure studies how this happens mechanically: through the interaction of informed traders (who trade on private information), uninformed traders (who trade for other reasons), and market makers (who provide liquidity).

Why microstructure matters for backtesting

Backtesting accuracy depends fundamentally on how well the simulation captures market microstructure effects. A backtest that ignores microstructure assumes a frictionless market where orders fill instantly at observed prices with unlimited liquidity. In reality, the act of trading itself affects prices, liquidity varies throughout the day, and execution depends on the specific mechanics of the exchange.

For high-frequency and intraday strategies, microstructure effects can dominate performance. A strategy that generates 2 basis points of alpha per trade but faces 5 basis points of execution costs from microstructure effects will lose money in practice despite appearing profitable in a naive backtest.

Key microstructure effects

Bid-ask bounce refers to the alternation of transaction prices between the bid and ask as buys and sells alternate. This creates artificial volatility in transaction prices that is not present in the true underlying value. Strategies that trade at high frequency must account for this effect.

Price impact occurs when a trade moves the price against the trader. Market impact models attempt to quantify this cost based on order size, market conditions, and instrument characteristics. The standard approach is a square-root model where impact scales with the square root of order size relative to average volume.

Adverse selection risk affects limit orders. A limit buy order that fills may indicate that the price is moving down (since a seller found the limit price attractive), creating an immediate paper loss. This is why limit order strategies are not always superior to market orders despite avoiding the bid-ask spread.

Practical example

Consider a strategy that buys when the price drops 0.5% in one minute. In a naive backtest, the strategy buys at the close of that one-minute bar. In reality, the price drop may have been caused by a large sell order that temporarily depleted buy-side liquidity. The strategy's buy order would face a wider spread, less available volume, and potentially adverse price impact as other algorithms react to the same signal.

How Tektii helps

Tektii models market microstructure effects by executing backtest orders against actual tick-level data rather than aggregated bars. This means the simulation accounts for the bid-ask spread, available volume, and price dynamics that existed at each moment in time. The result is backtests that more closely reflect real-world execution conditions, helping traders avoid strategies that look profitable only in a frictionless simulation.

See market microstructure in action

Test your trading strategies with professional backtesting tools and real market data.

Start for free