public final class OvernightRateCalculation 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 Overnight index such as 'GBP-SONIA' or 'USD-FED-FUND'.
The index is observed for each business day and averaged or compounded to produce a rate. The reset periods correspond to each business day and are inferred from the accrual period dates.
| Modifier and Type | Class and Description |
|---|---|
static class |
OvernightRateCalculation.Builder
The bean-builder for
OvernightRateCalculation. |
static class |
OvernightRateCalculation.Meta
The meta-bean for
OvernightRateCalculation. |
| Modifier and Type | Method and Description |
|---|---|
static OvernightRateCalculation.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) |
OvernightAccrualMethod |
getAccrualMethod()
Gets the method of accruing overnight interest, defaulted to 'Compounded'.
|
DayCount |
getDayCount()
Gets the day count convention.
|
Optional<ValueSchedule> |
getGearing()
Gets the gearing multiplier, optional.
|
OvernightIndex |
getIndex()
Gets the Overnight index.
|
NegativeRateMethod |
getNegativeRateMethod()
Gets the negative rate method, defaulted to 'AllowNegative'.
|
int |
getRateCutOffDays()
Gets the number of business days before the end of the period that the rate is cut off, defaulted to zero.
|
Optional<ValueSchedule> |
getSpread()
Gets the spread rate, optional.
|
SwapLegType |
getType()
Gets the type of the leg, such as Fixed or Ibor.
|
int |
hashCode() |
static OvernightRateCalculation.Meta |
meta()
The meta-bean for
OvernightRateCalculation. |
OvernightRateCalculation.Meta |
metaBean() |
static OvernightRateCalculation |
of(OvernightIndex index)
Obtains a rate calculation for the specified index with accrual by compounding.
|
OvernightRateCalculation.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
public static OvernightRateCalculation of(OvernightIndex index)
The calculation will use the day count of the index. All optional fields will be set to their default values. Thus, there will be no spread, gearing or rate cut-off. 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 OvernightRateCalculation.Meta meta()
OvernightRateCalculation.public static OvernightRateCalculation.Builder builder()
public OvernightRateCalculation.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 OvernightIndex getIndex()
The rate to be paid is based on this index It will be a well known market index such as 'GBP-SONIA'.
public OvernightAccrualMethod getAccrualMethod()
Two methods of accrual are supported - compounding and averaging. Averaging is primarily related to the 'USD-FED-FUND' index.
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 int getRateCutOffDays()
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.
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 OvernightRateCalculation.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.