I'm new to QC and I'm having an error that I can't make sense of. I've copied what was auto-generated by the framework selection wizard into my first script; the error is the title of this post.

main.py

from Alphas.RsiAlphaModel import RsiAlphaModel from Execution.StandardDeviationExecutionModel import StandardDeviationExecutionModel from Standards import StandardProfile class MasterAlgo(QCAlgorithmFramework): def Initialize(self): std = StandardProfile(self) # Securities traded symbols = [ Symbol.Create("CRON", SecurityType.Equity, Market.USA) ] self.SetUniverseSelection( ManualUniverseSelectionModel(symbols) ) self.SetAlpha(RsiAlphaModel(60, Resolution.Minute)) self.SetExecution(StandardDeviationExecutionModel(60, 2, Resolution.Minute)) def OnOrderEvent(self, orderEvent): if orderEvent.Status == OrderStatus.Filled: # self.Debug("Purchased Stock: {0}".format(orderEvent.Symbol)) pass

 

Standards.py

from Risk.TrailingStopRiskManagementModel import TrailingStopRiskManagementModel from Risk.MaximumDrawdownPercentPerSecurity import MaximumDrawdownPercentPerSecurity from Portfolio.MeanVarianceOptimizationPortfolioConstructionModel import MeanVarianceOptimizationPortfolioConstructionModel class StandardProfile(): def __init__(self, klass): self.caller = klass self.SetBroker self.SetRiskManagement self.SetTimeframes self.SetBacktesting self.SetSecurities def SetBroker(): self.caller.SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage, AccountType.Cash) def SetSecurities(): self.caller.SetSecurityInitializer(lambda x: x.SetDataNormalizationMode(DataNormalizationMode.Raw)) def SetRiskManagement(): trailing_stop = 0.10 max_drawdown = 0.05 self.caller.SetRiskManagement( TrailingStopRiskManagementModel(trailing_stop), MaximumDrawdownPercentPerSecurity(max_drawdown) ) self.caller.SetPortfolioConstruction(MeanVarianceOptimizationPortfolioConstructionModel()) self.caller.Allocate = 0.25 def SetTimeframes(): self.caller.SetTimeZone(TimeZones.Toronto) self.caller.UniverseSettings.Resolution = Resolution.Minute self.caller.timeframes = { 1: None, 5: None, 15: None, 30: None, 60: None, 240: None, 390: None, 1950: None } for minutes, span in caller.timeframes.items(): self.caller.timeframes[minutes] = new(TradeBarConsolidator(TimeSpan.FromMinutes(minutes))) def SetBacktesting(): self.caller.SetStartDate(2018, 1, 1) self.caller.SetEndDate(2018, 12, 31) self.caller.SetCash(20000)