Menu

interleaving and resolution

Help
dubium
2008-02-27
2013-04-22
  • dubium

    dubium - 2008-02-27

    1. Historical ticks only come back with 1-second accuracy. I understand this is an opentick constraint and not an otfeed one.
    2. I understand that within each second, despite being labeled with the same second, the ticks come back in the order they were actually received by opentick.
    3. HistTicksCommand can only request one stock at a time.

    So is it possible to get the intra-second ordering among ticks from a group of stocks? (Basically, is it possible to request a HistTicksCommand for a group of stocks at once?)

    Thank you.

     
    • Mike Kroutikov

      Mike Kroutikov - 2008-02-28

      Hi

      1. Correct.
      2. Correct to the best of my knowledge. I did not see any OT docs that describe this, however.
      3. Correct. If you need multiple symbols, submit multiple requests.

      I understand that you want streams from many symbols **aligned**. First of all, since OT does not provide better-than-one-second time stamp, relative order within a given second can not be restored. Whatever you do, make sure that you are **not** relying on the intra-second order in your analysis.

      To align streams, use sorting. You can do this on-the-fly. But more practical (imo) way is to download the data first, then work with the locally stored data: if you have to re-run your backtest no need to connect to OT and wait for the data...

      Check out MergeSort.java at activequant.org - it does exactly the thing you need: sorts streams of Comparable entities. The source should not have any dependencies, so you can just steal it and use in your project...

      -Mike

       
    • Mike Kroutikov

      Mike Kroutikov - 2008-02-28
       

Log in to post a comment.

MongoDB Logo MongoDB