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

Historical datafeed stream reader for processing files on a local disk. More...

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

Public Member Functions

virtual void Initialize (IAlgorithm algorithm, AlgorithmNodePacket job, IResultHandler resultHandler, IMapFileProvider mapFileProvider, IFactorFileProvider factorFileProvider, IDataProvider dataProvider, IDataFeedSubscriptionManager subscriptionManager, IDataFeedTimeProvider dataFeedTimeProvider, IDataChannelProvider dataChannelProvider)
 Initializes the data feed for the specified job and algorithm More...
 
virtual Subscription CreateSubscription (SubscriptionRequest request)
 Creates a new subscription to provide data for the specified security. More...
 
virtual void RemoveSubscription (Subscription subscription)
 Removes the subscription from the data feed, if it exists More...
 
virtual void Exit ()
 Send an exit signal to the thread. More...
 

Protected Member Functions

IEnumerator< BaseDataCreateEnumerator (SubscriptionRequest request, Resolution? fillForwardResolution=null)
 Creates a file based data enumerator for the given subscription request More...
 
IEnumerator< BaseDataCreateUniverseEnumerator (SubscriptionRequest request, Func< SubscriptionRequest, Resolution?, IEnumerator< BaseData >> createUnderlyingEnumerator, Resolution? fillForwardResolution=null)
 Creates a universe enumerator from the Subscription request, the underlying enumerator func and the fill forward resolution (in some cases) More...
 
IEnumerator< BaseDataAddScheduleWrapper (SubscriptionRequest request, IEnumerator< BaseData > underlying, ITimeProvider timeProvider)
 Returns a scheduled enumerator from the given arguments. It can also return the given underlying enumerator More...
 
IEnumerator< BaseDataTryAppendUnderlyingEnumerator (SubscriptionRequest request, IEnumerator< BaseData > parent, Func< SubscriptionRequest, Resolution?, IEnumerator< BaseData >> createEnumerator, Resolution? fillForwardResolution)
 If required will add a new enumerator for the underlying symbol More...
 
IEnumerator< BaseDataConfigureEnumerator (SubscriptionRequest request, bool aggregate, IEnumerator< BaseData > enumerator, Resolution? fillForwardResolution)
 Configure the enumerator with aggregation/fill-forward/filter behaviors. Returns new instance if re-configured More...
 
IEnumerator< BaseDataTryAddFillForwardEnumerator (SubscriptionRequest request, IEnumerator< BaseData > enumerator, bool fillForward, Resolution? fillForwardResolution)
 Will add a fill forward enumerator if requested More...
 

Properties

bool IsActive [get]
 Flag indicating the hander thread is completely finished and ready to dispose. More...
 
- Properties inherited from QuantConnect.Lean.Engine.DataFeeds.IDataFeed
bool IsActive [get]
 Public flag indicator that the thread is still busy. More...
 

Detailed Description

Historical datafeed stream reader for processing files on a local disk.

Filesystem datafeeds are incredibly fast

Definition at line 40 of file FileSystemDataFeed.cs.

Member Function Documentation

◆ Initialize()

virtual void QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed.Initialize ( IAlgorithm  algorithm,
AlgorithmNodePacket  job,
IResultHandler  resultHandler,
IMapFileProvider  mapFileProvider,
IFactorFileProvider  factorFileProvider,
IDataProvider  dataProvider,
IDataFeedSubscriptionManager  subscriptionManager,
IDataFeedTimeProvider  dataFeedTimeProvider,
IDataChannelProvider  dataChannelProvider 
)
virtual

Initializes the data feed for the specified job and algorithm

Implements QuantConnect.Lean.Engine.DataFeeds.IDataFeed.

Reimplemented in QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed.

Definition at line 61 of file FileSystemDataFeed.cs.

Here is the call graph for this function:

◆ CreateEnumerator()

IEnumerator<BaseData> QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed.CreateEnumerator ( SubscriptionRequest  request,
Resolution fillForwardResolution = null 
)
protected

Creates a file based data enumerator for the given subscription request

Protected so it can be used by the LiveTradingDataFeed to warmup requests

Definition at line 95 of file FileSystemDataFeed.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateSubscription()

virtual Subscription QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed.CreateSubscription ( SubscriptionRequest  request)
virtual

Creates a new subscription to provide data for the specified security.

Parameters
requestDefines the subscription to be added, including start/end times the universe and security
Returns
The created Subscription if successful, null otherwise

Implements QuantConnect.Lean.Engine.DataFeeds.IDataFeed.

Reimplemented in QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed.

Definition at line 123 of file FileSystemDataFeed.cs.

Here is the call graph for this function:

◆ RemoveSubscription()

virtual void QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed.RemoveSubscription ( Subscription  subscription)
virtual

Removes the subscription from the data feed, if it exists

Parameters
subscriptionThe subscription to remove

Implements QuantConnect.Lean.Engine.DataFeeds.IDataFeed.

Reimplemented in QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed.

Definition at line 184 of file FileSystemDataFeed.cs.

◆ CreateUniverseEnumerator()

IEnumerator<BaseData> QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed.CreateUniverseEnumerator ( SubscriptionRequest  request,
Func< SubscriptionRequest, Resolution?, IEnumerator< BaseData >>  createUnderlyingEnumerator,
Resolution fillForwardResolution = null 
)
protected

Creates a universe enumerator from the Subscription request, the underlying enumerator func and the fill forward resolution (in some cases)

Definition at line 191 of file FileSystemDataFeed.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddScheduleWrapper()

IEnumerator<BaseData> QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed.AddScheduleWrapper ( SubscriptionRequest  request,
IEnumerator< BaseData underlying,
ITimeProvider  timeProvider 
)
protected

Returns a scheduled enumerator from the given arguments. It can also return the given underlying enumerator

Definition at line 231 of file FileSystemDataFeed.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryAppendUnderlyingEnumerator()

IEnumerator<BaseData> QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed.TryAppendUnderlyingEnumerator ( SubscriptionRequest  request,
IEnumerator< BaseData parent,
Func< SubscriptionRequest, Resolution?, IEnumerator< BaseData >>  createEnumerator,
Resolution fillForwardResolution 
)
protected

If required will add a new enumerator for the underlying symbol

Definition at line 249 of file FileSystemDataFeed.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Exit()

virtual void QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed.Exit ( )
virtual

Send an exit signal to the thread.

Implements QuantConnect.Lean.Engine.DataFeeds.IDataFeed.

Reimplemented in QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed.

Definition at line 281 of file FileSystemDataFeed.cs.

Here is the call graph for this function:

◆ ConfigureEnumerator()

IEnumerator<BaseData> QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed.ConfigureEnumerator ( SubscriptionRequest  request,
bool  aggregate,
IEnumerator< BaseData enumerator,
Resolution fillForwardResolution 
)
protected

Configure the enumerator with aggregation/fill-forward/filter behaviors. Returns new instance if re-configured

Definition at line 296 of file FileSystemDataFeed.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryAddFillForwardEnumerator()

IEnumerator<BaseData> QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed.TryAddFillForwardEnumerator ( SubscriptionRequest  request,
IEnumerator< BaseData enumerator,
bool  fillForward,
Resolution fillForwardResolution 
)
protected

Will add a fill forward enumerator if requested

Definition at line 318 of file FileSystemDataFeed.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

Property Documentation

◆ IsActive

bool QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed.IsActive
get

Flag indicating the hander thread is completely finished and ready to dispose.

Definition at line 56 of file FileSystemDataFeed.cs.


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