@travishorn/financejs
    Preparing search index...

    Function calculateCouponDaysToNextCoupon

    • Returns the number of days from the settlement date to the next coupon date.

      Remarks:

      • settlement, maturity, frequency, and basis are truncated to integers.
      • If settlement or maturity is not a valid date, an error is thrown.
      • If frequency is any number other than 1, 2, or 4, an error is thrown.
      • If basis < 0 or if basis > 4, an error is thrown.
      • If settlement >= maturity, an error is thrown.

      Parameters

      • options: CouponDaysToNextCouponOptions

        The coupon days to next coupon calculation options.

      Returns number

      The number of days from the settlement date to the next coupon date.

      calculateCouponDaysToNextCoupon({
      settlement: new Date("2011-01-25"),
      maturity: new Date("2011-11-15"),
      frequency: 2,
      basis: 1,
      }); // 113