| Overall Statistics |
|
Total Trades 231 Average Win 5.11% Average Loss -0.97% Compounding Annual Return 44.486% Drawdown 38.200% Expectancy 5.180 Net Profit 5720.135% Sharpe Ratio 1.782 Probabilistic Sharpe Ratio 93.307% Loss Rate 2% Win Rate 98% Profit-Loss Ratio 5.28 Alpha 0.331 Beta 1.103 Annual Standard Deviation 0.283 Annual Variance 0.08 Information Ratio 1.653 Tracking Error 0.21 Treynor Ratio 0.458 Total Fees $1727.97 |
class SQQQTMVShort(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2010, 1, 1) # Set Start Date
self.SetCash(100000) # Set Strategy Cash
self.AddEquity("SQQQ", Resolution.Hour)
self.AddEquity("TMV", Resolution.Hour)
self.month = None
def OnData(self, data):
'''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
Arguments:
data: Slice object keyed by symbol containing the stock data
'''
month = self.Time.month
if month != self.month:
self.SetHoldings("SQQQ", -0.5)
self.SetHoldings("TMV", -0.5)
self.month = month