MapFileResolver
QuantConnect.Data.Auxiliary.MapFileResolver
MapFileResolver(map_files: List[MapFile])
Bases: Object, Iterable[MapFile]
Provides a means of mapping a symbol at a point in time to the map file containing that share class's mapping information
Initializes a new instance of the MapFileResolver by reading in all files in the specified directory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
map_files
|
List[MapFile]
|
The data used to initialize this resolver. |
required |
EMPTY
EMPTY: MapFileResolver = ...
Gets an empty MapFileResolver, that is an instance that contains zero mappings
get_by_permtick
get_by_permtick(permtick: str) -> MapFile
Gets the map file matching the specified permtick
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
permtick
|
str
|
The permtick to match on |
required |
Returns:
| Type | Description |
|---|---|
MapFile
|
The map file matching the permtick, or null if not found. |
get_enumerator
get_enumerator() -> IEnumerator[MapFile]
Returns an enumerator that iterates through the collection.
Returns:
| Type | Description |
|---|---|
IEnumerator[MapFile]
|
A System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection. |
resolve_map_file
resolve_map_file(
symbol: str, date: Union[datetime, date]
) -> MapFile
Resolves the map file path containing the mapping information for the symbol defined at date
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
str
|
The symbol as of date to be mapped |
required |
date
|
Union[datetime, date]
|
The date associated with the symbol |
required |
Returns:
| Type | Description |
|---|---|
MapFile
|
The map file responsible for mapping the symbol, if no map file is found, null is returned. |