## Class RateAccrualPeriod.Builder

• All Implemented Interfaces:
BeanBuilder<RateAccrualPeriod>
Enclosing class:
RateAccrualPeriod

public static final class RateAccrualPeriod.Builder
extends DirectFieldsBeanBuilder<RateAccrualPeriod>
The bean-builder for RateAccrualPeriod.
• ### Method Summary

All Methods
Modifier and Type Method Description
RateAccrualPeriod build()
RateAccrualPeriod.Builder endDate​(java.time.LocalDate endDate)
Sets the end date of the accrual period.
RateAccrualPeriod.Builder gearing​(double gearing)
Sets the gearing multiplier, defaulted to 1.
java.lang.Object get​(java.lang.String propertyName)
RateAccrualPeriod.Builder negativeRateMethod​(NegativeRateMethod negativeRateMethod)
Sets the negative rate method, defaulted to 'AllowNegative'.
RateAccrualPeriod.Builder rateComputation​(RateComputation rateComputation)
Sets the rate to be computed.
RateAccrualPeriod.Builder set​(java.lang.String propertyName, java.lang.Object newValue)
RateAccrualPeriod.Builder set​(MetaProperty<?> property, java.lang.Object value)
RateAccrualPeriod.Builder spread​(double spread)
Sets the spread rate, defaulted to 0.
RateAccrualPeriod.Builder startDate​(java.time.LocalDate startDate)
Sets the start date of the accrual period.
java.lang.String toString()
RateAccrualPeriod.Builder unadjustedEndDate​(java.time.LocalDate unadjustedEndDate)
RateAccrualPeriod.Builder unadjustedStartDate​(java.time.LocalDate unadjustedStartDate)
RateAccrualPeriod.Builder yearFraction​(double yearFraction)
Sets the year fraction that the accrual period represents.
• ### Methods inherited from class org.joda.beans.impl.direct.DirectFieldsBeanBuilder

get
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
• ### Method Detail

• #### get

public java.lang.Object get​(java.lang.String propertyName)
Specified by:
get in interface BeanBuilder<RateAccrualPeriod>
Overrides:
get in class DirectFieldsBeanBuilder<RateAccrualPeriod>
• #### set

public RateAccrualPeriod.Builder set​(java.lang.String propertyName,
java.lang.Object newValue)
• #### set

public RateAccrualPeriod.Builder set​(MetaProperty<?> property,
java.lang.Object value)
Specified by:
set in interface BeanBuilder<RateAccrualPeriod>
Overrides:
set in class DirectFieldsBeanBuilder<RateAccrualPeriod>
• #### build

public RateAccrualPeriod build()
• #### startDate

public RateAccrualPeriod.Builder startDate​(java.time.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 RateAccrualPeriod.Builder endDate​(java.time.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

public RateAccrualPeriod.Builder unadjustedStartDate​(java.time.LocalDate unadjustedStartDate)

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

public RateAccrualPeriod.Builder unadjustedEndDate​(java.time.LocalDate unadjustedEndDate)

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
• #### yearFraction

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

The value is usually calculated using a DayCount which may be different to that of the index. 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
• #### rateComputation

public RateAccrualPeriod.Builder rateComputation​(RateComputation rateComputation)
Sets the rate to be computed.

The value of the period is based on this rate. Different implementations of the RateComputation interface have different approaches to computing the rate, including averaging, overnight and interpolation. For example, it might be a well known market index such as 'GBP-LIBOR-3M'.

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

public RateAccrualPeriod.Builder gearing​(double gearing)
Sets the gearing multiplier, defaulted to 1.

This defines the gearing, which is used to multiply the observed rate.

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

Gearing is also known as leverage.

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

public RateAccrualPeriod.Builder spread​(double spread)
Sets the spread rate, defaulted to 0. A 5% rate will be expressed as 0.05.

This defines the spread, which is used to add an amount the observed rate.

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

Defined by the 2006 ISDA definitions article 6.2e.

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

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

This is used when the interest rate, observed or calculated, goes negative.

When observing or calculating the rate, the value may go negative. If it does, then this method is used to validate whether the negative rate is allowed. It is applied after any applicable gearing or spread.

Defined by the 2006 ISDA definitions article 6.4.

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

public java.lang.String toString()
Overrides:
toString in class DirectFieldsBeanBuilder<RateAccrualPeriod>