Class OvernightRateCalculation.Builder

    • Method Detail

      • dayCount

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

        This is used to convert dates to a numerical value.

        When building, this will default to the day count of the index if not specified.

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

        public OvernightRateCalculation.Builder index​(OvernightIndex index)
        Sets the Overnight index.

        The rate to be paid is based on this index It will be a well known market index such as 'GBP-SONIA'.

        Parameters:
        index - the new value, not null
        Returns:
        this, for chaining, not null
      • accrualMethod

        public OvernightRateCalculation.Builder accrualMethod​(OvernightAccrualMethod accrualMethod)
        Sets the method of accruing overnight interest, defaulted to 'Compounded'.

        Two methods of accrual are supported - compounding and averaging. Averaging is primarily related to the 'USD-FED-FUND' index.

        Parameters:
        accrualMethod - the new value, not null
        Returns:
        this, for chaining, not null
      • negativeRateMethod

        public OvernightRateCalculation.Builder negativeRateMethod​(NegativeRateMethod negativeRateMethod)
        Sets the negative rate method, defaulted to 'AllowNegative'.

        This is used when the interest rate, observed or calculated, goes negative. It does not apply if the rate is fixed, such as in a stub or using firstRegularRate.

        Defined by the 2006 ISDA definitions article 6.4.

        Parameters:
        negativeRateMethod - the new value, not null
        Returns:
        this, for chaining, not null
      • rateCutOffDays

        public OvernightRateCalculation.Builder rateCutOffDays​(int rateCutOffDays)
        Sets the number of business days before the end of the period that the rate is cut off, defaulted to zero.

        When a rate cut-off applies, the final daily rate is determined this number of days before the end of the period, with any subsequent days having the same rate.

        The amount must be zero or positive. A value of zero or one will have no effect on the standard calculation. The fixing holiday calendar of the index is used to determine business days.

        For example, a value of 3 means that the rate observed on (periodEndDate - 3 business days) is also to be used on (periodEndDate - 2 business days) and (periodEndDate - 1 business day).

        If there are multiple accrual periods in the payment period, then this will only apply to the last accrual period in the payment period.

        Parameters:
        rateCutOffDays - the new value
        Returns:
        this, for chaining, not null
      • gearing

        public OvernightRateCalculation.Builder gearing​(ValueSchedule gearing)
        Sets the gearing multiplier, optional.

        This defines the gearing as an initial value and a list of adjustments. The gearing is only permitted to change at accrual period boundaries.

        When calculating the rate, the fixing rate is multiplied by the gearing. A gearing of 1 has no effect. If both gearing and spread exist, then the gearing is applied first.

        If this property is not present, then no gearing applies.

        Gearing is also known as leverage.

        Parameters:
        gearing - the new value
        Returns:
        this, for chaining, not null
      • spread

        public OvernightRateCalculation.Builder spread​(ValueSchedule spread)
        Sets the spread rate, optional. A 5% rate will be expressed as 0.05.

        This defines the spread as an initial value and a list of adjustments. The spread is only permitted to change at accrual period boundaries. Spread is a per annum rate.

        When calculating the rate, the spread is added to the fixing rate. A spread of 0 has no effect. If both gearing and spread exist, then the gearing is applied first.

        If this property is not present, then no spread applies.

        Defined by the 2006 ISDA definitions article 6.2e.

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