| Overall Statistics |
|
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return 26.409% Drawdown 1.900% Expectancy 0 Net Profit 1.227% Sharpe Ratio 2.667 Probabilistic Sharpe Ratio 64.081% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0.162 Beta 0.189 Annual Standard Deviation 0.076 Annual Variance 0.006 Information Ratio -0.049 Tracking Error 0.096 Treynor Ratio 1.066 Total Fees $1.61 |
class MultidimensionalVerticalInterceptor(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2019, 11, 25) # Set Start Date
self.SetEndDate(2019, 12, 15)
self.SetCash(100000) # Set Strategy Cash
self.AddEquity("SPY", Resolution.Daily)
def OnData(self, data):
if not self.Portfolio.Invested:
self.SetHoldings("SPY", 1)
else:
#self.Portfolio["SPY"].Price > self.Portfolio["SPY"].AveragePrice
self.Log(f'Price: {self.Portfolio["SPY"].Price}')
self.Log(f'AvgPrice: {self.Portfolio["SPY"].AveragePrice}')