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.671 Tracking Error 0.193 Treynor Ratio 0 Total Fees $0.00 |
class VentralParticlePrism(QCAlgorithm): def Initialize(self): self.SetStartDate(2015, 7, 17) # Set Start Date self.SetEndDate(2020, 7, 17) self.SetCash(250000000) # Set Strategy Cash self.AddEquity("QQQ", Resolution.Minute) self.AddEquity("TQQQ", Resolution.Minute) self.AddEquity("UVXY", Resolution.Minute) self.LongMAQQQ = self.SMA("QQQ", 730, Resolution.Daily) self.ShortMAQQQ = self.SMA("QQQ", 15, Resolution.Daily) self.SchlongMAQQQ = self.SMA("QQQ", 120, Resolution.Daily) self.SchortMAQQQ = self.SMA("QQQ", 29, Resolution.Daily) self.SlopeAngleOne = MomentumPercent(5) self.SlopeAngleTwo = MomentumPercent(28) self.Schedule.On( self.DateRules.EveryDay("QQQ"), self.TimeRules.AfterMarketOpen("QQQ", 120), self.Derp) self.SetWarmup(730) def OnData(self, data): if self.IsWarmingUp: return self.QuotientOne = (self.LongMAQQQ.Current.Value)/(self.ShortMAQQQ.Current.Value) self.QuotientTwo = (self.SchlongMAQQQ.Current.Value)/(self.SchortMAQQQ.Current.Value) self.SlopeAngleOne.Update(self.Time, self.QuotientOne) self.SlopeAngleTwo.Update(self.Time, self.QuotientTwo) def Derp(self): if not self.SlopeAngleOne.IsReady or not self.SlopeAngleTwo.IsReady: return if (self.SlopeAngleOne.Current.Value <= -0.001) and (self.SlopeAngleTwo.Current.Value <= 0.00033): self.SetHoldings("TQQQ", 0.8) self.SetHoldings("QQQ", 0) self.SetHoldings("UVXY", 0.08) elif self.SlopeAngleTwo.Current.Value >= 0.00033: self.SetHoldings("TQQQ", 0.3) self.SetHoldings("QQQ", 0.3) self.SetHoldings("UVXY", 0.15) else: self.SetHoldings("TQQQ", 0) self.SetHoldings("QQQ", 0) self.SetHoldings("UVXY", 0)