The new 0DTE and next-day backtester includes the ability to backtest slippage for any backtested position. This enables us to set a slippage value from the mid-price for opening and closing trades when backtesting strategies.
For example, when running a backtest we can allow up to $0.10 of slippage from the mid-price for all trades when entering the position:
Including slippage in backtests allows us to stress-test our strategy and gives us added control when analyzing results, which creates a more realistic performance history and provides confidence when evaluating a backtest’s stats before running the strategy in a live market environment.
As we can see below, adding slippage to a backtest can have a significant impact on the strategy’s results. This example shows two backtests with the exact same settings; however, Backtest B includes $0.05 slippage when entering trades. What seems like a somewhat minor cost adds up over time!
Of course, we can include the same settings when automatically generating a bot from any backtest, so the exact slippage settings will flow through when the bot opens and closes positions, ensuring that the live bot mimics the bactkest and doesn’t enter or exit trades beyond the max slippage value.