book
Checkout our new book! Hands on AI Trading with Python, QuantConnect, and AWS Learn More arrow

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.

Select Language:
self.dividend_yield_model = ConstantDividendYieldModel(0.02)

The following table describes the arguments the model accepts:

ArgumentData TypeDescriptionDefault Value
dividend_yieldfloatThe 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.

Select Language:
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: