Hello
I have difficulties to fetch ticks from history request in Research notebook.
aapl = qb.AddEquity("AAPL")
start_time = datetime.strptime('2020-03-20 09:46:00', '%Y-%m-%d %H:%M:%S')
end_time = datetime.strptime('2020-03-20 10:06:00', '%Y-%m-%d %H:%M:%S')
data = qb.History(['AAPL'], start_time, end_time, Resolution.Tick
data
Out : _
Is it possible at all? I didn't find anything in the Documentation or search the community
Fred Painchaud
Hi Artem,
I just did tests myself and yes, unfortunately, I do feel Tick data is not supported in the research notebooks.
Then I did some search on the Github and found this: https://github.com/QuantConnect/Lean/issues/4297
Devs are working on it.
If I read and understand correctly, Ticks should work on securities for a period that was not traded a lot. Indexes should be unique. Indexes are timestamps. Timestamps resolution seems to be not low enough. Did not verify but looks like it is second. So you need a security and a period for which there was not more than 1 tick per second (or fall back to second resolution)… my Saturday morning theory… (and I am not saying the “not more than 1 per second” helps you do what you want - only analyzing for the analysis kick)
Fred
Fred Painchaud
Hi again Artem,
Sorry for the double posts. With further review, I realized you do not specify the resolution in your AddEquity call. So it is minute by default. Then, tick will be empty. If you use Tick there, then you will get the multi-index error referenced above. So overall, it's still not possible, but I wanted to make you aware of the resolution parameter in AddEquity.
Fred
Artem Kolmykov
Hi Fred,
Thanks for the note on the Resolution parameter.
Do you have an idea for C# there is the same issue with ticks resolution?
Fred Painchaud
Searched some more.
The issue is in research notebooks only with Tick history data (so Python only and notebooks only).
https://www.quantconnect.com/forum/discussion/3271/can-i-analyze-futures-tick-data-using-jupyter-notebook/p1
The attached backtest shows that tick data from history is available in backtests, for example.
Fred
Artem Kolmykov
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!