Hi everyone! I'm new to QuantConnect / Python and I'm creating a Universe selection model. Within my FineSelectionFilter i'd like to exclude stocks that have less than a 25% increase in revenue YOY. I'm having trouble creating that measurement and thought I'd try here for help...


This is as far as I got before realizing that the list I was pulling was for all stocks rather than each individual security that I wanted, does anyone have a solve for my problem? thank you!


start_time = datetime(2017, 1, 4)
    end_time = datetime.now()

    def FineSelectionFilter(self, fine):
         # sort descending by P/E ratio
        revenue_history = qb.GetFundamental(filteredByFundamentalData, "IncomeStatement.TotalRevenue", start_time, end_time)
        revenuegrowth = (IncomeStatement.TotalRevenue - revenue_history) / revenue_history[-2]
        filteredByRevenueGrowth = [x.Symbol for x in fine if revenuegrowth > .25]
        sortedByPeRatio = sorted(filtereByRevenueGrowth, key=lambda x: x.ValuationRatios.PERatio, reverse=True)
        # take the top entries from our sorted collection
        return [ x.Symbol for x in sortedByPeRatio[:self.__numberOfSymbolsFine] ]