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

Represents an entire map file for a specified symbol More...

Inheritance diagram for QuantConnect.Data.Auxiliary.MapFile:
[legend]

Public Member Functions

 MapFile (string permtick, IEnumerable< MapFileRow > data)
 Initializes a new instance of the MapFile class. More...
 
string GetMappedSymbol (DateTime searchDate, string defaultReturnValue="", DataMappingMode? dataMappingMode=null)
 Memory overload search method for finding the mapped symbol for this date. More...
 
bool HasData (DateTime date)
 Determines if there's data for the requested date More...
 
IEnumerable< string > ToCsvLines ()
 Reads and writes each MapFileRow More...
 
void WriteToCsv (string market, SecurityType securityType)
 Writes the map file to a CSV file More...
 
IEnumerator< MapFileRowGetEnumerator ()
 Returns an enumerator that iterates through the collection. More...
 

Static Public Member Functions

static string GetRelativeMapFilePath (string market, SecurityType securityType)
 Constructs the map file path for the specified market and symbol More...
 
static IEnumerable< MapFileGetMapFiles (string mapFileDirectory, string market, SecurityType securityType, IDataProvider dataProvider)
 Reads all the map files in the specified directory More...
 

Properties

string Permtick [get]
 Gets the entity's unique symbol, i.e OIH.1 More...
 
DateTime DelistingDate [get]
 Gets the last date in the map file which is indicative of a delisting event More...
 
DateTime FirstDate [get]
 Gets the first date in this map file More...
 
string FirstTicker [get]
 Gets the first ticker for the security represented by this map file More...
 

Detailed Description

Represents an entire map file for a specified symbol

Definition at line 32 of file MapFile.cs.

Constructor & Destructor Documentation

◆ MapFile()

QuantConnect.Data.Auxiliary.MapFile.MapFile ( string  permtick,
IEnumerable< MapFileRow data 
)

Initializes a new instance of the MapFile class.

Definition at line 59 of file MapFile.cs.

Here is the call graph for this function:

Member Function Documentation

◆ GetMappedSymbol()

string QuantConnect.Data.Auxiliary.MapFile.GetMappedSymbol ( DateTime  searchDate,
string  defaultReturnValue = "",
DataMappingMode dataMappingMode = null 
)

Memory overload search method for finding the mapped symbol for this date.

Parameters
searchDatedate for symbol we need to find.
defaultReturnValueDefault return value if search was got no result.
dataMappingModeThe mapping mode to use if any.
Returns
Symbol on this date.

Definition at line 106 of file MapFile.cs.

Here is the caller graph for this function:

◆ HasData()

bool QuantConnect.Data.Auxiliary.MapFile.HasData ( DateTime  date)

Determines if there's data for the requested date

Definition at line 126 of file MapFile.cs.

Here is the caller graph for this function:

◆ ToCsvLines()

IEnumerable<string> QuantConnect.Data.Auxiliary.MapFile.ToCsvLines ( )

Reads and writes each MapFileRow

Returns
Enumerable of csv lines

Definition at line 146 of file MapFile.cs.

Here is the caller graph for this function:

◆ WriteToCsv()

void QuantConnect.Data.Auxiliary.MapFile.WriteToCsv ( string  market,
SecurityType  securityType 
)

Writes the map file to a CSV file

Parameters
marketThe market to save the MapFile to
securityTypeThe map file security type

Definition at line 156 of file MapFile.cs.

Here is the call graph for this function:

◆ GetRelativeMapFilePath()

static string QuantConnect.Data.Auxiliary.MapFile.GetRelativeMapFilePath ( string  market,
SecurityType  securityType 
)
static

Constructs the map file path for the specified market and symbol

Parameters
marketThe market this symbol belongs to
securityTypeThe map file security type
Returns
The file path to the requested map file

Definition at line 176 of file MapFile.cs.

Here is the caller graph for this function:

◆ GetEnumerator()

IEnumerator<MapFileRow> QuantConnect.Data.Auxiliary.MapFile.GetEnumerator ( )

Returns an enumerator that iterates through the collection.

Returns
A T:System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.

<filterpriority>1</filterpriority>

Definition at line 190 of file MapFile.cs.

◆ GetMapFiles()

static IEnumerable<MapFile> QuantConnect.Data.Auxiliary.MapFile.GetMapFiles ( string  mapFileDirectory,
string  market,
SecurityType  securityType,
IDataProvider  dataProvider 
)
static

Reads all the map files in the specified directory

Parameters
mapFileDirectoryThe map file directory path
marketThe map file market
securityTypeThe map file security type
dataProviderThe data provider instance to use
Returns
An enumerable of all map files

Definition at line 217 of file MapFile.cs.

Property Documentation

◆ Permtick

string QuantConnect.Data.Auxiliary.MapFile.Permtick
get

Gets the entity's unique symbol, i.e OIH.1

Definition at line 39 of file MapFile.cs.

◆ DelistingDate

DateTime QuantConnect.Data.Auxiliary.MapFile.DelistingDate
get

Gets the last date in the map file which is indicative of a delisting event

Definition at line 44 of file MapFile.cs.

◆ FirstDate

DateTime QuantConnect.Data.Auxiliary.MapFile.FirstDate
get

Gets the first date in this map file

Definition at line 49 of file MapFile.cs.

◆ FirstTicker

string QuantConnect.Data.Auxiliary.MapFile.FirstTicker
get

Gets the first ticker for the security represented by this map file

Definition at line 54 of file MapFile.cs.


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