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 TypeDescription
dividendYielddecimalfloatThe 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.

var symbol = AddEquity("MSFT").Symbol;
_dividendYieldModel = new DividendYieldProvider(symbol);
symbol = self.add_equity("MSFT").symbol
self.dividend_yield_model = DividendYieldProvider(symbol);

The following table describes the arguments the model accepts:

ArgumentData TypeDescription
symbolSymbolThe symbol of a dividend-paying security

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: