Overall Statistics |
Total Trades 0 Average Win 0% Average Loss 0% Compounding Annual Return 0% Drawdown 0% Expectancy 0 Net Profit 0% Sharpe Ratio 0 Probabilistic Sharpe Ratio 0% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0 Beta 0 Annual Standard Deviation 0 Annual Variance 0 Information Ratio 1.376 Tracking Error 0.161 Treynor Ratio 0 Total Fees $0.00 Estimated Strategy Capacity $0 |
class LOGRUpdateProblem(QCAlgorithm): def Initialize(self): self.SetStartDate(2021, 2, 15) # Set Start Date symbol = self.AddEquity("SPY", Resolution.Daily).Symbol self.logr = LogReturn(128) consolidator = TradeBarConsolidator(timedelta(days=1)) consolidator.DataConsolidated += self.consolidation_handler self.SubscriptionManager.AddConsolidator(symbol, consolidator) self.RegisterIndicator(symbol, self.logr, consolidator) def consolidation_handler(self, sender, bar): self.Plot("LOGR", str(bar.Symbol), self.logr.Current.Value) #def LOGRUpdated(self, sender, updated): # self.Debug(f"Type(updated) = {type(updated)}") # self.Debug(f"Type(sender) = {type(sender)}") # self.Debug(f"updated ToString = {updated.ToString()}") # self.Debug(f"LOGR sender.name = {sender.Name}") # #self.Debug(f"LOGR sender.Current.Symbol.Value = {sender.Symbol}") # self.Quit()