Overall Statistics |
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return 40.925% Drawdown 9.700% Expectancy 0 Net Profit 18.624% Sharpe Ratio 2.161 Probabilistic Sharpe Ratio 70.144% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha -0.057 Beta 0.986 Annual Standard Deviation 0.198 Annual Variance 0.039 Information Ratio -2.096 Tracking Error 0.03 Treynor Ratio 0.434 Total Fees $1.67 |
class UncoupledDynamicGearbox(QCAlgorithm): def Initialize(self): self.SetStartDate(2020, 5, 23) # Set Start Date self.SetCash(100000) # Set Strategy Cash self.AddEquity("SPY", Resolution.Minute) self.bought_time = None def OnData(self, data): if not self.Portfolio.Invested: self.SetHoldings("SPY", 1) self.bought_time = data.Time def OnEndOfDay(self): self.Plot("Days Held", "Number of Days", (self.Time - self.bought_time).days)