Lean
$LEAN_TAG$
|
Defines a single row in a factor_factor file. This is a csv file ordered as {date, price factor, split factor, reference price} More...
Public Member Functions | |
CorporateFactorRow (DateTime date, decimal priceFactor, decimal splitFactor, decimal referencePrice=0) | |
Initializes a new instance of the CorporateFactorRow class More... | |
CorporateFactorRow | Apply (Dividend dividend, SecurityExchangeHours exchangeHours) |
Applies the dividend to this factor file row. This dividend date must be on or before the factor file row date More... | |
CorporateFactorRow | Apply (Split split, SecurityExchangeHours exchangeHours) |
Applies the split to this factor file row. This split date must be on or before the factor file row date More... | |
Dividend | GetDividend (CorporateFactorRow nextCorporateFactorRow, Symbol symbol, SecurityExchangeHours exchangeHours, int decimalPlaces=2) |
Creates a new dividend from this factor file row and the one chronologically in front of it This dividend may have a distribution of zero if this row doesn't represent a dividend More... | |
Split | GetSplit (CorporateFactorRow nextCorporateFactorRow, Symbol symbol, SecurityExchangeHours exchangeHours) |
Creates a new split from this factor file row and the one chronologically in front of it This split may have a split factor of one if this row doesn't represent a split More... | |
string | GetFileFormat (string source=null) |
Writes factor file row into it's file format More... | |
override string | ToString () |
Returns a string that represents the current object. More... | |
Static Public Member Functions | |
static List< CorporateFactorRow > | Parse (IEnumerable< string > lines, out DateTime? factorFileMinimumDate) |
Parses the lines as factor files rows while properly handling inf entries More... | |
Properties | |
DateTime | Date [get] |
Gets the date associated with this data More... | |
decimal | PriceFactor [get, set] |
Gets the price factor associated with this data More... | |
decimal | SplitFactor [get, set] |
Gets the split factor associated with the date More... | |
decimal | PriceScaleFactor [get] |
Gets the combined factor used to create adjusted prices from raw prices More... | |
decimal | ReferencePrice [get] |
Gets the raw closing value from the trading date before the updated factor takes effect More... | |
Properties inherited from QuantConnect.Data.Auxiliary.IFactorRow | |
DateTime | Date [get] |
Gets the date associated with this data More... | |
Defines a single row in a factor_factor file. This is a csv file ordered as {date, price factor, split factor, reference price}
Definition at line 30 of file CorporateFactorRow.cs.
QuantConnect.Data.Auxiliary.CorporateFactorRow.CorporateFactorRow | ( | DateTime | date, |
decimal | priceFactor, | ||
decimal | splitFactor, | ||
decimal | referencePrice = 0 |
||
) |
Initializes a new instance of the CorporateFactorRow class
Definition at line 86 of file CorporateFactorRow.cs.
|
static |
Parses the lines as factor files rows while properly handling inf entries
lines | The lines from the factor file to be parsed |
factorFileMinimumDate | The minimum date from the factor file |
Definition at line 100 of file CorporateFactorRow.cs.
CorporateFactorRow QuantConnect.Data.Auxiliary.CorporateFactorRow.Apply | ( | Dividend | dividend, |
SecurityExchangeHours | exchangeHours | ||
) |
Applies the dividend to this factor file row. This dividend date must be on or before the factor file row date
dividend | The dividend to apply with reference price and distribution specified |
exchangeHours | Exchange hours used for resolving the previous trading day |
Definition at line 142 of file CorporateFactorRow.cs.
CorporateFactorRow QuantConnect.Data.Auxiliary.CorporateFactorRow.Apply | ( | Split | split, |
SecurityExchangeHours | exchangeHours | ||
) |
Applies the split to this factor file row. This split date must be on or before the factor file row date
split | The split to apply with reference price and split factor specified |
exchangeHours | Exchange hours used for resolving the previous trading day |
Definition at line 180 of file CorporateFactorRow.cs.
Dividend QuantConnect.Data.Auxiliary.CorporateFactorRow.GetDividend | ( | CorporateFactorRow | nextCorporateFactorRow, |
Symbol | symbol, | ||
SecurityExchangeHours | exchangeHours, | ||
int | decimalPlaces = 2 |
||
) |
Creates a new dividend from this factor file row and the one chronologically in front of it This dividend may have a distribution of zero if this row doesn't represent a dividend
nextCorporateFactorRow | The next factor file row in time |
symbol | The symbol to use for the dividend |
exchangeHours | Exchange hours used for resolving the previous trading day |
decimalPlaces | The number of decimal places to round the dividend's distribution to, defaulting to 2 |
Definition at line 220 of file CorporateFactorRow.cs.
Split QuantConnect.Data.Auxiliary.CorporateFactorRow.GetSplit | ( | CorporateFactorRow | nextCorporateFactorRow, |
Symbol | symbol, | ||
SecurityExchangeHours | exchangeHours | ||
) |
Creates a new split from this factor file row and the one chronologically in front of it This split may have a split factor of one if this row doesn't represent a split
nextCorporateFactorRow | The next factor file row in time |
symbol | The symbol to use for the split |
exchangeHours | Exchange hours used for resolving the previous trading day |
Definition at line 249 of file CorporateFactorRow.cs.
string QuantConnect.Data.Auxiliary.CorporateFactorRow.GetFileFormat | ( | string | source = null | ) |
Writes factor file row into it's file format
CSV formatted
Implements QuantConnect.Data.Auxiliary.IFactorRow.
Definition at line 288 of file CorporateFactorRow.cs.
override string QuantConnect.Data.Auxiliary.CorporateFactorRow.ToString | ( | ) |
Returns a string that represents the current object.
<filterpriority>2</filterpriority>
Definition at line 305 of file CorporateFactorRow.cs.
|
get |
Gets the date associated with this data
Definition at line 38 of file CorporateFactorRow.cs.
|
getset |
Gets the price factor associated with this data
Definition at line 44 of file CorporateFactorRow.cs.
|
getset |
Gets the split factor associated with the date
Definition at line 61 of file CorporateFactorRow.cs.
|
get |
Gets the combined factor used to create adjusted prices from raw prices
Definition at line 76 of file CorporateFactorRow.cs.
|
get |
Gets the raw closing value from the trading date before the updated factor takes effect
Definition at line 81 of file CorporateFactorRow.cs.