I am new to Quantopian, so would highly appreciate your help here. I've got a list of 438 stocks in a csv file, that I need to turn into a universe on quantopian. So my goal is to create a filter based on that list. I found the following code on the forum and it fits my goal pretty well.
from quantopian.pipeline.filters import StaticAssets aapl_ibm = StaticAssets(symbols(['AAPL', 'IBM']))
What I'm struggling with is I want to create a list variable with the list of stocks and input it in the functions above. So this is how I would do this normally in Python.
df = pd.read_csv('stocks.csv') filter_list = list(df['ticker']) universe_filter = StaticAssets(symbols(filter_list))
Apparently, this approach does not work. Quantopian does not let me input and read a csv file. But how would I construct a list of 438 stocks? By hand? Any suggestions?