public final class IborRateCalculation extends Object implements RateCalculation, org.joda.beans.ImmutableBean, Serializable
This defines the data necessary to calculate the amount payable on the leg. The amount is based on the observed value of an Ibor index such as 'GBP-LIBOR-3M' or 'EUR-EURIBOR-1M'.
The index is observed once for each reset period and referred to as a fixing. The actual date of observation is the fixing date, which is relative to either the start or end of the reset period.
The reset period is typically the same as the accrual period. In this case, the rate for the accrual period is based directly on the fixing. If the reset period is a subdivision of the accrual period then there are multiple fixings, one for each reset period. In that case, the rate for the accrual period is based on an average of the fixings.
| Modifier and Type | Class and Description |
|---|---|
static class |
IborRateCalculation.Builder
The bean-builder for
IborRateCalculation. |
static class |
IborRateCalculation.Meta
The meta-bean for
IborRateCalculation. |
| Modifier and Type | Method and Description |
|---|---|
static IborRateCalculation.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
void |
collectCurrencies(ImmutableSet.Builder<Currency> builder)
Collects all the currencies referred to by this calculation.
|
void |
collectIndices(ImmutableSet.Builder<Index> builder)
Collects all the indices referred to by this calculation.
|
ImmutableList<RateAccrualPeriod> |
createAccrualPeriods(Schedule accrualSchedule,
Schedule paymentSchedule,
ReferenceData refData)
Creates accrual periods based on the specified schedule.
|
boolean |
equals(Object obj) |
DayCount |
getDayCount()
Gets the day count convention.
|
Optional<IborRateStubCalculation> |
getFinalStub()
Gets the rate to be used in final stub, optional.
|
Optional<DaysAdjustment> |
getFirstFixingDateOffset()
Gets the offset of the first fixing date from the first adjusted reset date, optional.
|
OptionalDouble |
getFirstRate()
Gets the rate of the first reset period, which may be a stub, optional.
|
OptionalDouble |
getFirstRegularRate()
Gets the rate of the first regular reset period, optional.
|
DaysAdjustment |
getFixingDateOffset()
Gets the offset of the fixing date from each adjusted reset date.
|
FixingRelativeTo |
getFixingRelativeTo()
Gets the base date that each fixing is made relative to, defaulted to 'PeriodStart'.
|
Optional<ValueSchedule> |
getGearing()
Gets the gearing multiplier, optional.
|
IborIndex |
getIndex()
Gets the Ibor index.
|
Optional<IborRateStubCalculation> |
getInitialStub()
Gets the rate to be used in initial stub, optional.
|
NegativeRateMethod |
getNegativeRateMethod()
Gets the negative rate method, defaulted to 'AllowNegative'.
|
Optional<ResetSchedule> |
getResetPeriods()
Gets the reset schedule, used when averaging rates, optional.
|
Optional<ValueSchedule> |
getSpread()
Gets the spread rate, with a 5% rate expressed as 0.05, optional.
|
SwapLegType |
getType()
Gets the type of the leg, such as Fixed or Ibor.
|
int |
hashCode() |
static IborRateCalculation.Meta |
meta()
The meta-bean for
IborRateCalculation. |
IborRateCalculation.Meta |
metaBean() |
static IborRateCalculation |
of(IborIndex index)
Obtains a rate calculation for the specified index.
|
IborRateCalculation.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
public static IborRateCalculation of(IborIndex index)
The calculation will use the day count and fixing offset of the index. All optional fields will be set to their default values. Thus, fixing will be in advance, with no spread, gearing or reset periods. If this method provides insufficient control, use the builder.
index - the indexpublic SwapLegType getType()
RateCalculationThis provides a high level categorization of the swap leg.
getType in interface RateCalculationpublic void collectCurrencies(ImmutableSet.Builder<Currency> builder)
RateCalculationThis collects the complete set of currencies for the calculation, not just the payment currencies.
collectCurrencies in interface RateCalculationbuilder - the builder to populatepublic void collectIndices(ImmutableSet.Builder<Index> builder)
RateCalculationA calculation will typically refer to at least one index, such as 'GBP-LIBOR-3M'. Each index that is referred to must be added to the specified builder.
collectIndices in interface RateCalculationbuilder - the builder to usepublic ImmutableList<RateAccrualPeriod> createAccrualPeriods(Schedule accrualSchedule, Schedule paymentSchedule, ReferenceData refData)
RateCalculation
The specified accrual schedule defines the period dates to be created.
One instance of RateAccrualPeriod must be created for each period in the schedule.
createAccrualPeriods in interface RateCalculationaccrualSchedule - the accrual schedulepaymentSchedule - the payment schedulerefData - the reference data to use when resolvingpublic static IborRateCalculation.Meta meta()
IborRateCalculation.public static IborRateCalculation.Builder builder()
public IborRateCalculation.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic DayCount getDayCount()
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.
getDayCount in interface RateCalculationpublic IborIndex getIndex()
The rate to be paid is based on this index It will be a well known market index such as 'GBP-LIBOR-3M'.
public Optional<ResetSchedule> getResetPeriods()
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.
public FixingRelativeTo getFixingRelativeTo()
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.
public DaysAdjustment getFixingDateOffset()
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.
public NegativeRateMethod getNegativeRateMethod()
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.
public OptionalDouble getFirstRegularRate()
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.
public OptionalDouble getFirstRate()
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.
public Optional<DaysAdjustment> getFirstFixingDateOffset()
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.
public Optional<IborRateStubCalculation> getInitialStub()
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.
public Optional<IborRateStubCalculation> getFinalStub()
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.
public Optional<ValueSchedule> getGearing()
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.
public Optional<ValueSchedule> getSpread()
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.
public IborRateCalculation.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.