Hi All,
Is it possible to access the bid/ask pricing data from IB in order to calculate spread in the second resolution? We use spread data to determine our intraday buying conditions, and so far we have been unsuccessful in obtaining it.
Best,
Christopher
Varad Kabade
Hi Christopher Phillips,
Would you please attach a code snippet/backtest highlighting the above problem?
Best,
Varad Kabade
Christopher Phillips
Hi Varad kabade ,
So this is how we are calculating the spread right now for backtesting:
But all it does is output a constant value that doesn't change. This made me wonder whether this data is even accessible during a back test, Â or perhaps this needs to be integrated into the symbolData class for it to even work?
Many thanks!
Â
Â
Varad Kabade
Hi Christopher,
We could not recreate the issue using the spread logic mentioned above. Would you please attach a backtest highlighting the error? If you comment out this snippet, you can see we get different spread values every second. Refer to the attached backtest.
Â
Best,
Varad Kabade
Christopher Phillips
Hi Varad kabade , apologies, I've been out of town for a few days.
Here is the attached backtest. When you run it you can see that the spread is always the same value, and does not change.
Â
Varad Kabade
Hi Christopher Phillips,
Sorry for the inconvenience caused. To resolve this, we have created a data issue subscribe to this thread for updates.
Best,
Varad Kabade
Christopher Phillips
Varad kabade Thanks so much for the update. Really appreciate you looking into this!
Best,
Christopher
Christopher Phillips
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!