public final class ImmutableOvernightIndex extends Object implements OvernightIndex, org.joda.beans.ImmutableBean, Serializable
An index represented by this class relates to lending over one night. The rate typically refers to "Today/Tomorrow" but might refer to "Tomorrow/Next".
The index is defined by four dates. The fixing date is the date on which the index is to be observed. The publication date is the date on which the fixed rate is actually published. The effective date is the date on which the implied deposit starts. The maturity date is the date on which the implied deposit ends.
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableOvernightIndex.Builder
The bean-builder for
ImmutableOvernightIndex. |
static class |
ImmutableOvernightIndex.Meta
The meta-bean for
ImmutableOvernightIndex. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableOvernightIndex.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
LocalDate |
calculateEffectiveFromFixing(LocalDate fixingDate,
ReferenceData refData)
Calculates the effective date from the fixing date.
|
LocalDate |
calculateFixingFromEffective(LocalDate effectiveDate,
ReferenceData refData)
Calculates the fixing date from the effective date.
|
LocalDate |
calculateMaturityFromEffective(LocalDate effectiveDate,
ReferenceData refData)
Calculates the maturity date from the effective date.
|
LocalDate |
calculateMaturityFromFixing(LocalDate fixingDate,
ReferenceData refData)
Calculates the maturity date from the fixing date.
|
LocalDate |
calculatePublicationFromFixing(LocalDate fixingDate,
ReferenceData refData)
Calculates the publication date from the fixing date.
|
boolean |
equals(Object obj) |
Currency |
getCurrency()
Gets the currency of the index.
|
DayCount |
getDayCount()
Gets the day count convention.
|
DayCount |
getDefaultFixedLegDayCount()
Gets the default day count convention for the associated fixed leg.
|
int |
getEffectiveDateOffset()
Gets the number of days to add to the fixing date to obtain the effective date.
|
HolidayCalendarId |
getFixingCalendar()
Gets the calendar that the index uses.
|
FloatingRateName |
getFloatingRateName()
Gets the floating rate name for this index.
|
String |
getName()
Gets the index name, such as 'GBP-SONIA'.
|
int |
getPublicationDateOffset()
Gets the number of days to add to the fixing date to obtain the publication date.
|
Tenor |
getTenor()
Gets the tenor of the index.
|
int |
hashCode() |
boolean |
isActive()
Gets whether the index is active, defaulted to true.
|
static ImmutableOvernightIndex.Meta |
meta()
The meta-bean for
ImmutableOvernightIndex. |
ImmutableOvernightIndex.Meta |
metaBean() |
ImmutableOvernightIndex.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString()
Returns the name of the index.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitextendedEnum, ofparse, parse, tryParse, tryParsepublic Tenor getTenor()
RateIndexpublic FloatingRateName getFloatingRateName()
FloatingRateIndex
For an Ibor index, the FloatingRateName does not include the tenor.
It can be used to find the other tenors available for this index.
getFloatingRateName in interface FloatingRategetFloatingRateName in interface FloatingRateIndexpublic LocalDate calculatePublicationFromFixing(LocalDate fixingDate, ReferenceData refData)
OvernightIndexThe fixing date is the date on which the index is to be observed. The publication date is the date on which the fixed rate is actually published.
No error is thrown if the input date is not a valid fixing date. Instead, the fixing date is moved to the next valid fixing date and then processed.
calculatePublicationFromFixing in interface OvernightIndexfixingDate - the fixing daterefData - the reference data, used to resolve the holiday calendarpublic LocalDate calculateEffectiveFromFixing(LocalDate fixingDate, ReferenceData refData)
OvernightIndexThe fixing date is the date on which the index is to be observed. The effective date is the date on which the implied deposit starts.
No error is thrown if the input date is not a valid fixing date. Instead, the fixing date is moved to the next valid fixing date and then processed.
calculateEffectiveFromFixing in interface OvernightIndexfixingDate - the fixing daterefData - the reference data, used to resolve the holiday calendarpublic LocalDate calculateMaturityFromFixing(LocalDate fixingDate, ReferenceData refData)
OvernightIndexThe fixing date is the date on which the index is to be observed. The maturity date is the date on which the implied deposit ends.
No error is thrown if the input date is not a valid fixing date. Instead, the fixing date is moved to the next valid fixing date and then processed.
calculateMaturityFromFixing in interface OvernightIndexfixingDate - the fixing daterefData - the reference data, used to resolve the holiday calendarpublic LocalDate calculateFixingFromEffective(LocalDate effectiveDate, ReferenceData refData)
OvernightIndexThe fixing date is the date on which the index is to be observed. The effective date is the date on which the implied deposit starts.
No error is thrown if the input date is not a valid effective date. Instead, the effective date is moved to the next valid effective date and then processed.
calculateFixingFromEffective in interface OvernightIndexeffectiveDate - the effective daterefData - the reference data, used to resolve the holiday calendarpublic LocalDate calculateMaturityFromEffective(LocalDate effectiveDate, ReferenceData refData)
OvernightIndexThe effective date is the date on which the implied deposit starts. The maturity date is the date on which the implied deposit ends.
No error is thrown if the input date is not a valid effective date. Instead, the effective date is moved to the next valid effective date and then processed.
calculateMaturityFromEffective in interface OvernightIndexeffectiveDate - the effective daterefData - the reference data, used to resolve the holiday calendarpublic String toString()
public static ImmutableOvernightIndex.Meta meta()
ImmutableOvernightIndex.public static ImmutableOvernightIndex.Builder builder()
public ImmutableOvernightIndex.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic String getName()
getName in interface FloatingRateIndexgetName in interface IndexgetName in interface OvernightIndexgetName in interface RateIndexgetName in interface Namedpublic Currency getCurrency()
getCurrency in interface FloatingRategetCurrency in interface FloatingRateIndexpublic boolean isActive()
Over time some indices become inactive and are no longer produced. If this occurs, this flag will be set to false.
isActive in interface FloatingRateIndexpublic HolidayCalendarId getFixingCalendar()
All dates are calculated with reference to the same calendar.
getFixingCalendar in interface RateIndexpublic int getPublicationDateOffset()
In most cases, the fixing rate is available on the fixing date. In a few cases, publication of the fixing rate is delayed until the following business day. This property is zero if publication is on the fixing date, or one if it is the next day.
getPublicationDateOffset in interface OvernightIndexpublic int getEffectiveDateOffset()
In most cases, the settlement date and start of the implied deposit is on the fixing date. In a few cases, the settlement date is the following business day. This property is zero if settlement is on the fixing date, or one if it is the next day. Maturity is always one business day after the settlement date.
getEffectiveDateOffset in interface OvernightIndexpublic DayCount getDayCount()
getDayCount in interface FloatingRateIndexpublic DayCount getDefaultFixedLegDayCount()
A rate index is often paid against a fixed leg, such as in a vanilla Swap. The day count convention of the fixed leg often differs from that of the index, and the default is value is available here.
getDefaultFixedLegDayCount in interface FloatingRateIndexpublic ImmutableOvernightIndex.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.