self.get_yesterday_dividend

lumibot.strategies.strategy.Strategy.get_yesterday_dividend(self, asset)

Get the dividend for the previous day.

Parameters:

asset (Asset object) – The asset to get the dividend for.

Returns:

dividend – The dividend amount.

Return type:

float

Example

>>> # Get the dividend for SPY
>>> asset = self.create_asset("SPY")
>>> self.get_yesterday_dividend(asset)