Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Using data in pipeline

Hi!
This is my first time writing an algorithm here, and I'm caught up in a small problem. In before_trading_start I need to use the preopen prices in the pipeline computations.
If the preopen prices are not available, I'll need to get the current day open prices and use them in the pipeline computations (performed a minute after market opens, let's say). But from what I understand the pipeline is only run before the trading starts. Is there any way around this, or am I missing something?
I'll be happy to give more details about this if needed, thanks!

2 responses

First off, welcome aboard.

Pipeline fetches and performs calculations on daily end of day data. It's optimized for that purpose and can speed up your algorithm. The built in factors and filters are also very convenient. However, if your algorithm relies on minute and/or current market price and volume data, then you will need to use the data.current or data.history methods to retrieve data. See https://www.quantopian.com/help#overview-gettingdata.

It sounds like you would run a scheduled function at market open, fetch any data you need using either the 'data.current' or 'data.history' methods, and then perform any required calculations. If you require current days data then pipeline isn't the route to go. Use one of these other two methods.

You allude to 'pre-open' prices. In both cases, the only data that Quantopian currently has is for market hours. After hour prices are not available.

Thanks, its quite engrossing here!
I was aware of the data methods, but was just wondering if there was any way I could get the ease of the pipeline computations here. That's okay then, no problem. I'll go with the data.current and data.history methods.
Thanks a lot Dan!