开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: reqHistoricalTicks() & batching vs. reqTickByTick() vs. reqHistoricalData(), Backtesting vs. Realtime execution


 

I am not disputing your results, but you are now comparing reqMktData() tick #48 "RtVolume" with the tick-by-tick feed from Databento.? But our discussion here is about reqTickByTick() which is entirely different and independent from reqMktData( RtVolume ). Have you compared IBKR TickByTick data (historical or realtime) with Databento tick feeds?

The few times I had access to high-res tick-by-tick feed samples from trustworthy sources, IBKR reqTickByTick(LAST) showed the same price/size ticks in the same order as the comparable feeds. However, these were spot checks and only for CME/CBOT futures so I cannot guarantee that IBKR tickByTick feeds for all symbols and all exchanges are complete.

The 1-second resolution for time stamps in historical and real-time tickByTickData does not pose an issue for many applications since the order of tick arrival seems to be consistent and correct within the second:

  • If you record live feeds, you can tag each data arrival with a serial number and a high resolution arrival time stamp (as I do) so that you remember not only the temporal order of ticks for each symbol but also the order across all symbols you record. My "session tape" contains all available reqMktData() ticks and 5 second reqRealTimeBars() for many instruments, reqTickByTick(Lastt and BidAsk) for some instruments, and L2 market depth for few instruments. That "tape" had 404 million ticks last week but there are weeks with much more than that. Depending on the task at hand, the arrival tags allow me to replay the entire tape or filtered sub-streams at "real time", much faster, or in "slomo".
  • If you are only interested in TickByTick trades, filtered reqHistoricalTicks can be used as an equivalent replacement for reqTickByTick live data.
  • But you will not be able to combine different reqHistoricalTick downloads into a consistent feed at the sub-second level (say Trades and BidAsk for a single instrument, or Trades from multiple instruments). But you would probably need a nanosecond resolution and precision time stamp to be able to do that accurately. Milliseconds won't do it, but that moves you into an entirely different class of specialized data providers. Keep in mind that IBKR is a brokerage, some exchanges do not event provide that resolution, few data servicers do, and you mush hope that they all have perfectly synchronized clocks.
闯ü谤驳别苍
?
?
?
On Sun, Jan 12, 2025 at 12:08 PM, wordd wrote:

Yea in realtime I'm just getting the ticks from ibkr via reqTickByTick. Databento does provide live data but I have not subscribed to it.
?
Apologies, it is relevant that the data is not consistent between the two providers... and that data bento has more trades. I haven't sorted out why this is aside from reading in a few places that ibkr shouldn't really be trusted to reliably provide tick data.?
?
Here's an example, these are tick_type=48 from ibkr vs trade ticks from dbento.
?
| dt | ticks_ibkr | ticks_ibkr_size | ticks_dbento | ticks_dbento_size |
|------------|------------|----------------|--------------|------------------|
| 2024-12-22 | 12744 | 30344 | 23458 | 30344 |
| 2024-12-23 | 136348 | 486266 | 340921 | 486486 |
| 2024-12-25 | 6701 | 16119 | 11993 | 16119 |
Note that the reported sum of volume (size columns) are the same, but the count of rows differs.?
?
Couple notes:
- for the actual contract traded under continuous futures, ibkr chooses the front running contract with a fuzzy transition period by highest volume during the transition period. I have not found a way to find with certainty which contract they used exactly on which date.. so I've had to make a best guess by trade volume
- while the prices are very close, they are not identical and it appears that ibkr seems to average ticks a little bit (not completely sure here)
- Since I'm using these ticks for order execution simulation I figured that higher resolution would be better regardless of what I get in realtime from ibkr -- this may not be the same for you since you're using the ticks for predictions
?
The tick data for NQ from databento was about $30 for the last 3 months, I suggest checking it out and comparing. Hope that helps.

Join [email protected] to automatically receive all group messages.