I'm trying to limit my universe to securites which have options. Right now, I'm doing this:
def UniverseSelection(self, coarse):
# ...
hard = list(filter(lambda c: (c.Market == "usa") and \
(c.Price > 0) and (c.HasFundamentalData) and (self.OptionChainProvider.GetOptionContractList(c.Symbol, self.Time) != None), coarse))
# ...
However, this is really inefficient. I'm wondering if there is a better way to do this.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!