I want to select 20 stocks using the following CoarseSelectionFunction:

def CoarseSelectionFunction(self, coarse): CoarseWithFundamental = [x for x in coarse if x.HasFundamentalData] sortedByDollarVolume = sorted(CoarseWithFundamental, key=lambda x: x.DollarVolume, reverse=True) self.universe = [x.Symbol for x in sortedByDollarVolume[:20]] return self.universe

When I later check the stock in the self.Securities dictionary using

self.Debug(len(self.Securities.Keys)) for security in self.Securities.Keys: self.Debug(security)

I get a list of 55 securities. How can that be?

Here is the complete code:

Author