public static final class IborRateCalculation.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<IborRateCalculation>
IborRateCalculation.| Modifier and Type | Method and Description |
|---|---|
IborRateCalculation |
build() |
IborRateCalculation.Builder |
dayCount(DayCount dayCount)
Sets the day count convention.
|
IborRateCalculation.Builder |
finalStub(IborRateStubCalculation finalStub)
Sets the rate to be used in final stub, optional.
|
IborRateCalculation.Builder |
firstFixingDateOffset(DaysAdjustment firstFixingDateOffset)
Sets the offset of the first fixing date from the first adjusted reset date, optional.
|
IborRateCalculation.Builder |
firstRate(Double firstRate)
Sets the rate of the first reset period, which may be a stub, optional.
|
IborRateCalculation.Builder |
firstRegularRate(Double firstRegularRate)
Sets the rate of the first regular reset period, optional.
|
IborRateCalculation.Builder |
fixingDateOffset(DaysAdjustment fixingDateOffset)
Sets the offset of the fixing date from each adjusted reset date.
|
IborRateCalculation.Builder |
fixingRelativeTo(FixingRelativeTo fixingRelativeTo)
Sets the base date that each fixing is made relative to, defaulted to 'PeriodStart'.
|
IborRateCalculation.Builder |
gearing(ValueSchedule gearing)
Sets the gearing multiplier, optional.
|
Object |
get(String propertyName) |
IborRateCalculation.Builder |
index(IborIndex index)
Sets the Ibor index.
|
IborRateCalculation.Builder |
initialStub(IborRateStubCalculation initialStub)
Sets the rate to be used in initial stub, optional.
|
IborRateCalculation.Builder |
negativeRateMethod(NegativeRateMethod negativeRateMethod)
Sets the negative rate method, defaulted to 'AllowNegative'.
|
IborRateCalculation.Builder |
resetPeriods(ResetSchedule resetPeriods)
Sets the reset schedule, used when averaging rates, optional.
|
IborRateCalculation.Builder |
set(org.joda.beans.MetaProperty<?> property,
Object value) |
IborRateCalculation.Builder |
set(String propertyName,
Object newValue) |
IborRateCalculation.Builder |
spread(ValueSchedule spread)
Sets the spread rate, with a 5% rate expressed as 0.05, optional.
|
String |
toString() |
public Object get(String propertyName)
get in interface org.joda.beans.BeanBuilder<IborRateCalculation>get in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<IborRateCalculation>public IborRateCalculation.Builder set(String propertyName, Object newValue)
public IborRateCalculation.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
set in interface org.joda.beans.BeanBuilder<IborRateCalculation>set in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<IborRateCalculation>public IborRateCalculation build()
public IborRateCalculation.Builder dayCount(DayCount dayCount)
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.
dayCount - the new value, not nullpublic IborRateCalculation.Builder index(IborIndex index)
The rate to be paid is based on this index It will be a well known market index such as 'GBP-LIBOR-3M'.
index - the new value, not nullpublic IborRateCalculation.Builder resetPeriods(ResetSchedule resetPeriods)
Most swaps have a single fixing for each accrual period. This property allows multiple fixings to be defined by dividing the accrual periods into reset periods.
If this property is not present, then the reset period is the same as the accrual period. If this property is present, then the accrual period is divided as per the information in the reset schedule, multiple fixing dates are calculated, and rate averaging performed.
resetPeriods - the new valuepublic IborRateCalculation.Builder fixingRelativeTo(FixingRelativeTo fixingRelativeTo)
The fixing date is relative to either the start or end of each reset period.
Note that in most cases, the reset frequency matches the accrual frequency and thus there is only one fixing for the accrual period.
fixingRelativeTo - the new value, not nullpublic IborRateCalculation.Builder fixingDateOffset(DaysAdjustment fixingDateOffset)
The offset is applied to the base date specified by fixingRelativeTo.
The offset is typically a negative number of business days.
Note that in most cases, the reset frequency matches the accrual frequency and thus there is only one fixing for the accrual period.
When building, this will default to the fixing offset of the index if not specified.
fixingDateOffset - the new value, not nullpublic IborRateCalculation.Builder negativeRateMethod(NegativeRateMethod negativeRateMethod)
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.
negativeRateMethod - the new value, not nullpublic IborRateCalculation.Builder firstRegularRate(Double firstRegularRate)
In certain circumstances two counterparties agree the rate of the first fixing when the contract starts, and it is used in place of one observed fixing. For all other fixings, the rate is observed via the normal fixing process.
This property allows the rate of the first reset period of the first regular accrual period to be controlled. Note that if there is an initial stub, this will be the second reset period. Other calculation elements, such as gearing or spread, still apply to the rate specified here.
If the first rate applies to the initial stub rather than the regular accrual periods
it must be specified using initialStub. Alternatively, firstRate can be used.
This property follows the definition in FpML. See also firstRate.
firstRegularRate - the new valuepublic IborRateCalculation.Builder firstRate(Double firstRate)
In certain circumstances two counterparties agree the rate of the first fixing when the contract starts, and it is used in place of one observed fixing. For all other fixings, the rate is observed via the normal fixing process.
This property allows the rate of the first reset period to be controlled, irrespective of whether that is an initial stub or a regular period. Other calculation elements, such as gearing or spread, still apply to the rate specified here.
This property is similar to firstRegularRate.
This property operates on the first reset period, whether that is an initial stub or a regular period.
By contrast, firstRegularRate operates on the first regular period, and never on a stub.
If either firstRegularRate or initialStub are present, this property is ignored.
If this property is not present, then the first rate is observed via the normal fixing process.
firstRate - the new valuepublic IborRateCalculation.Builder firstFixingDateOffset(DaysAdjustment firstFixingDateOffset)
If present, this offset is used instead of fixingDateOffset for the first
reset period of the swap, which will be either an initial stub or the first reset
period of the first regular accrual period.
The offset is applied to the base date specified by fixingRelativeTo.
The offset is typically a negative number of business days.
If this property is not present, then the fixingDateOffset applies to all fixings.
firstFixingDateOffset - the new valuepublic IborRateCalculation.Builder initialStub(IborRateStubCalculation initialStub)
The initial stub of a swap may have different rate rules to the regular accrual periods. A fixed rate may be specified, a different floating rate or a linearly interpolated floating rate. This may not be present if there is no initial stub, or if the index during the stub is the same as the main floating rate index.
If this property is not present, then the main index applies during any initial stub. If this property is present and there is no initial stub, it is ignored.
initialStub - the new valuepublic IborRateCalculation.Builder finalStub(IborRateStubCalculation finalStub)
The final stub of a swap may have different rate rules to the regular accrual periods. A fixed rate may be specified, a different floating rate or a linearly interpolated floating rate. This may not be present if there is no final stub, or if the index during the stub is the same as the main floating rate index.
If this property is not present, then the main index applies during any final stub. If this property is present and there is no final stub, it is ignored.
finalStub - the new valuepublic IborRateCalculation.Builder gearing(ValueSchedule gearing)
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.
gearing - the new valuepublic IborRateCalculation.Builder spread(ValueSchedule spread)
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.
spread - the new valuepublic String toString()
toString in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<IborRateCalculation>Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.