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:

ArgumentData TypeDescriptionDefault Value
dividendYielddividend_yielddecimalfloatThe dividend yield

To view the implementation of this model, see the LEAN GitHub repository.

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:

ArgumentData TypeDescriptionDefault Value
symbolSymbolThe symbol of a dividend-paying security. If you don't provide a value, it defaults to SPY.

To view the implementation of this model, see the LEAN GitHub repository.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: