Back to Community
QTradableStocksUS Slow


I am simply trying to get the list of stocks that are considered in the QTradableStocksUS universe. My current method causes timeouts in the backtest:

def get_tradable_universe():  
    pipe = Pipeline(  
    return pipe  
    context.output = pipeline_output('my_pipeline')  
    df = context.output.unstack()  
    context.stocks = list(df.index.get_level_values(1))  

How can I quickly get a list of all valid stocks without any conditions or filtering in the pipeline?

1 response

Check this post out, it may help: QTradableStocksUS