Replace QCAlgorithm.FutureChainProvider usages with new FuturesChain api

This commit is contained in:
Jhonathan Abreu
2024-12-24 10:20:07 -04:00
parent 2745fa794f
commit 040f0ace71
8 changed files with 11 additions and 8 deletions
@@ -25,7 +25,7 @@ class ConsolidateRegressionAlgorithm(QCAlgorithm):
self.set_end_date(2020, 1, 20)
SP500 = Symbol.create(Futures.Indices.SP_500_E_MINI, SecurityType.FUTURE, Market.CME)
symbol = self.future_chain_provider.get_future_contract_list(SP500, self.start_date)[0]
symbol = list(self.futures_chain(SP500))[0].symbol
self._future = self.add_future_contract(symbol)
tradable_dates_count = len(list(Time.each_tradeable_day_in_time_zone(self._future.exchange.hours,