public static final class RateAccrualPeriod.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<RateAccrualPeriod>
RateAccrualPeriod.| Modifier and Type | Method and Description |
|---|---|
RateAccrualPeriod |
build() |
RateAccrualPeriod.Builder |
endDate(LocalDate endDate)
Sets the end date of the accrual period.
|
RateAccrualPeriod.Builder |
gearing(double gearing)
Sets the gearing multiplier, defaulted to 1.
|
Object |
get(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(org.joda.beans.MetaProperty<?> property,
Object value) |
RateAccrualPeriod.Builder |
set(String propertyName,
Object newValue) |
RateAccrualPeriod.Builder |
spread(double spread)
Sets the spread rate, defaulted to 0.
|
RateAccrualPeriod.Builder |
startDate(LocalDate startDate)
Sets the start date of the accrual period.
|
String |
toString() |
RateAccrualPeriod.Builder |
unadjustedEndDate(LocalDate unadjustedEndDate)
Sets the unadjusted end date.
|
RateAccrualPeriod.Builder |
unadjustedStartDate(LocalDate unadjustedStartDate)
Sets the unadjusted start date.
|
RateAccrualPeriod.Builder |
yearFraction(double yearFraction)
Sets the year fraction that the accrual period represents.
|
public Object get(String propertyName)
get in interface org.joda.beans.BeanBuilder<RateAccrualPeriod>get in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<RateAccrualPeriod>public RateAccrualPeriod.Builder set(String propertyName, Object newValue)
public RateAccrualPeriod.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
set in interface org.joda.beans.BeanBuilder<RateAccrualPeriod>set in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<RateAccrualPeriod>public RateAccrualPeriod build()
public RateAccrualPeriod.Builder startDate(LocalDate startDate)
This is the first accrual date in the period. If the schedule adjusts for business days, then this is the adjusted date.
startDate - the new value, not nullpublic RateAccrualPeriod.Builder endDate(LocalDate endDate)
This is the last accrual date in the period. If the schedule adjusts for business days, then this is the adjusted date.
endDate - the new value, not nullpublic RateAccrualPeriod.Builder unadjustedStartDate(LocalDate unadjustedStartDate)
The start date before any business day adjustment is applied.
When building, this will default to the start date if not specified.
unadjustedStartDate - the new value, not nullpublic RateAccrualPeriod.Builder unadjustedEndDate(LocalDate unadjustedEndDate)
The end date before any business day adjustment is applied.
When building, this will default to the end date if not specified.
unadjustedEndDate - the new value, not nullpublic RateAccrualPeriod.Builder yearFraction(double yearFraction)
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.
yearFraction - the new valuepublic RateAccrualPeriod.Builder rateComputation(RateComputation rateComputation)
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'.
rateComputation - the new value, not nullpublic RateAccrualPeriod.Builder gearing(double gearing)
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.
gearing - the new valuepublic RateAccrualPeriod.Builder spread(double spread)
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.
spread - the new valuepublic RateAccrualPeriod.Builder negativeRateMethod(NegativeRateMethod negativeRateMethod)
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.
negativeRateMethod - the new value, not nullpublic String toString()
toString in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<RateAccrualPeriod>Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.