from Selection.QC500UniverseSelectionModel import QC500UniverseSelectionModel

class SmoothGreenDolphin(QCAlgorithm):

 def Initialize(self):
       self.UniverseSettings.Resolution = Resolution.Second
       self.SetStartDate(2022, 3, 28)
       self.SetEndDate(2022, 4, 28)
       self.SetWarmUp(timedelta(days = 1))
       self.SetUniverseSelection(QC500UniverseSelectionModel())
       
       
       self.SetCash(100000)
       self.SetTimeZone("America/New_York")

       
       self.securityData = {}

       
       for x in self.ActiveSecurities:
           symbol = self.AddEquity(x, Resolution.Second).Symbol
           self.securitylData[symbol] = securityData(self, symbol)

       eachDay = self.DateRules.EveryDay(symbol)
       
       self.Schedule.On(everyday, self.TimeRules.BeforeMarketClose(symbol, 10), self.Liquidate)

 

 

 

symbol is supposedly referenced before assignment in the schedule event? I am trying to use the stocks from QC 500 in a separate class with indicators. I am not sure why that should be? Am I not implementing the QC500 universe? My understanding is ActiveSecurities should be populated with those stocks?

Author