Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Getting current price of stocks in a pipeline universe

Hi,

I am looking for a way to get the current price of all stocks within a pipeline universe during market hours. I've tried using data.history by looping the stock sids but the sid function doesn't allow for that. Please help!

2 responses

Hi Jack -

For me, the pipeline is more of a research tool, so is not a problem that prices are not live . When it comes to using the pipeline in the IDE, I agree there is a challenge. My approach is to take some of the logic out of the Pipeline and repeat it in the before_trading_starts() function. I then schedule the rebalance function 15 mins before the daily close, (and assume it will hold true to the relationship between OHLC for historical data use in pipeline in the research environment) allowing me to effectively place trades at the market close of the day that signals were generated.

Eager to see what others suggest, as am sure my approach is not optimal!

Hi Ben,

Thanks for the quick reply and the help!