Dividend Yield
Supported Models
Introduction
This page describes all of the pre-built dividend yield models in LEAN. If none of these models perform exactly how you want, create a custom dividend yield model.
Constant Model
The ConstantDividendYieldModel returns a constant yield across time. It's the default dividend yield model for securities that don't pay dividends.
_dividendYieldModel = new ConstantDividendYieldModel(0.02m);
self.dividend_yield_model = ConstantDividendYieldModel(0.02)
The following table describes the arguments the model accepts:
| Argument | Data Type | Description | Default Value |
|---|---|---|---|
dividendYielddividend_yield | decimalfloat | The dividend yield |
For more information about this model, see the class reference and implementation.
For more information about this model, see the class reference and implementation.
Dividend Yield Provider Model
The DividendYieldProvider uses historical dividend payments to estimate the annualized continuous dividend yield for a given date.
_dividendYieldModel = new DividendYieldProvider();
self.dividend_yield_model = DividendYieldProvider()
The following table describes the arguments the model accepts:
| Argument | Data Type | Description | Default Value |
|---|---|---|---|
symbol | Symbol | The symbol of a dividend-paying security. If you don't provide a value, it defaults to SPY. |
For more information about this model, see the class reference and implementation.
For more information about this model, see the class reference and implementation.