Back to Community
Intraday data

newbie so apologies for the basic q.

How do I get intraday data from zipline?

I tried the following

start = datetime(2015, 1, 4, 9, 0, 0, 0, pytz.utc)
end = datetime(2015, 1, 4, 16, 0, 0, 0, pytz.utc)
data = zp.utils.factory.load_from_yahoo(stocks=['AAPL'], indexes={}, start=start,
end=end, adjusted=False)

But it came back with an error.

7 responses

Hi Krisan,

The general information about Zipline is available here and there is also a Google Group for support and discussions.

To answer your question, I actually don't think the load_from_yahoo method gets you intraday data, only daily. But I may be wrong on this!



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 Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian 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.

Can someone explain to me what you mean by "intraday" data considering that you can get minute level data natively. Does zipline break it down to seconds, ticks, market depth, etc?

Hi JS,

In the Quantopian Backtester, "intraday" data basically means you get minutely pricing data for all the minute in a trading day.

I'm not too sure on the Zipline side, I believe that has more to do with the source of data (whether that's on a minutely or daily basis). If you want more Zipline help, I'd suggest checking out ( and (!forum/zipline)


Eric, do you mind pointing me to where it explains how to access this minute level data? Because anything I try seems to be day level data...

There is a function call handle_data(data, context) that runs every minute

Hi Dustin,
That's for live trading, right? What about when your on your notebook doing research? I'm new in the platform.

That is live trading. To get it in notebook:

get_pricing(#add all parameters  
        pricing="minute" #or minutely, can't remember if it ends in ly or not)