Overall Statistics |
Total Trades 1047 Average Win 0.22% Average Loss -0.06% Compounding Annual Return 10.355% Drawdown 10.800% Expectancy 3.392 Net Profit 230.473% Sharpe Ratio 1.093 Probabilistic Sharpe Ratio 58.954% Loss Rate 7% Win Rate 93% Profit-Loss Ratio 3.73 Alpha 0.032 Beta 0.381 Annual Standard Deviation 0.067 Annual Variance 0.004 Information Ratio -0.355 Tracking Error 0.096 Treynor Ratio 0.191 Total Fees $1048.49 Estimated Strategy Capacity $210000000.00 Lowest Capacity Asset BGU U7EC123NWZTX |
class StaticBarbell(QCAlgorithm): def Initialize(self): self.SetStartDate(2010, 1, 1) # Set Start Date self.SetCash(10000) # Set Strategy Cash self.SetBrokerageModel(BrokerageName.AlphaStreams) self.stock = self.AddEquity("SPXL", Resolution.Daily) # SPXL, FIHD self.safe = self.AddEquity("IEF", Resolution.Daily) # IEF self.insurance = self.AddEquity("VIXY", Resolution.Daily) self.insu_ratio = 0.01 self.stock_ratio = 0.2 self.safe_ratio = 1.0 - self.insu_ratio - self.stock_ratio self.Schedule.On(self.DateRules.WeekStart("SPXL"), self.TimeRules.At(10, 0, 0), self.RebalancePortfolio) def RebalancePortfolio(self): self.SetPosition(self.stock, self.stock_ratio) self.SetPosition(self.safe, self.safe_ratio) self.SetPosition(self.insurance, self.insu_ratio) def SetPosition(self, asset, share): if self.IsMarketOpen(asset.Symbol) and asset.Price > 0: self.SetHoldings(asset.Symbol, share)