Appearance

Personalize your experience

Mode
Accent Color
Direction

Market Foundations & Exchange Microstructure

0%
Lesson 3/12/Market Foundations/Market Structure/Liquidity & Spread13 min

Bid-Ask Spread, Impact Cost & Implementation Shortfall

Market Foundations

Quantifying the execution tax of bid-ask spreads, depth impact cost, and latency slippage in active trading.

Key Topics & Tags
impact costbid-ask spreadslippageimplementation shortfallliquidity

Core Architecture & Intuition

Every backtest looks profitable when fills are assumed at the exact close of a candle. In live execution, you buy at the Ask, sell at the Bid, and push the price against yourself whenever your order size exceeds the top rung.

Impact Cost measures the percentage degradation of your actual fill VWAP from the ideal mid-price `(BestBid + BestAsk) / 2` for a standardized order size.

Hover over key terms below for instant definitions: Ideal Mid-Price, Impact Cost (%), and Implementation Shortfall. For the complete mathematical derivation and edge-case analysis, open .

SPREAD: 0.50 ptsCUM QTYBID (BUYERS)ASK (SELLERS)CUM QTY22,450.001,45022,449.503,20022,449.005,85022,448.508,90022,448.0014,20022,450.501,12022,451.002,98022,451.506,40022,452.009,75022,452.5015,600Price-Time Priority (FIFO): Passive Limit Orders Rest on Book · Aggressive Market Orders Cross the Spread
Quoted top-of-book spread vs. volume-weighted impact cost across larger order sizes.
ℹ
Note:Double your slippage assumption in every backtest before deploying live capital. If the strategy turns unprofitable at 2x slippage, its average profit per trade is too small.

Interactive Concept Breakdown

  • Ideal Mid-Price — The frictionless fair-value benchmark at the instant an order is triggered.
  • Impact Cost (%) — Measures true order book resilience far better than daily volume alone.
  • Implementation Shortfall — Combines spread cost, depth impact, and latency drift into one audit number.

Step-by-Step Execution Protocol: Liquidity & Spread

  1. 1
    Capture Arrival Mid-Price
    Record Best Bid and Best Ask at the exact millisecond your signal triggers.
  2. 2
    Compute Fill VWAP Across Partial Fills
    Weight each child fill by quantity to compute the true execution price.
  3. 3
    Benchmark Shortfall in Basis Points
    Flag any instrument whose average shortfall exceeds 15% of average trade profit.

Parameters, Rules & Reference Matrix

Parameter / RuleTypeDefaultDescription
idealMidprice—(Bid0 + Ask0) / 2.
impactCostBpsbps—((FillVWAP - IdealMid) / IdealMid) * 10000.
maxOrderToTopDepthratio<= 0.25Keep single child orders below 25% of top-rung quantity.

Implementation & Quantitative Model

impact-cost.ts
export function buyImpactCostBps(bid0: number, ask0: number, fillVwap: number): number {  const mid = (bid0 + ask0) / 2;  return ((fillVwap - mid) / mid) * 10_000;}

Desk Verification Checklist

Confirm before deploying live capital

  • Log arrival mid-price on every live order to track real slippage.
  • Reject option strikes where (Ask - Bid) / Bid > 1.5%.
  • Slice orders exceeding 25% of L1 depth into smaller child limits.

Cross-reference standard risk definitions such as drawdown, slippage, and when auditing your logs.

Full Trade School curriculum →