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

Clone Algorithm
7
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 58ba0b6c7a98e35e3453c596
There was a runtime error.
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