Class CreditCouponPaymentPeriod.Builder

    • Method Detail

      • currency

        public CreditCouponPaymentPeriod.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 CreditCouponPaymentPeriod.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 CreditCouponPaymentPeriod.Builder startDate​(LocalDate startDate)
        Sets the start date of the accrual period.

        This is the first accrual 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 CreditCouponPaymentPeriod.Builder endDate​(LocalDate endDate)
        Sets the end date of the accrual period.

        This is the last accrual 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 CreditCouponPaymentPeriod.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 CreditCouponPaymentPeriod.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
      • effectiveStartDate

        public CreditCouponPaymentPeriod.Builder effectiveStartDate​(LocalDate effectiveStartDate)
        Sets the effective protection start date of the period.

        This is the first date in the protection period associated with the payment period.

        Parameters:
        effectiveStartDate - the new value, not null
        Returns:
        this, for chaining, not null
      • effectiveEndDate

        public CreditCouponPaymentPeriod.Builder effectiveEndDate​(LocalDate effectiveEndDate)
        Sets the effective protection end date of the period.

        This is the last date in the protection period associated with the payment period.

        Parameters:
        effectiveEndDate - the new value, not null
        Returns:
        this, for chaining, not null
      • paymentDate

        public CreditCouponPaymentPeriod.Builder paymentDate​(LocalDate paymentDate)
        Sets the payment date.

        The fixed rate is paid on this date. This is not necessarily the same as endDate.

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

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

        The single payment is based on this fixed coupon rate. The coupon must be represented in fraction.

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

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

        The year fraction of a period is based on startDate and endDate. The value is usually calculated using a specific DayCount.

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