Overall Statistics
Total Trades
0
Average Win
0%
Average Loss
0%
Compounding Annual Return
0%
Drawdown
0%
Expectancy
0
Net Profit
0%
Sharpe Ratio
0
Probabilistic Sharpe Ratio
0%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0
Beta
0
Annual Standard Deviation
0
Annual Variance
0
Information Ratio
-8.874
Tracking Error
0.121
Treynor Ratio
0
Total Fees
$0.00
class ModulatedDynamicComputer(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2020, 7, 1)  # Set Start Date
        self.SetCash(100000)  # Set Strategy Cash
        self.tickers = ["SPY","QQQ"]
        self.equity = {}
        self.option = {}
        for ticker in self.tickers:
            self.equity[ticker] = self.AddEquity(ticker, Resolution.Daily)
            self.equity[ticker].SetDataNormalizationMode(DataNormalizationMode.Raw)
            #self.option[ticker] = self.AddOption(ticker)
            #self.option[ticker].SetFilter(-50, +50, 1, 90)


        self.Schedule.On(self.DateRules.EveryDay("SPY"),
            self.TimeRules.At(9,35),
            self.removeSecurities )



    def removeSecurities(self):
        self.Debug(f"Method called at {self.Time}")
        self.Debug(f"Active Securities ...")
        for security in self.ActiveSecurities:
            symbol = security.Key
            self.Debug(symbol.Value)
        self.Debug(f"Removed Securities ...")
        for security in self.ActiveSecurities:
            symbol = security.Key
            self.RemoveSecurity(symbol)
            self.Debug(symbol.Value)

    
    def OnData(self, slice):
        for chain in slice.OptionChains.Values: #iterate thru each chain in the slice
            self.Debug(str(self.Time) + " OnData fired for symbol " + str(chain.Symbol.Value))
        return