_WithExDiv#
- class rateslib.legs.protocols._WithExDiv(*args, **kwargs)#
Bases:
ProtocolProtocol 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
settlementis on or before the ex-div date for a regular coupon period.This is evaluated by analysing the attribute
pschedule3of the associatedScheduleobject of the Leg.