Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
List all US equities within a certain price range

Hi, I'm new to python.
I have been looking into pipeline builtin trying to get it to list stocks within a certain price range or market cap.
Can someone direct me to the library/data sets I should be using? Any help is appreciated.
Thanks!

2 responses

I recommend making a base universe filter that uses the US tradable universe in addition to a filter, like so:

MIN_CLOSE = 100 # $100 close price  
MAX_CLOSE = 200 # $200 close price

close = USEquityPricing.close.latest  
universe = QTradableStocksUS() & (close > MIN_CLOSE) & (close < MAX_CLOSE) # you need the parentheses because the > and < operators have priority over &

# you're now set up to use the universe as a screen for pipeline :)

Thank you for the help, I'll give it a shot.