Lean  $LEAN_TAG$
QuantConnect.Lean.Engine.DataFeeds.BacktestingFutureChainProvider Class Reference

An implementation of IFutureChainProvider that reads the list of contracts from open interest zip data files More...

Inheritance diagram for QuantConnect.Lean.Engine.DataFeeds.BacktestingFutureChainProvider:
[legend]

Public Member Functions

 BacktestingFutureChainProvider (IDataCacheProvider dataCacheProvider)
 Creates a new instance More...
 
virtual IEnumerable< SymbolGetFutureContractList (Symbol symbol, DateTime date)
 Gets the list of future contracts for a given underlying symbol More...
 

Static Protected Member Functions

static Symbol GetSymbol (Symbol symbol)
 Helper method to get the symbol to use More...
 
- Static Protected Member Functions inherited from QuantConnect.Lean.Engine.DataFeeds.BacktestingChainProvider
static bool IsContractExpired (Symbol symbol, DateTime date)
 Helper method to determine if a contract is expired for the requested date More...
 

Additional Inherited Members

- Protected Member Functions inherited from QuantConnect.Lean.Engine.DataFeeds.BacktestingChainProvider
 BacktestingChainProvider (IDataCacheProvider dataCacheProvider)
 Creates a new instance More...
 
IEnumerable< SymbolGetSymbols (Symbol canonicalSymbol, DateTime date)
 Get the contract symbols associated with the given canonical symbol and date More...
 
- Properties inherited from QuantConnect.Lean.Engine.DataFeeds.BacktestingChainProvider
IDataCacheProvider DataCacheProvider [get]
 The data cache instance to use More...
 

Detailed Description

An implementation of IFutureChainProvider that reads the list of contracts from open interest zip data files

Definition at line 25 of file BacktestingFutureChainProvider.cs.

Constructor & Destructor Documentation

◆ BacktestingFutureChainProvider()

QuantConnect.Lean.Engine.DataFeeds.BacktestingFutureChainProvider.BacktestingFutureChainProvider ( IDataCacheProvider  dataCacheProvider)

Creates a new instance

Parameters
dataCacheProviderThe data cache provider instance to use

Definition at line 31 of file BacktestingFutureChainProvider.cs.

Member Function Documentation

◆ GetFutureContractList()

virtual IEnumerable<Symbol> QuantConnect.Lean.Engine.DataFeeds.BacktestingFutureChainProvider.GetFutureContractList ( Symbol  symbol,
DateTime  date 
)
virtual

Gets the list of future contracts for a given underlying symbol

Parameters
symbolThe underlying symbol
dateThe date for which to request the future chain (only used in backtesting)
Returns
The list of future contracts

Implements QuantConnect.Interfaces.IFutureChainProvider.

Reimplemented in QuantConnect.Lean.Engine.DataFeeds.LiveFutureChainProvider.

Definition at line 42 of file BacktestingFutureChainProvider.cs.

Here is the call graph for this function:

◆ GetSymbol()

static Symbol QuantConnect.Lean.Engine.DataFeeds.BacktestingFutureChainProvider.GetSymbol ( Symbol  symbol)
staticprotected

Helper method to get the symbol to use

Definition at line 50 of file BacktestingFutureChainProvider.cs.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: