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 Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0 Beta 0 Annual Standard Deviation 0 Annual Variance 0 Information Ratio 0 Tracking Error 0 Treynor Ratio 0 Total Fees $0.00 |
class FuturesFilterLoggingAlgorithm(QCAlgorithm): def Initialize(self): self.SetStartDate(2017, 1, 1) # Set Start Date self.SetEndDate(2018, 1, 1) self.SetCash(10000) # Set Strategy Cash self.SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage) future = self.AddFuture(Futures.Indices.SP500EMini)#, Resolution.Minute) future.SetFilter(timedelta(0), timedelta(60)) def OnData(self, slice): for delisting in slice.Delistings.Keys: self.Log(f'{delisting.Value} delisting warning {slice.Delistings[delisting].ToString()}') def OnSecuritiesChanged(self, changes): for security in changes.AddedSecurities: self.Log(f'{security.Symbol} added to Universe') for security in changes.RemovedSecurities: self.Log(f'{security.Symbol} removed from Universe')