Class RatePaymentPeriod.Builder

    • Method Detail

      • paymentDate

        public RatePaymentPeriod.Builder paymentDate​(java.time.LocalDate paymentDate)
        Sets the date that payment occurs.

        The date that payment is made for the accrual periods. If the schedule adjusts for business days, then this is the adjusted date.

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

        public RatePaymentPeriod.Builder accrualPeriods​(java.util.List<RateAccrualPeriod> accrualPeriods)
        Sets the accrual periods that combine to form the payment period.

        Each accrual period includes the applicable dates and details of how to observe the rate. In most cases, there will be one accrual period. If there is more than one accrual period then compounding may apply.

        Parameters:
        accrualPeriods - the new value, not empty
        Returns:
        this, for chaining, not null
      • accrualPeriods

        public RatePaymentPeriod.Builder accrualPeriods​(RateAccrualPeriod... accrualPeriods)
        Sets the accrualPeriods property in the builder from an array of objects.
        Parameters:
        accrualPeriods - the new value, not empty
        Returns:
        this, for chaining, not null
      • dayCount

        public RatePaymentPeriod.Builder dayCount​(DayCount dayCount)
        Sets the day count convention.

        Each accrual period contains a year fraction calculated using this day count. This day count is used when there is a need to perform further calculations.

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

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

        This is the currency of the swap leg and the currency that interest calculation is made in.

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

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

        public RatePaymentPeriod.Builder fxReset​(FxReset fxReset)
        Sets the FX reset definition, optional.

        This property is used when the defined amount of the notional is specified in a currency other than the currency of the swap leg. When this occurs, the notional amount has to be converted using an FX rate to the swap leg currency.

        The FX reset definition must be valid. It must have a reference currency that is different to that of this period, and the currency of this period must be one of those defined by the FX reset index.

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

        public RatePaymentPeriod.Builder notional​(double notional)
        Sets the notional amount, positive if receiving, negative if paying.

        The notional amount applicable during the period. The currency of the notional is specified by currency unless there is the fxReset property is present.

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

        public RatePaymentPeriod.Builder compoundingMethod​(CompoundingMethod compoundingMethod)
        Sets the compounding method to use when there is more than one accrual period, default is 'None'.

        Compounding is used when combining accrual periods.

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