Class FixedCouponBondPaymentPeriod.Builder

    • Method Detail

      • currency

        public FixedCouponBondPaymentPeriod.Builder currency​(Currency currency)
        Sets the primary currency of the payment period.

        The amounts of the notional are usually expressed in terms of this currency, however they can be converted from amounts in a different currency.

        Parameters:
        currency - the new value, not null
        Returns:
        this, for chaining, not null
      • notional

        public FixedCouponBondPaymentPeriod.Builder notional​(double notional)
        Sets the notional amount, must be positive.

        The notional amount applicable during the period. The currency of the notional is specified by currency.

        Parameters:
        notional - the new value
        Returns:
        this, for chaining, not null
      • startDate

        public FixedCouponBondPaymentPeriod.Builder startDate​(LocalDate startDate)
        Sets the start date of the payment period.

        This is the first date in the period. If the schedule adjusts for business days, then this is the adjusted date.

        Parameters:
        startDate - the new value, not null
        Returns:
        this, for chaining, not null
      • endDate

        public FixedCouponBondPaymentPeriod.Builder endDate​(LocalDate endDate)
        Sets the end date of the payment period.

        This is the last date in the period. If the schedule adjusts for business days, then this is the adjusted date.

        Parameters:
        endDate - the new value, not null
        Returns:
        this, for chaining, not null
      • unadjustedStartDate

        public FixedCouponBondPaymentPeriod.Builder unadjustedStartDate​(LocalDate unadjustedStartDate)
        Sets the unadjusted start date.

        The start date before any business day adjustment is applied.

        When building, this will default to the start date if not specified.

        Parameters:
        unadjustedStartDate - the new value, not null
        Returns:
        this, for chaining, not null
      • unadjustedEndDate

        public FixedCouponBondPaymentPeriod.Builder unadjustedEndDate​(LocalDate unadjustedEndDate)
        Sets the unadjusted end date.

        The end date before any business day adjustment is applied.

        When building, this will default to the end date if not specified.

        Parameters:
        unadjustedEndDate - the new value, not null
        Returns:
        this, for chaining, not null
      • detachmentDate

        public FixedCouponBondPaymentPeriod.Builder detachmentDate​(LocalDate detachmentDate)
        Sets the detachment date.

        Some bonds trade ex-coupon before the coupon payment. The coupon is paid not to the owner of the bond on the payment date but to the owner of the bond on the detachment date.

        When building, this will default to the end date if not specified.

        Parameters:
        detachmentDate - the new value, not null
        Returns:
        this, for chaining, not null
      • fixedRate

        public FixedCouponBondPaymentPeriod.Builder fixedRate​(double fixedRate)
        Sets the fixed coupon rate.

        The single payment is based on this fixed coupon rate.

        Parameters:
        fixedRate - the new value
        Returns:
        this, for chaining, not null
      • yearFraction

        public FixedCouponBondPaymentPeriod.Builder yearFraction​(double yearFraction)
        Sets the year fraction that the accrual period represents.

        The year fraction of a bond period is based on the unadjusted dates.

        The value is usually calculated using a DayCount. Typically the value will be close to 1 for one year and close to 0.5 for six months. The fraction may be greater than 1, but not less than 0.

        Parameters:
        yearFraction - the new value
        Returns:
        this, for chaining, not null