_WithCashflows#
- class rateslib.legs.protocols._WithCashflows(*args, **kwargs)#
Bases:
ProtocolProtocol to generate cashflows of any Leg type.
Attributes Summary
Methods Summary
cashflows(*[, rate_curve, disc_curve, ...])Return aggregated cashflow data for the Leg.
Attributes Documentation
- periods#
Methods Documentation
- cashflows(*, rate_curve=NoInput.blank, disc_curve=NoInput.blank, index_curve=NoInput.blank, fx=NoInput.blank, fx_vol=NoInput.blank, base=NoInput.blank, settlement=NoInput.blank, forward=NoInput.blank)#
Return aggregated cashflow data for the Leg.
Warning
This method is a convenience method to provide a visual representation of all associated calculation data. Calling this method to extracting certain values should be avoided. It is more efficent to source relevant parameters or calculations from object attributes or other methods directly.
- Parameters:
rate_curve (_BaseCurve or dict of such indexed by string tenor, optional) – Used to forecast floating period rates, if necessary.
index_curve (_BaseCurve, optional) – Used to forecast index values for indexation, if necessary.
disc_curve (_BaseCurve, optional) – Used to discount cashflows.
fx (FXForwards, optional) – The
FXForwardsobject used for forecasting thefx_fixingfor deliverable cashflows, if necessary. Or, anFXRatesobject purely for immediate currency conversion.fx_vol (FXDeltaVolSmile, FXSabrSmile, FXDeltaVolSurface, FXSabrSurface, optional) – The FX volatility Smile or Surface object used for determining Black calendar day implied volatility values.
base (str, optional) – The currency to convert relevant values into.
settlement (datetime, optional) – The assumed settlement date of the PV determination. Used only to evaluate ex-dividend status.
forward (datetime, optional) – The future date to project the PV to using the
disc_curve.
- Return type:
DataFrame