Lean
$LEAN_TAG$
|
Data writer for saving an IEnumerable of BaseData into the LEAN data directory. More...
Public Member Functions | |
LeanDataWriter (Resolution resolution, Symbol symbol, string dataDirectory, TickType tickType=TickType.Trade, IDataCacheProvider dataCacheProvider=null, WritePolicy? writePolicy=null, bool mapSymbol=false) | |
Create a new lean data writer to this base data directory. More... | |
LeanDataWriter (string dataDirectory, Resolution resolution, SecurityType securityType, TickType tickType, IDataCacheProvider dataCacheProvider=null, WritePolicy? writePolicy=null) | |
Create a new lean data writer to this base data directory. More... | |
void | Write (IEnumerable< BaseData > source) |
Given the constructor parameters, write out the data in LEAN format. More... | |
void | DownloadAndSave (IBrokerage brokerage, List< Symbol > symbols, DateTime startTimeUtc, DateTime endTimeUtc) |
Downloads historical data from the brokerage and saves it in LEAN format. More... | |
Properties | |
static Lazy< IMapFileProvider > | MapFileProvider [get, set] |
The map file provider instance to use More... | |
Data writer for saving an IEnumerable of BaseData into the LEAN data directory.
Definition at line 35 of file LeanDataWriter.cs.
QuantConnect.Data.LeanDataWriter.LeanDataWriter | ( | Resolution | resolution, |
Symbol | symbol, | ||
string | dataDirectory, | ||
TickType | tickType = TickType.Trade , |
||
IDataCacheProvider | dataCacheProvider = null , |
||
WritePolicy? | writePolicy = null , |
||
bool | mapSymbol = false |
||
) |
Create a new lean data writer to this base data directory.
symbol | Symbol string |
dataDirectory | Base data directory |
resolution | Resolution of the desired output data |
tickType | The tick type |
dataCacheProvider | The data cache provider to use |
writePolicy | The file write policy to use |
mapSymbol | True if the symbol should be mapped while writting the data |
Definition at line 66 of file LeanDataWriter.cs.
QuantConnect.Data.LeanDataWriter.LeanDataWriter | ( | string | dataDirectory, |
Resolution | resolution, | ||
SecurityType | securityType, | ||
TickType | tickType, | ||
IDataCacheProvider | dataCacheProvider = null , |
||
WritePolicy? | writePolicy = null |
||
) |
Create a new lean data writer to this base data directory.
dataDirectory | Base data directory |
resolution | Resolution of the desired output data |
securityType | The security type |
tickType | The tick type |
dataCacheProvider | The data cache provider to use |
writePolicy | The file write policy to use |
Definition at line 101 of file LeanDataWriter.cs.
void QuantConnect.Data.LeanDataWriter.Write | ( | IEnumerable< BaseData > | source | ) |
Given the constructor parameters, write out the data in LEAN format.
source | IEnumerable source of the data: sorted from oldest to newest. |
Definition at line 123 of file LeanDataWriter.cs.
void QuantConnect.Data.LeanDataWriter.DownloadAndSave | ( | IBrokerage | brokerage, |
List< Symbol > | symbols, | ||
DateTime | startTimeUtc, | ||
DateTime | endTimeUtc | ||
) |
Downloads historical data from the brokerage and saves it in LEAN format.
brokerage | The brokerage from where to fetch the data |
symbols | The list of symbols |
startTimeUtc | The starting date/time (UTC) |
endTimeUtc | The ending date/time (UTC) |
Definition at line 195 of file LeanDataWriter.cs.
|
staticgetset |
The map file provider instance to use
Public for testing
Definition at line 43 of file LeanDataWriter.cs.