Hello!
I'm new to the community. I was attempting to retrieve historical pricing data for SPY in a minute reseloution for the past 30 days.
Results were rendered. It say's there should be over 7000 rows but I only see a handful of rows. Can anyone help? Thanks!
qb = QuantBook()
spy = qb.AddEquity("GOOG") # add equity data
# Returns the past 10 days of historical daily data
history = qb.History(spy.Symbol, timedelta(days=20), Resolution.daily)
Adam W
In Jupyter Notebooks, pandas dataframes are truncated (only the first few and last few values) shown to avoid flooding the output cell. You can slice the dataframe as needed (e.g. `history.unstack(level=0).iloc[:50,:]` for first 50 values).
Alternatively if you really want to show all 7000 rows for some reason, you can set the pandas option with
Elna Eldnas
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!