Overall Statistics |
Total Trades 71 Average Win 0% Average Loss -2.52% Compounding Annual Return -29.111% Drawdown 53.000% Expectancy -1 Net Profit -40.321% Sharpe Ratio -0.774 Probabilistic Sharpe Ratio 0.345% Loss Rate 100% Win Rate 0% Profit-Loss Ratio 0 Alpha 0.011 Beta -1.782 Annual Standard Deviation 0.238 Annual Variance 0.057 Information Ratio -0.796 Tracking Error 0.369 Treynor Ratio 0.103 Total Fees $71.00 Estimated Strategy Capacity $19000000.00 Lowest Capacity Asset SPY R735QTJ8XC9X |
# region imports from AlgorithmImports import * # endregion class SmoothYellowGreenScorpion(QCAlgorithm): def Initialize(self): self.SetStartDate(2020, 11, 4) # Set Start Date self.SetCash(100000) # Set Strategy Cash self.AddEquity("SPY", Resolution.Minute) self.entryTicket = None def OnOrderEvent(self, orderEvent): if orderEvent.Status != OrderStatus.Filled: return order = self.Transactions.GetOrderById(orderEvent.OrderId) if order: self.Debug('stop loss placed') self.MarketOrder("SPY", -10) else: self.Debug(f'onOrderEvent: else @{self.Time}') def OnData(self, data: Slice): if not self.Portfolio.Invested: self.entryTicket = self.MarketOrder("SPY", 10)