public final class OvernightAveragedRateComputation extends Object implements OvernightRateComputation, org.joda.beans.ImmutableBean, Serializable
An interest rate determined directly from an Overnight index by averaging the value of each day's rate over the period. For example, a rate determined averaging values from 'USD-FED-FUND'.
Modifier and Type | Class and Description |
---|---|
static class |
OvernightAveragedRateComputation.Builder
The bean-builder for
OvernightAveragedRateComputation . |
static class |
OvernightAveragedRateComputation.Meta
The meta-bean for
OvernightAveragedRateComputation . |
Modifier and Type | Method and Description |
---|---|
static OvernightAveragedRateComputation.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
LocalDate |
getEndDate()
Gets the fixing date associated with the end date of the accrual period.
|
HolidayCalendar |
getFixingCalendar()
Gets the resolved calendar that the index uses.
|
OvernightIndex |
getIndex()
Gets the Overnight index.
|
int |
getRateCutOffDays()
Gets the number of business days before the end of the period that the rate is cut off.
|
LocalDate |
getStartDate()
Gets the fixing date associated with the start date of the accrual period.
|
int |
hashCode() |
static OvernightAveragedRateComputation.Meta |
meta()
The meta-bean for
OvernightAveragedRateComputation . |
OvernightAveragedRateComputation.Meta |
metaBean() |
static OvernightAveragedRateComputation |
of(OvernightIndex index,
LocalDate startDate,
LocalDate endDate,
int rateCutOffDays,
ReferenceData refData)
Creates an instance from an index, accrual period dates and rate cut-off.
|
static OvernightAveragedRateComputation |
of(OvernightIndex index,
LocalDate startDate,
LocalDate endDate,
ReferenceData refData)
Creates an instance from an index and accrual period dates
|
OvernightAveragedRateComputation.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
calculateEffectiveFromFixing, calculateFixingFromEffective, calculateMaturityFromEffective, calculateMaturityFromFixing, calculatePublicationFromFixing, collectIndices, observeOn, of
public static OvernightAveragedRateComputation of(OvernightIndex index, LocalDate startDate, LocalDate endDate, ReferenceData refData)
The dates represent the accrual period.
No rate cut-off applies.
index
- the indexstartDate
- the first date of the accrual periodendDate
- the last date of the accrual periodrefData
- the reference data to use when resolving holiday calendarspublic static OvernightAveragedRateComputation of(OvernightIndex index, LocalDate startDate, LocalDate endDate, int rateCutOffDays, ReferenceData refData)
Rate cut-off applies if the cut-off is 2 or greater. A value of 0 or 1 should be used if no cut-off applies.
index
- the indexstartDate
- the first date of the accrual periodendDate
- the last date of the accrual periodrateCutOffDays
- the rate cut-off days offset, not negative or zerorefData
- the reference data to use when resolving holiday calendarspublic static OvernightAveragedRateComputation.Meta meta()
OvernightAveragedRateComputation
.public static OvernightAveragedRateComputation.Builder builder()
public OvernightAveragedRateComputation.Meta metaBean()
metaBean
in interface org.joda.beans.Bean
public OvernightIndex getIndex()
The rate to be paid is based on this index. It will be a well known market index such as 'GBP-SONIA'.
getIndex
in interface OvernightRateComputation
public HolidayCalendar getFixingCalendar()
getFixingCalendar
in interface OvernightRateComputation
public LocalDate getStartDate()
This is also the first fixing date. The overnight rate is observed from this date onwards.
In general, the fixing dates and accrual dates are the same for an overnight index. However, in the case of a Tomorrow/Next index, the fixing period is one business day before the accrual period.
getStartDate
in interface OvernightRateComputation
public LocalDate getEndDate()
The overnight rate is accrued until the maturity date associated with this date.
In general, the fixing dates and accrual dates are the same for an overnight index. However, in the case of a Tomorrow/Next index, the fixing period is one business day before the accrual period.
getEndDate
in interface OvernightRateComputation
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 should typically only be non-zero in the last accrual period.
public OvernightAveragedRateComputation.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.