Hi, why do I get the error message "AttributeError : 'QCAlgorithm' object has no attribute 'test'" when running the following code? 

class MyQCA(QCAlgorithm): def Initialize(self): self.SetStartDate(2020, 9, 9) self.test = "test" self.UniverseSettings.Resolution = Resolution.Daily self.symbol = Symbol.Create("TSLA", SecurityType.Equity, Market.USA) self.SetUniverseSelection(ManualUniverseSelectionModel([self.symbol])) self.AddAlpha(MyAlphaModel()) class MyAlphaModel: def Update(self, algo, data): algo.Debug(algo.test) return [] def OnSecuritiesChanged(self, algo, changes): pass

 

Author