DividendYieldProvider
QuantConnect.Data.DividendYieldProvider
DividendYieldProvider()
DividendYieldProvider(
symbol: Union[Symbol, str, BaseContract],
)
Bases: Object, IDividendYieldModel
Estimated annualized continuous dividend yield at given date
Signature descriptions:
-
Creates a new instance using the default symbol
-
Instantiates a DividendYieldProvider with the specified Symbol
DEFAULT_DIVIDEND_YIELD_RATE
DEFAULT_DIVIDEND_YIELD_RATE: float = 0.0
Default no dividend payout
cache_refresh_period
cache_refresh_period: timedelta
The cached refresh period for the dividend yield rate
This codeEntityType is protected.
get_dividend_yield
get_dividend_yield(date: Union[datetime, date]) -> float
get_dividend_yield(price_data: IBaseData) -> float
get_dividend_yield(
date: Union[datetime, date], security_price: float
) -> float
Signature descriptions:
-
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 get_dividend_yield(DateTime, decimal) or get_dividend_yield(IBaseData) methods.
-
Gets the dividend yield at the date of the specified data, using the data price as the security price
-
Get dividend yield at given date and security price
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date
|
Optional[Union[datetime, date]]
|
The date |
None
|
price_data
|
Optional[IBaseData]
|
Price data instance |
None
|
security_price
|
Optional[float]
|
The security price at the given date |
None
|
Returns:
| Type | Description |
|---|---|
float
|
Dividend yield on the given date of the given symbol. |
create_for_option
create_for_option(
option_symbol: Union[Symbol, str, BaseContract],
) -> IDividendYieldModel
Creates a new instance for the given option symbol
load_corporate_events
load_corporate_events(
symbol: Union[Symbol, str, BaseContract],
) -> List[BaseData]
Generate the corporate events from the corporate factor file for the specified symbol
This codeEntityType is protected.