Class OvernightAveragedDailyRateComputation
- java.lang.Object
-
- com.opengamma.strata.product.rate.OvernightAveragedDailyRateComputation
-
- All Implemented Interfaces:
OvernightRateComputation
,RateComputation
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class OvernightAveragedDailyRateComputation extends Object implements OvernightRateComputation, org.joda.beans.ImmutableBean, Serializable
Defines the computation of an averaged daily rate for a single Overnight index.An interest rate determined directly from an Overnight index by averaging the value of each day's rate over the period strictly between the start date and end date.
The start date and end date can be non-business days. The average is taken on calendar days between the start and end dates.
If a day in the period is not a business day on the fixing calendar of the Overnight index, the overnight rate fixed on the previous business day is used.
For example, a rate determined averaging values from 'USD-FED-FUND'.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OvernightAveragedDailyRateComputation.Builder
The bean-builder forOvernightAveragedDailyRateComputation
.static class
OvernightAveragedDailyRateComputation.Meta
The meta-bean forOvernightAveragedDailyRateComputation
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OvernightAveragedDailyRateComputation.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
LocalDate
getEndDate()
Gets the end date of the accrual period.HolidayCalendar
getFixingCalendar()
Gets the resolved calendar that the index uses.OvernightIndex
getIndex()
Gets the Overnight index.LocalDate
getStartDate()
Gets the start date of the accrual period.int
hashCode()
static OvernightAveragedDailyRateComputation.Meta
meta()
The meta-bean forOvernightAveragedDailyRateComputation
.OvernightAveragedDailyRateComputation.Meta
metaBean()
static OvernightAveragedDailyRateComputation
of(OvernightIndex index, LocalDate startDate, LocalDate endDate, ReferenceData refData)
Creates an instance from an index and accrual period datesOvernightAveragedDailyRateComputation.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.opengamma.strata.product.rate.OvernightRateComputation
calculateEffectiveFromFixing, calculateFixingFromEffective, calculateMaturityFromEffective, calculateMaturityFromFixing, calculatePublicationFromFixing, collectIndices, observeOn
-
-
-
-
Method Detail
-
of
public static OvernightAveragedDailyRateComputation of(OvernightIndex index, LocalDate startDate, LocalDate endDate, ReferenceData refData)
Creates an instance from an index and accrual period datesThe dates represent the accrual period.
- Parameters:
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 calendars- Returns:
- the rate computation
-
meta
public static OvernightAveragedDailyRateComputation.Meta meta()
The meta-bean forOvernightAveragedDailyRateComputation
.- Returns:
- the meta-bean, not null
-
builder
public static OvernightAveragedDailyRateComputation.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public OvernightAveragedDailyRateComputation.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getIndex
public OvernightIndex getIndex()
Gets the Overnight index.The rate to be paid is based on this index. It will be a well known market index such as 'GBP-SONIA'.
- Specified by:
getIndex
in interfaceOvernightRateComputation
- Returns:
- the value of the property, not null
-
getFixingCalendar
public HolidayCalendar getFixingCalendar()
Gets the resolved calendar that the index uses.- Specified by:
getFixingCalendar
in interfaceOvernightRateComputation
- Returns:
- the value of the property, not null
-
getStartDate
public LocalDate getStartDate()
Gets the start date of the accrual period.This is not necessarily a valid business day. In this case, the first fixing date is the previous business day of the start date on
fixingCalendar
.- Specified by:
getStartDate
in interfaceOvernightRateComputation
- Returns:
- the value of the property, not null
-
getEndDate
public LocalDate getEndDate()
Gets the end date of the accrual period.This is not necessarily a valid business day. In this case, the last fixing date is the previous business day of the end date on
fixingCalendar
.- Specified by:
getEndDate
in interfaceOvernightRateComputation
- Returns:
- the value of the property, not null
-
toBuilder
public OvernightAveragedDailyRateComputation.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-