Overall Statistics |
Total Trades 842 Average Win 0.00% Average Loss 0.00% Compounding Annual Return -77.168% Drawdown 1.100% Expectancy -0.927 Net Profit -1.073% Sharpe Ratio -129.573 Probabilistic Sharpe Ratio 0% Loss Rate 95% Win Rate 5% Profit-Loss Ratio 0.36 Alpha -0.964 Beta 0.067 Annual Standard Deviation 0.005 Annual Variance 0 Information Ratio -89.176 Tracking Error 0.065 Treynor Ratio -9.089 Total Fees $842.00 Estimated Strategy Capacity $0 Lowest Capacity Asset SPY R735QTJ8XC9X |
class SwimmingSkyBlueAnguilline(QCAlgorithm): def Initialize(self): self.SetStartDate(2021, 10, 4) # Set Start Date self.SetEndDate(2021, 10, 6) # Set Start Date self.SetCash(100000) # Set Strategy Cash self.AddEquity("SPY", Resolution.Tick) self.AddEquity("QQQ", Resolution.Tick) self.consolidator = {} def OnConsolidated(self, sender, bar): if bar.Close > bar.Open: self.MarketOrder(bar.Symbol, 1) else: self.MarketOrder(bar.Symbol, -1) def OnSecuritiesChanged(self, changes): for security in changes.AddedSecurities: symbol = security.Symbol if symbol.Value == "SPY": self.consolidator[symbol] = TickConsolidator(3000) elif symbol.Value == "QQQ": self.consolidator[symbol] = TickConsolidator(timedelta(minutes=15)) self.consolidator[symbol].DataConsolidated += self.OnConsolidated self.SubscriptionManager.AddConsolidator(symbol, self.consolidator[symbol]) for security in changes.RemovedSecurities: symbol = security.Symbol consolidator = self.consolidator.pop(symbol) if consolidator: self.SubscriptionManager.RemoveConsolidator(symbol, consolidator)