_WithExDiv#

class rateslib.legs.protocols._WithExDiv(*args, **kwargs)#

Bases: Protocol

Protocol to determine if a Leg is ex-dividend on a given settlement.

Attributes Summary

Methods Summary

ex_div(settlement)

Return a boolean whether the security is ex-div at the given settlement.

Attributes Documentation

schedule#

Methods Documentation

ex_div(settlement)#

Return a boolean whether the security is ex-div at the given settlement.

Parameters:

settlement (datetime) – The settlement date to test.

Return type:

bool

Notes

Uses the UK DMO convention of returning False if settlement is on or before the ex-div date for a regular coupon period.

This is evaluated by analysing the attribute pschedule3 of the associated Schedule object of the Leg.