Overall Statistics
class SeasonalityInEquitiesAlgorithm(QCAlgorithm):

    def Initialize(self):

        self.SetStartDate(1999, 1, 1)  
        self.SetEndDate(2019, 5, 1)  
        self.SetCash(100000) 
        self.AddEquity("SPY", Resolution.Daily)
        self.AddEquity("SHY", Resolution.Daily)
        self.Schedule.On(self.DateRules.MonthStart("SPY"), self.TimeRules.AfterMarketOpen("SPY"), self.Rebalance)
        self.startPrice = None
        
    def Rebalance(self):
        if self.Time.month == 5:
            self.Liquidate("SPY")
        if self.Time.month == 11:
            self.SetHoldings("SPY", 1)