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 0.146 Tracking Error 0.167 Treynor Ratio 0 Total Fees $0.00 Estimated Strategy Capacity $0 Lowest Capacity Asset |
# region imports from AlgorithmImports import * # endregion import numpy as np class AdaptableBrownJaguar(QCAlgorithm): def Initialize(self): self.SetStartDate(2021, 5, 8) # Set Start Date self.SetCash(100000) # Set Strategy Cash self.AddEquity("SPY", Resolution.Daily) self.legnth = 5 self.SetWarmUp(timedelta(self.legnth)) self.arrary1 = RollingWindow[float](self.legnth) self.arrary2 = RollingWindow[float](self.legnth) def OnData(self, data: Slice): x = 1.0 y = 2.0 self.arrary1.Add(x) self.arrary1.Add(y) if not self.arrary1.IsReady: return element2 = np.sum(list(self.arrary1)) self.arrary2.Add(element2) if not self.arrary2.IsReady: return