Lean
$LEAN_TAG$
|
Estimated annualized continuous dividend yield at given date More...
Public Member Functions | |
DividendYieldProvider () | |
Creates a new instance using the default symbol More... | |
DividendYieldProvider (Symbol symbol) | |
Instantiates a DividendYieldProvider with the specified Symbol More... | |
decimal | GetDividendYield (DateTime date) |
Get dividend yield by a given date of a given symbol. It will get the dividend yield at the time of the most recent dividend since no price is provided. In order to get more accurate dividend yield, provide the security price at the given date to the GetDividendYield(DateTime, decimal) or GetDividendYield(IBaseData) methods. More... | |
decimal | GetDividendYield (IBaseData priceData) |
Gets the dividend yield at the date of the specified data, using the data price as the security price More... | |
decimal | GetDividendYield (DateTime date, decimal securityPrice) |
Get dividend yield at given date and security price More... | |
Static Public Member Functions | |
static IDividendYieldModel | CreateForOption (Symbol optionSymbol) |
Creates a new instance for the given option symbol More... | |
Static Public Attributes | |
static readonly decimal | DefaultDividendYieldRate = 0.0m |
Default no dividend payout More... | |
Protected Member Functions | |
virtual List< BaseData > | LoadCorporateEvents (Symbol symbol) |
Generate the corporate events from the corporate factor file for the specified symbol More... | |
Static Protected Attributes | |
static Dictionary< Symbol, List< BaseData > > | _corporateEventsCache |
The dividends by symbol More... | |
static Task | _cacheClearTask |
Task to clear the cache More... | |
Properties | |
static Symbol | DefaultSymbol = Symbol.Create("SPY", SecurityType.Equity, QuantConnect.Market.USA) [get, set] |
The default symbol to use as a dividend yield provider More... | |
virtual TimeSpan | CacheRefreshPeriod [get] |
The cached refresh period for the dividend yield rate More... | |
Estimated annualized continuous dividend yield at given date
Definition at line 31 of file DividendYieldProvider.cs.
QuantConnect.Data.DividendYieldProvider.DividendYieldProvider | ( | ) |
Creates a new instance using the default symbol
Definition at line 82 of file DividendYieldProvider.cs.
QuantConnect.Data.DividendYieldProvider.DividendYieldProvider | ( | Symbol | symbol | ) |
Instantiates a DividendYieldProvider with the specified Symbol
Definition at line 89 of file DividendYieldProvider.cs.
|
static |
Creates a new instance for the given option symbol
Definition at line 110 of file DividendYieldProvider.cs.
decimal QuantConnect.Data.DividendYieldProvider.GetDividendYield | ( | DateTime | date | ) |
Get dividend yield by a given date of a given symbol. It will get the dividend yield at the time of the most recent dividend since no price is provided. In order to get more accurate dividend yield, provide the security price at the given date to the GetDividendYield(DateTime, decimal) or GetDividendYield(IBaseData) methods.
date | The date |
Implements QuantConnect.Data.IDividendYieldModel.
Definition at line 152 of file DividendYieldProvider.cs.
decimal QuantConnect.Data.DividendYieldProvider.GetDividendYield | ( | IBaseData | priceData | ) |
Gets the dividend yield at the date of the specified data, using the data price as the security price
priceData | Price data instance |
Price data must be raw (DataNormalizationMode.Raw)
Definition at line 163 of file DividendYieldProvider.cs.
decimal QuantConnect.Data.DividendYieldProvider.GetDividendYield | ( | DateTime | date, |
decimal | securityPrice | ||
) |
Get dividend yield at given date and security price
date | The date |
securityPrice | The security price at the given date |
Price data must be raw (DataNormalizationMode.Raw)
Implements QuantConnect.Data.IDividendYieldModel.
Definition at line 180 of file DividendYieldProvider.cs.
|
protectedvirtual |
Generate the corporate events from the corporate factor file for the specified symbol
Exposed for testing
Definition at line 278 of file DividendYieldProvider.cs.
|
staticprotected |
The dividends by symbol
Definition at line 45 of file DividendYieldProvider.cs.
|
staticprotected |
Task to clear the cache
Definition at line 50 of file DividendYieldProvider.cs.
|
static |
Default no dividend payout
Definition at line 59 of file DividendYieldProvider.cs.
|
staticgetset |
The default symbol to use as a dividend yield provider
This is useful for index and future options which do not have an underlying that yields dividends. Defaults to SPY
Definition at line 40 of file DividendYieldProvider.cs.
|
getprotected |
The cached refresh period for the dividend yield rate
Exposed for testing
Definition at line 66 of file DividendYieldProvider.cs.