Automated System With Limit Orders

Discussion in 'Automated Trading' started by mindfull, Oct 15, 2005.

  1. francis1

    francis1 ET Sponsor



    Why? Couldn't you search by price?

    Francis
     
    #21     Oct 23, 2005
  2. Its clearly impossible - the granularity of data required (each individual order tracked separately) is not provided.

    Example: ES is trading 1200x1200.25 with size 1000x1000
    You place your order for 10 @ 1200, size is now 1010x1000
    Without any trades taking place you witness the bid size going from 1010 to 810 to 1010. Now what do you know about your position in the 1200 price queue?

    The only thing you know is that at worst, you are positioned at the 800 mark (since thats the low water mark after your trade was placed). Its quite possible that your position is much better, perhaps many standing orders in front of you were cancelled and replaced by orders behind you, but there is no way for you to know.
     
    #22     Oct 23, 2005
  3. Just a thought, but why not just add a tick slippage on each end. If your system doesn't have a positive expectancy at that point it is unlikely that you will have much success with live trading. I can't believe there is much of an edge in trying to muscle the queue -- and having said that there are plenty of systems out there that try to do just that by placing orders at different price levels in advance and pulling them if the trend appears to be against the entry.
     
    #23     Oct 23, 2005
  4. Well, you can capture real time feed and then use the data to simulate strategies. TAQ is the most comprehensive DB for equities (Level 1) but yes, it's expensive.

    BTW you still can use intraday bars to prototype a strategy with limit/stop orders. The approach we use below provides a pretty reasonable approximation to stop/limit fills in liquid markets (for small orders, no precise timing, etc. etc.)

    ---
    A limit/stop order is checked against bar open price first and if limit/stop condition is fullfilled, the order is filled with bar open price; if not, the order price is checked against bar high/low and filled with order price; otherwise checked against bar close and filled with bar close price.
    ---

    Indeed you can use market depth data base and build fill probability distribution to simulate fills with high accuracy. We know several users that have written their own simulation execution providers for quantdeveloper.
     
    #24     Oct 25, 2005
  5. I don't think just adding slippage will correctly simulate a limit-based system. For example, assume the system places a buy limit order at ES 1200 and the bid gets to 1200, some trades occur @ 1200 but it does not trade down to 1199.75. Now how does the backtesting system handle this?

    You can't just assume that you were filled at 1200.25 since that is nonsensical. If the system uses limit orders then some orders will be filled and others wont (and as someone else pointed out earlier, losing trades will always be filled, e.g. if the price slides to your stop then you definitely got filled). Assuming every order is filled and adding .25 of slippage will give different (faulty) results (because you may not have gotten filled at all).
     
    #25     Oct 25, 2005
  6. It works the other way.

    If you have a limit order at 1200 and a slippage setting of 1 tick then the price needs to get to 1199.75 on the signal bar before the backtest will give you a fill -- at 1200. It's not perfect as there are times when you get bad quotes or trades outside the bid ask that still couldn't be filled but it will increase the accuracy of the system remarkably when compared to real trading...
     
    #26     Oct 25, 2005
  7. Ahhh, understood. I was thinking of slippage in terms of market orders - what you said makes sense. Thanks.
     
    #27     Oct 25, 2005