Overall Statistics |
Total Trades 4354 Average Win 0.09% Average Loss -0.08% Compounding Annual Return 7.161% Drawdown 12.800% Expectancy 0.292 Net Profit 99.810% Sharpe Ratio 0.786 Probabilistic Sharpe Ratio 18.425% Loss Rate 41% Win Rate 59% Profit-Loss Ratio 1.17 Alpha 0.008 Beta 0.36 Annual Standard Deviation 0.065 Annual Variance 0.004 Information Ratio -0.724 Tracking Error 0.096 Treynor Ratio 0.142 Total Fees $4356.51 Estimated Strategy Capacity $170000.00 Lowest Capacity Asset VIXM UT076X30D0MD |
import numpy as np class spyVXXAlgo(QCAlgorithm): def Initialize(self): self.SetStartDate(2012,1, 1) # Set Start Date self.SetEndDate(2022,1,1) # Set End Date self.SetCash(100000) # Set Strategy Cash # Define the security universe self.tickers = ["SPY","VIXM"] for symbol in self.tickers: self.AddEquity(symbol, Resolution.Daily) def OnData(self, data): # Rebalance portfolio daily for symbol in self.tickers: if symbol=="SPY": self.SetHoldings(symbol,0.74) else: self.SetHoldings(symbol,0.25)