Overall Statistics
class GunStocks(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(1999, 1, 1)  # Set Start Date
        self.SetEndDate(2020, 2, 25)
        self.SetCash(100000)  # Set Strategy Cash
        # self.AddEquity("SPY", Resolution.Minute)
        self.tickers = ["AXON", "AOBC", "RGR", "VSTO", "SPWH", "OLN", "SWBI"]
        
        for i in self.tickers:
            self.AddEquity(i, Resolution.Minute)
            self.Securities[i].SetDataNormalizationMode(DataNormalizationMode.Adjusted)
        
        self.senators = {
            1999 : "R",
            2000 : "R",
            2001 : "D",
            2002 : "D", 
            2003 : "R",
            2004 : "R", 
            2005 : "R",
            2006 : "R",
            2007 : "D",
            2008 : "D",
            2009 : "D",
            2010 : "D",
            2011 : "D",
            2012 : "D",
            2013 : "D",
            2014 : "D",
            2015 : "R",
            2016 : "R",
            2017 : "R",
            2018 : "R",
            2019 : "R",
            2020 : "R"
        }
    
        self.AddRiskManagement(TrailingStopRiskManagementModel(0.02))
        self.lastmonth = -1
  
    def OnData(self, data):
        
        month = self.Time.month
        if month == self.lastmonth:
            return
        self.lastmonth = month
        
        
        
        for key, value in self.senators.items():
            timeYear = self.Time.year
            if (key == timeYear):
                
                for symbol in self.tickers:
                    
                    if value == "D":
                        if not self.Portfolio[symbol].Invested:
                            self.SetHoldings(symbol, 0.12)
                            self.LimitOrder(symbol, -(self.Portfolio[symbol].Quantity), round(self.Securities[symbol].Price, 2) * 1.06)