Lean  $LEAN_TAG$
QuantConnect.Data.Auxiliary.FactorFile< T > Class Template Referenceabstract

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

Inheritance diagram for QuantConnect.Data.Auxiliary.FactorFile< T >:
[legend]

Public Member Functions

abstract decimal GetPriceFactor (DateTime searchDate, DataNormalizationMode dataNormalizationMode, DataMappingMode? dataMappingMode=null, uint contractOffset=0)
 Gets the price scale factor for the specified search date More...
 
IEnumerable< string > GetFileFormat ()
 Writes this factor file data to an enumerable of csv lines More...
 
void WriteToFile (Symbol symbol)
 Write the factor file to the correct place in the default Data folder More...
 
IEnumerator< IFactorRowGetEnumerator ()
 Returns an enumerator that iterates through the collection. More...
 

Public Attributes

DateTime MostRecentFactorChange
 Gets the most recent factor change in the factor file More...
 

Protected Member Functions

 FactorFile (string permtick, IEnumerable< T > data, DateTime? factorFileMinimumDate=null)
 Initializes a new instance of the FactorFile class. More...
 

Protected Attributes

readonly List< DateTime > _reversedFactorFileDates
 Keeping a reversed version is more performant that reversing it each time we need it More...
 

Properties

SortedList< DateTime, List< T > > SortedFactorFileData [get, set]
 The factor file data rows sorted by date More...
 
DateTime? FactorFileMinimumDate [get, set]
 The minimum tradeable date for the symbol More...
 
string Permtick [get]
 Gets the symbol this factor file represents More...
 
- Properties inherited from QuantConnect.Data.Auxiliary.IFactorProvider
string Permtick [get]
 Gets the symbol this factor file represents More...
 
DateTime? FactorFileMinimumDate [get, set]
 The minimum tradeable date for the symbol More...
 

Detailed Description

Represents an entire factor file for a specified symbol

Type Constraints
T :IFactorRow 

Definition at line 29 of file FactorFile.cs.

Constructor & Destructor Documentation

◆ FactorFile()

QuantConnect.Data.Auxiliary.FactorFile< T >.FactorFile ( string  permtick,
IEnumerable< T >  data,
DateTime?  factorFileMinimumDate = null 
)
protected

Initializes a new instance of the FactorFile class.

Definition at line 68 of file FactorFile.cs.

Member Function Documentation

◆ GetPriceFactor()

abstract decimal QuantConnect.Data.Auxiliary.FactorFile< T >.GetPriceFactor ( DateTime  searchDate,
DataNormalizationMode  dataNormalizationMode,
DataMappingMode dataMappingMode = null,
uint  contractOffset = 0 
)
pure virtual

◆ GetFileFormat()

IEnumerable<string> QuantConnect.Data.Auxiliary.FactorFile< T >.GetFileFormat ( )

Writes this factor file data to an enumerable of csv lines

Returns
An enumerable of lines representing this factor file

Definition at line 106 of file FactorFile.cs.

Here is the caller graph for this function:

◆ WriteToFile()

void QuantConnect.Data.Auxiliary.FactorFile< T >.WriteToFile ( Symbol  symbol)

Write the factor file to the correct place in the default Data folder

Parameters
symbolThe symbol this factor file represents

Definition at line 115 of file FactorFile.cs.

◆ GetEnumerator()

IEnumerator<IFactorRow> QuantConnect.Data.Auxiliary.FactorFile< T >.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 124 of file FactorFile.cs.

Member Data Documentation

◆ _reversedFactorFileDates

readonly List<DateTime> QuantConnect.Data.Auxiliary.FactorFile< T >._reversedFactorFileDates
protected

Keeping a reversed version is more performant that reversing it each time we need it

Definition at line 35 of file FactorFile.cs.

◆ MostRecentFactorChange

DateTime QuantConnect.Data.Auxiliary.FactorFile< T >.MostRecentFactorChange
Initial value:
.FirstOrDefault(time => time != Time.EndOfTime)

Gets the most recent factor change in the factor file

Definition at line 57 of file FactorFile.cs.

Property Documentation

◆ SortedFactorFileData

SortedList<DateTime, List<T> > QuantConnect.Data.Auxiliary.FactorFile< T >.SortedFactorFileData
getset

The factor file data rows sorted by date

Definition at line 40 of file FactorFile.cs.

◆ FactorFileMinimumDate

DateTime? QuantConnect.Data.Auxiliary.FactorFile< T >.FactorFileMinimumDate
getset

The minimum tradeable date for the symbol

Some factor files have INF split values, indicating that the stock has so many splits that prices can't be calculated with correct numerical precision. To allow backtesting these symbols, we need to move the starting date forward when reading the data. Known symbols: GBSN, JUNI, NEWL

Definition at line 52 of file FactorFile.cs.

◆ Permtick

string QuantConnect.Data.Auxiliary.FactorFile< T >.Permtick
get

Gets the symbol this factor file represents

Definition at line 63 of file FactorFile.cs.


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