Backtesting of HFT strategy - Limit Orders

Discussion in 'Strategy Development' started by meranaam, Dec 8, 2012.

  1. meranaam


    I am looking for some guidance from HFT traders and those who have knowledge of how the HFT systems and infrastructure work.

    For limit orders in backtesting non-HFT strategies I require that price trade through the limit order before assuming the order to be filled.

    For an HFT strategy where one can assume that the HFT infrastructure with low latency and sophisticated technology and stuff would ensure orders to be filled pretty soon after the price is hit (not necessarily traded through), can I design strategy where limit orders are assumed filled when hit?

    Since HFT strategies are trading for a few ticks/pips, any slippage assumption (as in non-HFT strategies) would kill the strategy instantly!
  2. jb514


    imo sophisticated technology and stuff is essential
  3. hoppla


    Not sure what your question is but provided you have the right data, a good understanding of what your latency is and a decent simulator, your fills can be modelled quite accurately.
  4. promagma


    yes trade-through works ok.

    If you want to get fancier, you can think about these 3 cases:

    You placed a limit order that joined the inside bid/ask
    You placed a limit order that is inside the inside bid/ask
    You placed a limit order that is outside the inside bid/ask

    Good luck.
  5. meranaam


    Sorry if I was not clear about my question.

    In general for backtesting strategies with limit orders one requires that the price moves through the order level before one can assume the order to be filled. For example, suppose the current ES trading level is 1410.50 (this is the close on a bar chart that I am basing the strategy on) and my strategy places an order to buy ES at 1410.50, to assume that my order was filled the traded price should have moved down to at least 1410.25.

    For an HFT strategy, can I assume that the above order to buy at 1410.50 will get filled immediately (since it is currently trading at that level) and do not require the traded price to go down to 1410.25? My assumption is based on the fact that the HFT companies employ low latency and many other sophisticated execution technologies. Do those who know about building such HFT strategies clarify if that would be a safe assumption or do they also require price to trade through the order level (as explained in the previous paragraph) to assume an order fill. Thanks in advance.
  6. hft_boy


    You need to know where your position is in the queue, or some way of estimating thereof. Most feeds, such as Nasdaq Totalview, can give you an idea of how to implement this. PM me if you want further details.
  7. if you have your infrastructure dialed down (ability to handle limit queues, you know all your latencies, etc), then what hft_boy will suggest to you i'm sure will work just fine.

    i'm going to make a wager you don't have your infra down though, in which case, the best way to proceed is to not make any assumptions, or as you suggested, to make worst case assumptions (trade-through). if the strategy fails at worst case, and you know you need x% filled without trade-through, then the best way to test it is to trade it. if it's truly hf, you should be able to get a significant trade set to look at pretty quickly without costing you too much money.

    that's one of the nice things about hft, you can live test pretty cheaply and quickly.
  8. meranaam


    Thanks to all of you for your replies. I think I will work with the requirement of trade-through at this time. I will think about improving the execution later.
  9. What platform are you designing your strategy. ORC has a solution for this.
  10. promagma


    You improve your odds, but this is mostly another HFT myth. For example, if you join the bid or the ask at light speed, it is guaranteed that you are not first in line.

    ** 90% of attempts at HFT lose! They just lose! **
    #10     Dec 10, 2012