Part IV, Edge and Risk Chapter 18

Execution: Slippage, Spread, Queue, Fill Quality

A backtest at the mid is a fantasy. The strategy lives or dies on the fills it actually gets.

18.0Why this chapter exists

Backtest results assume idealized execution: instant fills at the mid-price (or at the bid/offer), with no slippage, no partial fills, no queue position concerns. Live trading does none of these. The gap between backtest and live performance is dominated, for high-frequency strategies, by execution costs. For lower-frequency strategies, execution is a smaller line item but still material.

The execution cost components come first: spread, slippage, market impact, fill probability. None are mysterious in isolation; the discipline is in measuring and modelling them honestly inside a backtest, which is where most retail strategies overstate their edge. Slippage models follow, from the constant-tick assumption (acceptable as a starting point) through ATR-conditioned and volume-conditioned versions (closer to reality for systematic work). Order types and their tradeoffs come after that, with the rule that emerges naturally from the analysis: enter passively at structure to capture queue position; exit aggressively when certainty of fill matters more than price. The round-trip cost as a fraction of expected edge gets its own treatment, because that single number determines whether a strategy can survive at all. Then execution during news and crisis, where every assumption breaks. The chapter closes on the failure modes that consistently mug live performance.

This chapter is short by design. The concepts are not complex. The discipline of accounting for them is what separates a backtest from a live equity curve.


18.1The components of execution cost

A round-trip trade incurs:

Spread (bid-ask spread)

The quoted spread between the inside bid and inside offer. On liquid futures during RTH: - ES: typically 1 tick (0.25 points = $12.50). - NQ: typically 1 tick (0.25 points = $5.00). - GC: typically 1 tick ($0.10 = $10). - CL: typically 1 to 2 ticks ($0.01 to $0.02 = $10 to $20).

A market order pays the spread on entry (lifts the offer or hits the bid) and pays it again on exit. Round-trip spread cost: 2 ticks on ES = $25 per contract.

Slippage

The difference between the price at the moment the order was placed and the actual fill price. Slippage occurs when: - The market moves between order placement and fill (latency-driven). - Order size exceeds inside-bid or inside-offer size (walks the book). - Stop orders trigger and fill at the next available price (gap risk).

Typical slippage on liquid futures during RTH: - 0 to 1 ticks for small market orders during balanced regimes. - 1 to 3 ticks for stop orders during normal sessions. - 5 to 20+ ticks for stop orders during news events or crisis volatility.

Market impact

For large orders (>5 contracts on ES, >20 on lower-liquidity contracts), the order itself moves the market. The first contract fills at the offer; the second slightly higher; the tenth materially higher. For institutional sizes, market impact dominates spread.

For retail sizes (1 to 5 contracts on liquid index futures), market impact is typically zero or 1 tick. Below this scale, treat it as included in slippage.

Commission

Broker-dependent. Institutional commission on ES is typically $0.50 to $1.50 per contract one-way. Retail is $1.00 to $4.00 per contract one-way. Round-trip for retail: $2 to $8.

Fill probability

For limit orders, the order fills only at the favorable price (or better). If the market moves through the limit price without trading at the limit, the order is bypassed. The probability of a limit fill depends on: - How close the limit is to the market. - The market's direction relative to the limit. - Queue position at the limit price.

A limit order placed 1 tick away from the market in the favorable direction fills with high probability. A limit order placed 5 ticks away fills only if the market reaches it, which may or may not happen.


18.2The round-trip cost calculation

To assess whether a strategy has a real edge, compute round-trip cost as a fraction of expected gross edge.

Worked example

A strategy with: - 1.5R reward / 1R risk on average. - 55% win rate. - Average winner: 24 ticks gross on ES. - Average loser: 16 ticks. - Expected gross gain per trade: 0.55 × 24 + 0.45 × (−16) = 13.2 − 7.2 = 6.0 ticks.

Round-trip costs: - Spread: 1 tick (cross spread once on entry, once on exit). - Slippage: 0.5 to 1 tick on average per round trip. - Commission: $4 round-trip = approximately 0.3 ticks (4 / 12.50).

Total round-trip cost: 1.8 to 2.3 ticks per trade.

Net expected gain: 6.0 − 2.0 = 4.0 ticks per trade. The strategy retains 67% of gross edge after costs.

When costs eat the edge

Now suppose the strategy has 8 ticks gross expected gain and 2 ticks cost. Net is 6 ticks, retention 75%. Acceptable.

Now suppose 4 ticks gross and 2 ticks cost. Net is 2 ticks, retention 50%. The edge is half-eaten by execution. This is a marginal strategy whose live performance will likely be lower than backtest because the cost estimates are usually too optimistic.

Now suppose 2 ticks gross and 1.8 ticks cost. Net is 0.2 ticks, retention 10%. The strategy is essentially break-even after costs. Live performance with stochastic costs will swing into negative territory regularly.

The frequency penalty

A strategy that trades 100 times per session pays 100x the round-trip cost as one that trades once. High-frequency strategies need much higher per-trade gross edge to overcome the cumulative cost. As a rule of thumb:

  • 1 trade/session strategies: 6+ ticks gross edge needed.
  • 5 trades/session: 4+ ticks gross edge.
  • 20 trades/session: 2+ ticks gross edge (very tight tolerance).
  • 100+ trades/session: typically institutional only; needs sub-tick effective edge with large position size.

18.3Slippage models for backtests

A realistic backtest accounts for slippage. The choices:

Model 1: Constant tick

Apply a fixed slippage of N ticks per round-trip, regardless of market conditions.

  • Pros: simple, robust.
  • Cons: under-estimates cost in volatile periods; over-estimates in calm.
  • Default value: 1.5 to 2 ticks for liquid index futures intraday strategies.

Model 2: ATR-conditioned

Slippage scales with current volatility:

slippage(bar) = base_slippage + α × ATR(bar)

Where α is a calibration constant (typically 0.05 to 0.1). High-ATR bars have higher slippage; low-ATR bars have lower.

  • Pros: more accurate across regimes.
  • Cons: slightly more complex; α must be calibrated.

Model 3: Volume-conditioned

Slippage scales with order size relative to typical bar volume:

slippage = max(1, β × (order_size / typical_bar_volume))
  • Pros: captures market impact for larger orders.
  • Cons: requires volume estimate per bar.
  • Best for: institutional-size backtests; less critical for retail sizes.

Practical recommendation

For retail-size backtests on liquid futures: - Use Model 1 (constant tick) with 1.5 to 2 ticks. - Optionally upgrade to Model 2 for strategies that span multiple regimes. - Model 3 only for >5 contracts.

The cost models in vectorbt, backtrader, and similar Python backtesting frameworks should be configured to one of these. Default values in those frameworks are often too optimistic.


18.4Order types and their tradeoffs

Market orders

Buy or sell at the next available price. Guaranteed fill (unless market is locked or halted), unknown price.

  • Pros: certainty of fill; simple to manage.
  • Cons: pays full spread; subject to slippage; vulnerable to bad fills during news.
  • Use when: certainty of fill matters more than perfect price (e.g., stops, exits in trending moves).

Limit orders

Buy at a specified price or better; sell at a specified price or better. Known price, uncertain fill.

  • Pros: avoids paying spread; can capture queue position at structure.
  • Cons: may not fill if market moves away; partial fills.
  • Use when: entry can wait for the right price (e.g., entries at structural levels).

Stop orders

Triggers a market order when stop price is touched. Used for protective stops, breakout entries.

  • Pros: triggers automatically; simple.
  • Cons: market order on trigger means slippage; gap risk in fast moves.
  • Use when: you need automatic execution at a level (most stops).

Stop-limit orders

Triggers a limit order when stop price is touched. Replaces the unconditional market order with a price-conditional one.

  • Pros: avoids worst-case slippage on stops.
  • Cons: may not fill if market gaps through the stop; partial protection.
  • Use when: gap-risk is a concern; specifically on overnight holds. Generally not for protective intraday stops because non-fill is worse than slippage.

Order type selection in the framework

For the frameworks in the Frameworks doc:

  • Entries: typically limit orders at structural levels (capture queue position, avoid spread).
  • Stops: stop orders (must fire automatically; slippage is acceptable).
  • Targets: limit orders at target prices.
  • Discretionary closes (regime change, news): market orders for certainty of fill.

The mix is purposeful: enter passively to capture edge, exit aggressively to capture certainty.


18.5Queue position and the passive-limit edge

A passive limit order at a structural level is queued among other resting orders at the same price. The order's queue position affects fill probability and quality.

Queue mechanics

When a market order arrives at a price level, it fills against resting orders in time priority (oldest first, on most futures exchanges). An order placed first in queue at a level fills before an order placed second.

Why queue position matters

  • A passive limit at structural support, placed before the price arrives, captures queue priority. When price tests the level, your order fills among the first.
  • A passive limit placed at the same level after price has already arrived has a worse queue position; it fills later, and may not fill at all if the level holds with insufficient flow.
  • Building queue position over multiple bars at a level (placing the order early when price is far away) is a real, perishable edge.

When this matters

Queue position is a meaningful edge primarily for: - Market-makers who quote both sides of the book continuously. - Professional traders running passive-limit strategies at structural levels. - HFT firms with software that manages queue dynamically.

For retail traders trading 1 to 5 contracts at clear structural levels, queue position is a moderate edge: placing the limit early at the level is better than placing it as price arrives, but the magnitude of the advantage is in the range of fractional ticks rather than full ticks.


18.6Execution during news and crisis

Normal execution rules suspend during tier-one news and crisis volatility.

News execution

During the first 1 to 5 minutes of a tier-one event: - Spreads widen 5x to 20x normal. - Stop orders fill at materially worse prices than the stop. - Market orders may fill multiple ticks beyond the visible inside. - Limit orders rarely fill at the limit (price moves through too quickly).

The framework: do not trade through tier-one news. The Frameworks doc Framework 5 (News Blackout Protocol) is the operational discipline.

Crisis execution

During crisis volatility: - Liquidity inverts; passive orders may not fill at any price. - Market orders fill at worst-case prices. - Stops cascade; entire price ranges may not have continuous trading. - Some products may halt or experience price-band-driven trading suspensions.

The framework: cut size 50 to 80%; use market orders for certainty when needed; expect slippage to be 5 to 10x normal.

Pre-news preparation

In the 30 minutes before scheduled tier-one news: - Reduce open positions by 50% or more. - Tighten stops on remaining positions. - Avoid entering new positions. - Monitor for early information leakage in correlated markets.


18.7Slippage in backtest vs live

The most common source of disappointment when going live: live slippage exceeds backtest assumptions.

Common backtest under-estimations

  • Stop slippage during news: backtest assumed clean fills at stop prices; live experiences 5 to 20 ticks of slippage on news-bar stops.
  • Stop slippage at session boundaries: stops placed near close or at session transitions can fill at materially worse prices.
  • Stop slippage in low-liquidity periods: 03:00 ET or similar windows have wider effective spreads.
  • Limit fill probability: backtest assumed limits filled at price; live experiences partial fills or no fills.
  • Order timing: backtest used bar close; live order placement has latency.

How to detect under-estimation

After deploying live, compare actual round-trip cost to the backtest assumption. If live is 50%+ higher, the backtest model needs revision and the strategy's net edge is overstated.

How to recalibrate

Run the strategy with the more aggressive cost assumption. Re-validate with walk-forward. If the strategy still has edge under the new assumption, deploy with the corrected sizing. If not, the strategy was marginal and the live execution exposed it.


18.8Best execution discipline

A short list of execution disciplines that improve fill quality:

  1. Use limit orders for entries when possible. Place at the structural level; let the market come to you.
  2. Use stops for protective exits. Slippage is the cost of the discipline.
  3. Avoid market orders during news. Wait or use stop-limits with awareness of fill uncertainty.
  4. Place stops behind structure, not at round numbers. Round-number stops are sweep targets.
  5. Manage child orders for larger sizes. A 10-contract market order on lower-volume products will move the market against you. Use TWAP or VWAP slicing if the platform supports.
  6. Time entries to coincide with high-liquidity windows. Open auctions and afternoon RTH have the best fills.
  7. Avoid the last 5 to 15 minutes of RTH for limit entries. MOC flow distorts.

18.9Failure modes specific to execution

  1. Backtest at mid-price. Fantasy. Always pay spread plus slippage.

  2. Optimistic slippage assumption. 0.5 ticks is unrealistic on most strategies. 1.5 to 2 ticks is the institutional default for liquid futures intraday.

  3. Ignoring partial fills on limits. Some platforms simulate limit fills as instant; live has partial fills that change the position size.

  4. Stops at round numbers. The stop-cluster harvest target. Move the stop beyond the round number.

  5. Market orders during news without considering slippage. Stop orders during NFP can fill 20 ticks beyond the stop price. The protocol is to not have those stops in place during news.

  6. Underestimating commission and fees. Commission, exchange fees, regulatory fees add up. For a 50-trade-per-day strategy, fees can be 10 to 20% of gross edge.

  7. Queue position blindness. Placing a limit at a level just as the price arrives has worse fill probability than placing it 20 minutes earlier.

  8. Crisis-period execution at normal sizing. Slippage in crisis is 5 to 10x. Sizing must reduce by similar magnitude.


18.10The integrated stack treatment

Execution is Layer 9 of the institutional stack, alongside risk management and statistical validation. It is the discipline that ensures the validated strategy translates into live results.

A daily flow:

  1. Pre-market: confirm execution model (slippage assumption) is current.
  2. Open: enter passive limits at structural levels for the day's plan.
  3. During session: use market orders sparingly; respect news blackout.
  4. Pre-close: avoid limits in the last 15 minutes; use market orders for forced closes.
  5. Post-session: review actual slippage; update model if drift detected.

18.11Diagram concepts referenced in this chapter

  • D18.1: Execution cost decomposition. A waterfall chart showing gross edge, then deducting spread, slippage, market impact, commission, leaving net edge.
  • D18.2: Slippage by frequency. A line chart of cumulative cost vs trade frequency, showing how high-frequency strategies pay much more in cumulative cost.
  • D18.3: Slippage models comparison. Three line charts of slippage over time: constant, ATR-conditioned, volume-conditioned. Showing the response to volatility shifts.
  • D18.4: Order type tradeoffs. A 2x2 matrix of (price certainty, fill certainty) with the four major order types placed.
  • D18.5: Queue position dynamics. A schematic of a price level with multiple resting orders, showing how time priority determines fill order.
  • D18.6: News-event execution comparison. Two panels: a normal session's execution quality vs an FOMC session's execution quality.


18.13Exercises

Exercise 18.1: Round-trip cost audit. For your most-traded strategy, compute the actual round-trip cost from your trade journal (avg fill price - decision price). Compare to your backtest assumption. The gap is your slippage model's error.

Exercise 18.2: Frequency-cost relationship. Compute total cost (spread + slippage + commission) per session for three hypothetical strategies: 1 trade/session, 5 trades/session, 20 trades/session. At what frequency does cost overwhelm gross edge?

Exercise 18.3: Limit fill probability. Place 30 passive limit orders at structural levels over a week. Track which filled, which were bypassed, which had partial fills. Compute the fill probability.

Exercise 18.4: News slippage measurement. During a recent FOMC, log the actual slippage on any trades or stops. Compare to normal-day slippage. The ratio is the cost of trading through news.

Exercise 18.5: Stop placement audit. Review your last 50 stops. How many were at round numbers? How many were at structural levels with appropriate buffer? Track which kind of stop got swept vs held.


End of Part IV. Part V: Case Studies and Failure Modes opens with Chapter 19, treating regime shifts, news, and liquidity crises as the structural failure modes every framework must respect.