Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Using stocks fetched from CSV as universe for pipeline

I'm fetching stocks in my algorithim and I would like to use those stocks as my universe rather than the Q500US universe I'm currently using. How can I do something like this? I'm unsure where I have access to the stocks from the CSV once they've been set in the universe_func.

Thanks for the help,
Thomas

4 responses

Still unsure how to do this. From what I've seen on the forums, the way I would access the stocks fetched from the CSV is through the data attribute like this:

def handle_data(context,data):  
    log.info("now handling data")  
    for stock in data:  
        log.info(data[stock])

But what if I want to gather more information about the stocks, such as their beta value and what not? Any help is greatly appreciated :)

Bump

bump

bump