Lean  $LEAN_TAG$
QuantConnect.Data.Auxiliary.MappingExtensions Class Reference

Mapping extensions helper methods More...

Static Public Member Functions

static MapFile ResolveMapFile (this IMapFileProvider mapFileProvider, SubscriptionDataConfig dataConfig)
 Helper method to resolve the mapping file to use. More...
 
static MapFile ResolveMapFile (this MapFileResolver mapFileResolver, Symbol symbol, string dataType=null)
 Helper method to resolve the mapping file to use. More...
 
static IEnumerable< TickerDateRangeRetrieveSymbolHistoricalDefinitionsInDateRange (this IMapFileProvider mapFileProvider, Symbol symbol, DateTime startDateTime, DateTime endDateTime)
 Some historical provider supports ancient data. In fact, the ticker could be restructured to new one. More...
 
static IEnumerable< SymbolDateRangeRetrieveAllMappedSymbolInDateRange (this IMapFileProvider mapFileProvider, Symbol symbol)
 Retrieves all Symbol from map files based on specific Symbol. More...
 

Detailed Description

Mapping extensions helper methods

Definition at line 27 of file MappingExtensions.cs.

Member Function Documentation

◆ ResolveMapFile() [1/2]

static MapFile QuantConnect.Data.Auxiliary.MappingExtensions.ResolveMapFile ( this IMapFileProvider  mapFileProvider,
SubscriptionDataConfig  dataConfig 
)
static

Helper method to resolve the mapping file to use.

This method is aware of the data type being added for SecurityType.Base to the SecurityIdentifier.Symbol value

Parameters
mapFileProviderThe map file provider
dataConfigThe configuration to fetch the map file for
Returns
The mapping file to use

Definition at line 37 of file MappingExtensions.cs.

Here is the call graph for this function:

◆ ResolveMapFile() [2/2]

static MapFile QuantConnect.Data.Auxiliary.MappingExtensions.ResolveMapFile ( this MapFileResolver  mapFileResolver,
Symbol  symbol,
string  dataType = null 
)
static

Helper method to resolve the mapping file to use.

This method is aware of the data type being added for SecurityType.Base to the SecurityIdentifier.Symbol value

Parameters
mapFileResolverThe map file resolver
symbolThe symbol that we want to map
dataTypeThe string data type name if any
Returns
The mapping file to use

Definition at line 56 of file MappingExtensions.cs.

Here is the call graph for this function:

◆ RetrieveSymbolHistoricalDefinitionsInDateRange()

static IEnumerable<TickerDateRange> QuantConnect.Data.Auxiliary.MappingExtensions.RetrieveSymbolHistoricalDefinitionsInDateRange ( this IMapFileProvider  mapFileProvider,
Symbol  symbol,
DateTime  startDateTime,
DateTime  endDateTime 
)
static

Some historical provider supports ancient data. In fact, the ticker could be restructured to new one.

Parameters
mapFileProviderProvides instances of MapFileResolver at run time
symbolRepresents a unique security identifier
startDateTimeThe date since we began our search for the historical name of the symbol.
endDateTimeThe end date and time of the historical data range.
Returns
An enumerable collection of tuples containing symbol ticker, start date and time, and end date and time representing the historical definitions of the symbol within the specified time range.
Exceptions
ArgumentNullExceptionThrown when mapFileProvider is null.

For instances, get "GOOGL" since 2013 to 2018: It returns: { ("GOOG", 2013, 2014), ("GOOGL", 2014, 2018) }

GOOGLE: IPO: August 19, 2004 Name = GOOG then it was restructured: from "GOOG" to "GOOGL" on April 2, 2014

Definition at line 102 of file MappingExtensions.cs.

Here is the call graph for this function:

◆ RetrieveAllMappedSymbolInDateRange()

static IEnumerable<SymbolDateRange> QuantConnect.Data.Auxiliary.MappingExtensions.RetrieveAllMappedSymbolInDateRange ( this IMapFileProvider  mapFileProvider,
Symbol  symbol 
)
static

Retrieves all Symbol from map files based on specific Symbol.

Parameters
mapFileProviderThe provider for map files containing ticker data.
symbolThe symbol to get MapFileResolver and generate new Symbol.
Returns
An enumerable collection of SymbolDateRange
Exceptions
ArgumentExceptionThrow if mapFileProvider is null.

Definition at line 145 of file MappingExtensions.cs.

Here is the call graph for this function:

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