Skip to content
All library documents

Modeling Slippage from Execution Methods and Price Action

Article Quant Q&A · Author: Zach

Summary

The discussion explains why a flat per-trade cost or assuming fills at the daily high or low can misrepresent trading friction. It separates execution slippage—the cost of getting filled relative to the midpoint—from tracking slippage, the difference between a fill and the closing price used in a backtest. It compares aggressive orders near the close, orders based on a projected closing price, and frequent quote adjustments, noting that their costs and operational demands differ.

The answers emphasize that OHLC data alone cannot reveal the intraday price path, order book, or queue position needed to estimate fills reliably. They describe how upward, downward, and sideways price action can change the likelihood and cost of buying near the close. Market-on-close orders may match the official close on certain US exchanges, but free data may report a consolidated close instead. A separate answer suggests very low slippage for small trading volume, though the discussion offers no data to validate that estimate. More accurate modeling requires higher-frequency data and assumptions about the execution process.

Key ideas

  • Execution slippage and tracking slippage are distinct sources of backtest error.
  • Order aggressiveness and the time available to execute affect fill cost and reliability.
  • Price momentum near the close can change how difficult it is to fill a buy or sell order.
  • Daily OHLC data cannot establish the intraday path, queue position, or exact fill price.
  • Market-on-close fills and the close reported in free data may differ by price source.

Tags

Full text
# How to simulate slippage


# How to simulate slippage












I'm backtesting a trading strategy, using free OHLC data from yahoo or google. I'm simulating friction by lopping a flat percentage (say 0.5%) off my returns for each day that I make a trade. Whats a good way to simulate slippage? I tried 'torturing' my returns, by pretending that I always buy at the day's high and sell at the day's low, but that was depressing. Is there a good compromise between naively assuming my trades execute at the day's close and 'torturing' my trades?

## Answer by Jonathan Shore (score 11, accepted)

https://quant.stackexchange.com/a/1265

Slippage is multi-facetted, however, I think the main element to slippage is going to depend on the sophistication of your execution approach. Also, in your case there are 2 types of slippage:

- execution slippage (i.e. cost above mid to get your fill)

- tracking slippage (how much price difference between actual close and your fill price)

Execution Approaches Here are a few ways one might try to execute near the close price (I'll assume the use of limit orders). Each of these has a different impact in terms of execution slippage:

- put in a very aggressive order in the final minute(s) that is priced to cross deep into the ask book (if buying) or bid book (if selling). By deep mean buy at ask + some price enrichment such that if the inside book is taken out before your order is received you still obtain a fill.

- project some closing price estimate before EOD and put in a standing order for that price some period before close

- try to cross aggressively on the inside price, adjusting order at high-frequency

The first approach may have the most execution slippage, but does not require HF order placement and replacement. The second is optimal in terms of execution costs, but projected target may deviate from actual close. The 3rd is tighter than the first (often) in terms of execution costs, but requires HF data/execution to do well.

Price Action I don't believe an analytic approach on OHLC will ever work as cannot determine without seeing the microstructure or intraday price action. For instance consider trying to buy near the close in each of these scenarios:

- upward momentum

- downward momentum

- sideways / flat

If one attempts to buy in upward momentum you will be chasing price and will likely need to enrich your order significantly to get a fill (hence more slippage). (this is the most frequent scenario, since if you are buying there is probably reason for others to be as well).

If one is buying in downward momentum then the fill is incredibly easy to do, as the market is biased towards sellers. Hence a passive order (such as buying at the bid) or even bid - some spread is likely to be filled.

If price action is sideways passive (at the bid) or aggressive orders (crossing to ask) should both be effective and hence have low execution slippage.

Conclusion Slippage is a function of execution approach and local price action behavior (vol, buyer/seller bias, etc). So, in my view you should obtain higher-frequency data and simulate your signal and execution algo to get an accurate picture. This will not be wasted in that the same logic can (and should) be used to automate your execution.

If you are looking to do large size, then your execution algo will be something more complex where you make multiple buying (selling) entries into the market.

## Answer by mccarren (score 6)

https://quant.stackexchange.com/a/1276

You can use MOC (Market on Close) orders to realize the closing price on NYSE or NASDAQ. The price you get will be the official close. You should check to see whether the free data you are getting contains the consolidated (last price across all venues) or primary (last price on the primary listing exchange for the stock) for its closing prices. If it contains consolidated prices then you could find that you realize different prices than your backtest. It should still be relatively close however.

## Answer by Mark Horvath (score 1)

https://quant.stackexchange.com/a/18930

Given that you're tradeing low volumes ($<1\%$ of volume, I take), I would not assume more than 1 bps slippage in your case.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.