Overall Statistics |
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return 69.655% Drawdown 13.300% Expectancy 0 Net Profit 30.732% Sharpe Ratio 2.699 Probabilistic Sharpe Ratio 80.082% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0.652 Beta -0.195 Annual Standard Deviation 0.214 Annual Variance 0.046 Information Ratio 0.708 Tracking Error 0.277 Treynor Ratio -2.957 Total Fees $2.37 |
class ModulatedResistanceCircuit(QCAlgorithm): def Initialize(self): self.SetStartDate(2020, 7, 7) # Set Start Date self.SetCash(100000) # Set Strategy Cash self.security = self.AddEquity("SPY", Resolution.Daily) self.symbol = self.security.Symbol def OnData(self, data): self.Plot("TotalHoldingsValue", "Value", self.Portfolio.TotalHoldingsValue) self.Plot("TotalPortfolioValue", "Value", self.Portfolio.TotalPortfolioValue) self.Plot("Leverage", "Value", self.Portfolio.TotalHoldingsValue / self.Portfolio.TotalPortfolioValue) if self.Portfolio.Invested: return if self.security.IsTradable and data.ContainsKey(self.symbol) and data[self.symbol] is not None: self.SetHoldings(self.security.Symbol, 1.5)