How much Slippage to Use when Back testing and Optimizing

Discussion in 'Strategy Building' started by SimpleMeLike, Nov 21, 2021.

  1. Hello everyone,

    I am back testing and optimizing algo strategies in NinjaTrader 8 Strategy Analyzer.

    I am testing strategies in the futures (NQ, ES, CL, GC, RTY etc. ) market.

    How much slippage do you use for market entry and exit orders per trade during your optimization and forward testing?

    Currently I am using 2 ticks to stay on the conservative side and see more realistic results.

    Thank you,
     
  2. i use none. But if the return is trivial, I know it is not profitable in real trading
     
    murray t turtle and SimpleMeLike like this.
  3. Thank you
     
  4. easymon1

    easymon1

  5. Overnight

    Overnight

    In futures like those, which are all highly liquid, the spreads are 2-3 ticks max at any given time on the front month. I think your 2-tick conservatism on market orders is just fine, provided your volume per order is proportional to the ladder's volume in the instrument being traded.
     
    SimpleMeLike likes this.
  6. 2 ticks is conservative for small orders in those very liquid markets.

    You (and others) might find the following useful: https://github.com/robcarver17/reports/blob/master/Costs_report. It's a report regularly showing my slippage estimates based on the last 12 months of trading. All values are in price points, not ticks.

    Some explanation (numbers are column numbers):

    1 bid/ask trades is an average of half the bid/ask spread at the point when a trade was entered
    2 total trades is an average of the entire actual slippage incurred on a given trade. This will normally show price improvement due to my execution algo and can be negative.
    3 bid/ask sampled is an average of half the bid/ask spread for hourly samples taken every day regardless of whether I traded or not
    8 configured is my current configured value for bid/ask spread that I use in backtesting
    7 estimate is my current best estimate of slippage. It is based on a weighted average of 1,3 and 8. The weights are in columns 4,5 and 6; and will depend on how many trades/ how many samples I've done.

    9 % difference between 7 and 8, just an indication for me if I should change my configured estimate

    Note: 1,2 are NA if I haven't traded that instrument. I've added a vast number of instruments to my platform recently, so a lot of these. This is also why there are some wildly incorrect configured values near the top.
    Note: 2 isn't used in the calculation of my estimate; this is conservative
    Note: * indicates I have a live position in that instrument

    Taking ES as an example - let's look at the micro 'SP500_micro' as I haven't traded the mini in the last 12 months:

    Code:
                      bid_ask_trades  total_trades  bid_ask_sampled  weight_trades  weight_samples  weight_config    estimate  Configured  % Difference
    SP500_micro*            0.125000    -0.125000        0.129207      0.348048        0.567063      0.084890    0.127385    0.125000      0.019084
    Half Bid/ask averages 0.25 points which is one tick, but I've achieved -0.25 in live trading. Average sampled is just over 0.129, suggesting there are times when the market has been slightly wider. My configured value is 0.125. My estimate is 0.127, which is 2% higher than my configured value of 0.25.

    The bottom report, for those who care, shows all costs in risk adjusted terms assuming the configuration value is correct.

    GAT
     
    exo, murray t turtle and SimpleMeLike like this.
  7. Many times, I have seen that the slippage of some ticks doesn’t make any sense with the information that we see on the bars. In such cases, if the price goes outside the bar range because of slippage, the order still gets filled within the bar range. So, it’s always better to try back testing at different slippages so that you know the difference.
     
    SimpleMeLike likes this.
  8. Thank you so much GAT.
     
  9. %%
    !00% sure NQ will average more slippage than ES;
    a same with TQQQ.....+ SPXL/UPRO.
    Except for this year LOL, profits average better in TQQQ, generally speaking. NOT a prediction , not bank insured \not insured by any federal agency............................................................................ .........................................................................
     
  10. Thank you Overnight.
     
    #10     Nov 22, 2021