Back

Issue with loading minute data

I am trying to load forex Oanda minute data however the Jupyter notebook keeps crashing because there seem to be a limit to how many bars I can reference in history.

Therefore is it possible to load minute data in history without loading all the data from present until then? So to minimize the data size to be loaded.

 

 

total_bars = 4000000
daily_data = qb.History(qb.Securities.Keys, total_bars, Resolution.Minute)

date1 = datetime.strptime('2018-01-10 13:30:00', '%Y-%m-%d %H:%M:%S')
date2 = datetime.strptime('2018-01-10 14:00:00', '%Y-%m-%d %H:%M:%S')

print(c.loc[(c['time'] > date1) & (c['time'] < date2)])

 

I only want a small chunck of data in 2018 not every minute data from then till present... How do I do it?

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.


Hey Benjamin,

You can use

qb.History(Symbols, StartDate, EndDate, Resolution)

to retrieve a period of historical data.

Learn more in our research documentation.

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.


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