Overall Statistics
class MeanReversionAlgo(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2020, 1, 1)  # Set Start Date
        self.SetCash(100000)
        self.AddEquity("SPY", Resolution.Daily)
        
        self.AddUniverse(self.CoarseSelectionFunction)
        self.UniverseSettings.Resolution = Resolution.Daily
        
    def CoarseSelectionFunction(self, coarse):
        filtered = [x for x in coarse if x.HasFundamentalData and x.Price > 5]
        sort_ = sorted(filtered, key=lambda x: x.DollarVolume, reverse=True)
        self.selections = [x.Symbol for x in sort_[:10]]
        return self.selections
    
    def OnData(self, data):
        [self.SetHoldings(symbol, 0) for symbol in self.Portfolio.Keys if self.Portfolio[symbol].Invested]
        [self.SetHoldings(symbol, 0.1) for symbol in self.selections]