Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Possible to lookup an asset/Equity from a non-string literal?

I thought this would be very basic. I have a dataframe that has a list of stock tickers and I wanted to trade against them. The dataframe is sourced from an external fetcher file.

symbol(sec) # where sec is a non-literal stock ticker.

Any thoughts on how to do this?

Thanks!
--Brian

1 response

Just wanted to pass along that I figured out a work-around for this. I load the stocks from fetcher and implemented a post-processing call back function. This converts all the tickers from the CSV file to equity objects which are tradable. This gives me the entire universe of stocks and their datetimes without having to worry about the wonky logic on fetcher universe.