Interface FloatLeg

All Known Implementing Classes:
OvernightLeg, TermRateLeg

public sealed interface FloatLeg permits OvernightLeg, TermRateLeg
The floating leg of a VanillaSwap: either a compounded overnight leg (OvernightLeg, SOFR-style) or a term-rate leg (TermRateLeg, IBOR-style). Values are per unit notional; the valuation date is the discount curve's.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    The coupon rate (index rate plus spread) of one period, from published fixings where they exist and the projection curve otherwise.
    The leg's accrual periods.
    default double
    pv(DiscountCurve discount, DiscountCurve projection)
    PV per unit notional of the coupons not yet paid (payment date after the discount curve's valuation date).
  • Method Details

    • periods

      The leg's accrual periods.
      Returns:
      the periods, ascending
    • couponRate

      double couponRate(LegConvention.Period period, DiscountCurve projection)
      The coupon rate (index rate plus spread) of one period, from published fixings where they exist and the projection curve otherwise.
      Parameters:
      period - one of periods()
      projection - projection curve (its valuation date is the valuation date)
      Returns:
      the annualised coupon rate
    • pv

      default double pv(DiscountCurve discount, DiscountCurve projection)
      PV per unit notional of the coupons not yet paid (payment date after the discount curve's valuation date).
      Parameters:
      discount - discount curve
      projection - projection curve
      Returns:
      present value