Overall Statistics
import time

class Filters(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2019, 8, 19)
        self.SetStartDate(2019, 8, 20) 
        self.UniverseSettings.Resolution= Resolution.Minute
        self.AddUniverse(self.coarseFilter, self.fineFilter)
        self.priceTarget= [1,10]
        self.aveDailyVol = {}
        self.lastClose = {}
    def coarseFilter(self, coarse):
        result = [x.Symbol for x in coarse if (x.HasFundamentalData and x.AdjustedPrice > self.priceTarget[0] and x.AdjustedPrice < self.priceTarget[1])]
        self.Debug("number of coarse results: {}".format(len(result)))
        return [x for x in result]
    def fineFilter(self,fine):
        result = [x.Symbol for x in fine if x.EarningReports.BasicAverageShares.OneMonth < 10e06]
        self.Debug("number of fine results: {}".format(len(result)))
        start = time.time()
        for symbol in result:
            history = self.History([symbol], 15, Resolution.Daily)
            if history.empty:
            self.aveDailyVol[symbol] = history.volume.mean()
            self.lastClose[symbol] = history.close[-1]
        end = time.time()
        self.Debug("it took {} to run".format(end-start))
        return result
    def OnData(self, data):