I'm an automated trader that relies heavily on Interactive Broker's 5 second real time bars, but they have recently become VERY unreliable. So, I've purchased a subscription to DTN's IQFeed and I'm trying to replicate the real time 5 second bar behavior.
Replicating the historical 5 second OHLC bar behavior (with VWAP) was easy, but I'm really scratching my head with how to generate 5 second OHLC bars in real time.
My server is in a co-location facility that has HUGE internet bandwidth (about 80 mbs), so I don't think I'm going to have a problem receiving the data. But, I'm worried about lagging data and building bars accordingly.
What I'm looking for in this post is to see if anyone is familiar with doing this type of thing....
Here are my thoughts/questions?
Basically, say it's 10:00 AM (on the nose) and I want to generate a 9:59:55 to 10:00:00 bar and I'm receiving tick data on 100 stocks. Some of the data that I may be receiving could be a couple seconds old with timestamps that are still 9:59:56 or 9:59:57. So, at 10:00:00, it's not really appropriate to generate a 9:59:55 to 10:00:00 bar yet as they would be incomplete. I have to wait until all of my 9:59:55 to 10:00:00 data has arrived. But, how do I know when it's all arrived?
My initial thoughts are to ALWAYS have a tick stream for SPY and QQQQ and use their exchange timestamps to figure out when it's possibly appropriate to generate all 5 second bars for that particular 5 second period.
Basically I would just be using the SPY and QQQQ tick streams as my timer. So, perhaps when I start seeing 10:00:01 data on both SPY and QQQQ, then it's possibly safe to go ahead and generate my 9:59:55 to 10:00:00 bars (for all 100 stocks that I'm watching). But I'm guessing that this will even sometimes miss data for my 9:59:55 to 10:00:00 bars, because there still may be some lagging ticks coming in for the 9:59:55 bar after 10:00:01 (I really don't know).
I'm just very confused as to what really makes sense and I'm looking for direction. So, does anyone have ideas or suggestions?
Thanks,
Jason
Replicating the historical 5 second OHLC bar behavior (with VWAP) was easy, but I'm really scratching my head with how to generate 5 second OHLC bars in real time.
My server is in a co-location facility that has HUGE internet bandwidth (about 80 mbs), so I don't think I'm going to have a problem receiving the data. But, I'm worried about lagging data and building bars accordingly.
What I'm looking for in this post is to see if anyone is familiar with doing this type of thing....
Here are my thoughts/questions?
Basically, say it's 10:00 AM (on the nose) and I want to generate a 9:59:55 to 10:00:00 bar and I'm receiving tick data on 100 stocks. Some of the data that I may be receiving could be a couple seconds old with timestamps that are still 9:59:56 or 9:59:57. So, at 10:00:00, it's not really appropriate to generate a 9:59:55 to 10:00:00 bar yet as they would be incomplete. I have to wait until all of my 9:59:55 to 10:00:00 data has arrived. But, how do I know when it's all arrived?
My initial thoughts are to ALWAYS have a tick stream for SPY and QQQQ and use their exchange timestamps to figure out when it's possibly appropriate to generate all 5 second bars for that particular 5 second period.
Basically I would just be using the SPY and QQQQ tick streams as my timer. So, perhaps when I start seeing 10:00:01 data on both SPY and QQQQ, then it's possibly safe to go ahead and generate my 9:59:55 to 10:00:00 bars (for all 100 stocks that I'm watching). But I'm guessing that this will even sometimes miss data for my 9:59:55 to 10:00:00 bars, because there still may be some lagging ticks coming in for the 9:59:55 bar after 10:00:01 (I really don't know).
I'm just very confused as to what really makes sense and I'm looking for direction. So, does anyone have ideas or suggestions?
Thanks,
Jason
