Overall Statistics |
Total Trades 2 Average Win 0% Average Loss 0% Compounding Annual Return -3.232% Drawdown 0.000% Expectancy 0 Net Profit -0.018% Sharpe Ratio -9.165 Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0 Beta -1.643 Annual Standard Deviation 0.002 Annual Variance 0 Information Ratio -12.473 Tracking Error 0.002 Treynor Ratio 0.009 Total Fees $2.00 |
class Algorithm(QCAlgorithm): def Initialize(self): self.SetStartDate(2018,10,1) self.SetEndDate(2018,10,2) self.SetCash(10000) self.AddEquity("SPY", Resolution.Daily) self.AddEquity("VIXY", Resolution.Daily) def OnData(self, data): if not self.Portfolio.Invested: self.MarketOrder("SPY", 10) self.MarketOrder("VIXY", 10) if self.Portfolio.Invested: holdings = [x.Key for x in self.Portfolio if x.Value.Invested] for i in holdings: self.Debug(str(i.Value) + " quantity "+ str(self.Portfolio[i].Quantity))