Back

IB data stream question

It seems that many QC members have extensive experience with IB platform and trading IB account.
Does anybody know if IB always sends minute data or only if there was a trade executed during that minute?

Is OnData() guaranteed to trigger every minute even no minute trade bar came from the exchange?

Thanks
Nik
Update Backtest






The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.



Our data defaults to "Fill Forward" -- this guarantees data regardless of whether there was a trade. Inside the BaseData class there is a property "IsFillForward" which indicates the data has been copied forward in time.

You can disable this behavior with the option in the AddSecurity method --
AddSecurity(securityType: SecurityType.Equity, symbol: "SPY", resolution: Resolution.Minute, fillDataForward: true, extendedMarketHours: false);

I'm not sure how IB data behaves - maybe someone else has feedback on this part.
0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


@NikMilev There is a slight distinction you are missing. Tick streams usually send an update both when there is an update in quote (top-of-book) and when there is a new executed trade. Both of these updates will only happen if there is actually new information. That means that aggregate data (like trade bars) is usually calculated by the client's local application. Because trade bars are time-dependent, they will draw irrespective of whether there has been a trade in that period. For reference, here is a bar picture for a thinly traded stock:



Also important: to my knowledge IB's data feed is not true tick data. They consolidate the data every 100 or 200 milliseconds or so and then send it out. This is only an issue if you are using tick charts (not for higher timeframes like 1+ min).
2

Jared, JP B

Thank you guys for the detailed explanation!
Nik
0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed