new and thinking of backtesting with passive limit orders ?..

Discussion in 'Strategy Development' started by bidask201, Feb 9, 2013.

  1. A couple of road blocks you might not realize till you have thought about it for a while:

    You have to risk (or more likely spend) some money to estimate key parameters:

    1) Globex, which is overall an easier limit order book to simulate fills in than the distributed us stock one, does not offer queue position. What this means is even if you knew your latency exactly you are left without a key piece of information when for example there is a quick move and everybody gets out - you wont know how many people are ahead of you / did you get out in time or did all the cancels occur below you in the book and you got stuck with the trade

    2) From reading other posts I believe with lower volume stocks at least with over penny spreads, a hidden limit may very well be the best quote and there is presumably no data on most of that even long after the fact (though it appears you could collect best bid offer levels to some extent per exchange with special order types live)

    FYI there is no retail platform I have found that allows you to use queue position in backtesting. Given that you probably should tune how it works due to (1), its one more reason to write your own. It seems much easier and recommended to do automated trading that takes liquidity rather than provides it at the retail level at this point.

    I know that I am really late to the independent automated trading game, and it seems to be more and more about scale, PFOF and internalization at this point but maybe still I have to try this with a modest amount for me at risk.
  2. Simulating queue position is most important if you're scalping ticks and placing orders at the top of the order book (and then you're competing against HFT, whose participants have been investing in that 'arms race' for some time ... i.e. years). It requires big bucks to play that game (for infrastructure and software, + trading capital ... so that you can trade enough volume to get the best rebates) ...

    As you go for trades of longer duration (where the retail trader is perhaps at less of a disadvantage...), IMO accurate modelling of queue position may be less and less important. You can make conservative backtesting assumptions like "assume the limit order doesn't fill unless price goes one tick beyond my limit price", ... or callibrate your backtested fill assumptions against what you experience in your market over time ...
  3. OpenQuant implements the full FIX protocol on every back tested transaction. I'm not sure if FIX deals with the queue but I'd start with them if I had that question. They might be able to code up something for you.
  4. i think trying to spend enormous amounts of time to calculate pennies is not a worthwhile task.