Simulating Market Orders on OHLC data

Discussion in 'Automated Trading' started by Craig66, Feb 11, 2013.

  1. Craig66

    Craig66

    When simulating limit orders on OHLC data, one can make a fairly simple set of assumptions regarding simulating execution (i.e. fill if we go through (or touch) the limit price with some assumptions about volume). But what assumptions can one make when simulating market orders? The only things I can think of are quite crude (i.e. a buy gets the high price), does anybody have any better suggestions?
     
  2. None, Zero.

    The best you can do is a short small OHLC bar (tick 1 being optimal) and even then the assumptions suck.

    This is why nearly everyone serious I know has tons of logic there, runs Tick 1 or lower resolution. Best is a custom framework that does full order book event feed during playbacks. Yes, seirously. Doing that here, taking 3 minutes for a 2 year backtest. 1500 combo optimization in about 4-5 hours - and that is with the current terribly slow grid of 38 cores only.

    OHLC is very condensed. As market conditions vary widely - no chance to get to anything sensible.

    The best you CAN do is assume "price + significant slippage". Make it significant enough to be statistically realistic. Use 1 tick OHLC to be more sensible.
     
  3. I code to trade the close of the bar because when I used to system trade I would punch at 58 or 59 seconds into the minute of the signal to get a good estimate of slippage.
     
  4. Best solution I've found (outside of going through the full tick/quote stream) is to use IB historical data with Trade OHLC, Bid OHLC, Ask OHLC. Almost no one else produces that data and it's very manageable from a storage/processing perspective. When using it, I assume the OHLC are synchronized across all three. Obviously it's not exact but I've tested it against many live fills and it's a very good proxy. The reality is that even a full tick/quote stream won't be perfectly representative of live fills considering all the hidden liquidity out there.