Swap Float Leg
financepy.products.rates.swap_float_leg
Classes
SwapFloatLeg
SwapFloatLeg(effective_dt: financepy.utils.date.Date, end_dt: financepy.utils.date.Date | str, leg_type: financepy.utils.global_types.SwapTypes, spread: float, freq_type: financepy.utils.frequency.FrequencyTypes, accrual_dc_type: financepy.utils.day_count.DayCountTypes, notional: float = 1000000, principal: float = 0.0, payment_lag: int = 0, cal_type: financepy.utils.calendar.CalendarTypes = <CalendarTypes.WEEKEND: 2>, bd_type: financepy.utils.calendar.BusDayAdjustTypes = <BusDayAdjustTypes.FOLLOWING: 2>, dg_type: financepy.utils.calendar.DateGenRuleTypes = <DateGenRuleTypes.BACKWARD: 2>, end_of_month: bool = False)
Class for managing the floating leg of a swap. A float leg consists of
a sequence of flows calculated according to an ISDA schedule and with a
coupon determined by an index curve which changes over life of the swap.
Methods
generate_payment_dts
generate_payment_dts(self)
Generate the floating leg payment dates and accrual factors. The
coupons cannot be generated yet as we do not have the index curve.
value
value(self, value_dt: financepy.utils.date.Date, discount_curve: financepy.market.curves.discount_curve.DiscountCurve, index_curve: financepy.market.curves.discount_curve.DiscountCurve, first_fixing_rate: float = None, pv_only=True)
Value the floating leg with payments from an index curve and
discounting based on a supplied discount curve as of the valuation date
supplied. For an existing swap, the user must enter the next fixing
coupon.
print_payments
print_payments(self)
Prints the fixed leg dates, accrual factors, discount factors,
cash amounts, their present value and their cumulative PV using the
last valuation performed.
print_valuation
print_valuation(self)
Prints the fixed leg dates, accrual factors, discount factors,
cash amounts, their present value and their cumulative PV using the
last valuation performed.
Generated automatically from the FinancePy source code.
Do not edit this file manually.