How do you emulate slippage in a backtest?

Discussion in 'Automated Trading' started by jcl, Aug 21, 2012.

  1. xbaha

    xbaha

    of course below works only on high liquid stocks or futures.
    i use this, and my sim is near the real ones:

    for limit orders, take out 1 tick as a slippage. (assuming your sim trade for a buy was the lowest tick!)

    for stop / market orders:
    1. if you're strategy enters when market is calm, then your slippage = spread.
    2. if you enter the market when its volatile, slippage = spread * 2

    good luck.
     
    #11     Sep 8, 2012
  2. .001 per share. This comes out to a dime per hundred shares traded. I've found that real fills are never this bad (stocks), but the effect is so negligible on the back test results that I never tweaked it further. Commissions are 10x higher.
     
    #12     Sep 8, 2012
  3. Maybe another way is to randomize a 1-5 second delayed fill, resulting in a possible change in current b/a spread. At least that is what i see over at my terminals at times.
     
    #13     Sep 8, 2012
  4. This is an engineer's idea of professional trading.

    If you are paying "slippage" = paying bid-ask spread...
    Then you are increasing your commission by 200% to 400% and up...
    And are totally screwed in the long run.

    Instead of paying $0.003/share... it's really $0.008 or $0.013 or whatever...
    Thank you kindly for donating to the NYSE Member Yacht Fund.

    You MUST manage the spread well enough...
    That your "slippage" is positive = capturing part of the spread...
    And you are being paid for providing real liquidity.

    Anyone who doesn't instinctively get this...
    And can't be bothered to finesse the spread...
    Is not competing... they are just donating for a while.
     
    #14     Sep 9, 2012