Limit order in backtesting

Discussion in 'Automated Trading' started by kiev, Apr 21, 2021.

  1. kiev

    kiev

    I need to place some limit orders in my strategy, the problem is when doing backtesting, how I know if my limit orders can be fullfilled?

    In the following time, if the history price is lower than my limit price(at least 1 cent), can I think my order can be fullfilled?

    Or you have any other ideas? Maybe you think only part of (for example, 70-80 percent) limit orders can be fillfilled even if the history price lower than limit price? How do you calculate this in your backtesting?
     
  2. lindq

    lindq

    Fills at limit orders will depend a lot on the volume. Low volume = potentially bad fills.

    Also be aware that if you are relying on signals accessing daily lows in backtesting equities, daily lows are sometimes historically inaccurate. So what you've seen in backtesting, may not have been achieved in actual trading.

    Good luck.
     
    LuckyMac and yc47ib like this.
  3. Craig66

    Craig66

    What kind of data are you using?
     
  4. ValeryN

    ValeryN

    Generally speaking, to get filled anywhere close to high/low you would have to be well under 1% of trading bar's volume. Wouldn't hurt to include a bit of slippage in your assumptions. Then try to trade live with smaller size than you could at first, capture your fill stats and increase size gradually. After 50 trades you will have decent idea on what is realistic for your instrument and can refine backtesting assumptions.

    Val
     
  5. LuckyMac

    LuckyMac

    Really nice post and things to consider. I use limit orders and they can be tricky to get used to