Overall Statistics |
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return 6.912% Drawdown 55.100% Expectancy 0 Net Profit 335.468% Sharpe Ratio 0.415 Probabilistic Sharpe Ratio 0.100% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0.08 Beta -0.089 Annual Standard Deviation 0.176 Annual Variance 0.031 Information Ratio 0 Tracking Error 0.26 Treynor Ratio -0.826 Total Fees $58.80 Estimated Strategy Capacity $4500000.00 |
class SPY_Buy_And_Hold_Benchmark(QCAlgorithm): def Initialize(self): self.SetCash(1000000) #Starting Cash self.SetStartDate(1999,1,31) self.SetEndDate(2021,1,31) self.spy = self.AddEquity("SPY", Resolution.Daily) self.spy.SetDataNormalizationMode(DataNormalizationMode.Adjusted) self.SetBenchmark("SPY") #self.Schedule.On(self.DateRules.EveryDay("SPY"),self.TimeRules.AfterMarketOpen("SPY"),self.PlotStuff) #self.Schedule.On(self.DateRules.MonthStart("SPY"),self.TimeRules.AfterMarketOpen("SPY"),self.PlotStuff) def OnData(self, data): #3. Place an order for 100 shares of IWM and print the average fill price #4. Debug the AveragePrice of IWM if not self.Portfolio.Invested: self.SetHoldings("SPY",1) #def PlotStuff(self): #self.SetHoldings("SPY",1)