Class IborAveragedFixing
- java.lang.Object
-
- com.opengamma.strata.product.rate.IborAveragedFixing
-
- All Implemented Interfaces:
Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class IborAveragedFixing extends Object implements org.joda.beans.ImmutableBean, Serializable
A single fixing of an index that is observed byIborAveragedRateComputation
.The interest rate is determined for each reset period, with the weight used to create a weighted average.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IborAveragedFixing.Builder
The bean-builder forIborAveragedFixing
.static class
IborAveragedFixing.Meta
The meta-bean forIborAveragedFixing
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IborAveragedFixing.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
OptionalDouble
getFixedRate()
Gets the fixed rate for the fixing date, optional.IborIndexObservation
getObservation()
Gets the Ibor index observation to use to determine a rate for the reset period.double
getWeight()
Gets the weight to apply to this fixing.int
hashCode()
static IborAveragedFixing.Meta
meta()
The meta-bean forIborAveragedFixing
.IborAveragedFixing.Meta
metaBean()
static IborAveragedFixing
of(IborIndexObservation observation)
Creates aIborAveragedFixing
from the fixing date with a weight of 1.static IborAveragedFixing
of(IborIndexObservation observation, Double fixedRate)
Creates aIborAveragedFixing
from the fixing date with a weight of 1.static IborAveragedFixing
ofDaysInResetPeriod(IborIndexObservation observation, LocalDate startDate, LocalDate endDate)
Creates aIborAveragedFixing
from the fixing date, calculating the weight from the number of days in the reset period.static IborAveragedFixing
ofDaysInResetPeriod(IborIndexObservation observation, LocalDate startDate, LocalDate endDate, Double fixedRate)
Creates aIborAveragedFixing
from the fixing date, calculating the weight from the number of days in the reset period.IborAveragedFixing.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
-
-
-
Method Detail
-
of
public static IborAveragedFixing of(IborIndexObservation observation)
Creates aIborAveragedFixing
from the fixing date with a weight of 1.- Parameters:
observation
- the Ibor observation- Returns:
- the unweighted fixing information
-
of
public static IborAveragedFixing of(IborIndexObservation observation, Double fixedRate)
Creates aIborAveragedFixing
from the fixing date with a weight of 1.- Parameters:
observation
- the Ibor observationfixedRate
- the fixed rate for the fixing date, optional, may be null- Returns:
- the unweighted fixing information
-
ofDaysInResetPeriod
public static IborAveragedFixing ofDaysInResetPeriod(IborIndexObservation observation, LocalDate startDate, LocalDate endDate)
Creates aIborAveragedFixing
from the fixing date, calculating the weight from the number of days in the reset period.This implements the standard approach to average weights, which is to set each weight to the actual number of days between the start and end of the reset period.
- Parameters:
observation
- the Ibor observationstartDate
- the start date of the reset periodendDate
- the end date of the reset period- Returns:
- the weighted fixing information
-
ofDaysInResetPeriod
public static IborAveragedFixing ofDaysInResetPeriod(IborIndexObservation observation, LocalDate startDate, LocalDate endDate, Double fixedRate)
Creates aIborAveragedFixing
from the fixing date, calculating the weight from the number of days in the reset period.This implements the standard approach to average weights, which is to set each weight to the actual number of days between the start and end of the reset period.
- Parameters:
observation
- the Ibor observationstartDate
- the start date of the reset periodendDate
- the end date of the reset periodfixedRate
- the fixed rate for the fixing date, optional, may be null- Returns:
- the weighted fixing information
-
meta
public static IborAveragedFixing.Meta meta()
The meta-bean forIborAveragedFixing
.- Returns:
- the meta-bean, not null
-
builder
public static IborAveragedFixing.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public IborAveragedFixing.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getObservation
public IborIndexObservation getObservation()
Gets the Ibor index observation to use to determine a rate for the reset period.- Returns:
- the value of the property, not null
-
getFixedRate
public OptionalDouble getFixedRate()
Gets the fixed rate for the fixing date, optional. A 5% rate will be expressed as 0.05.In certain circumstances two counterparties agree the rate of a fixing when the contract starts. It is used in place of an observed fixing. Other calculation elements, such as gearing or spread, still apply.
If the value not present, which is the normal case, then the rate is observed via the normal fixing process.
- Returns:
- the optional value of the property, not null
-
getWeight
public double getWeight()
Gets the weight to apply to this fixing.If the averaging is unweighted, then all weights must be one.
- Returns:
- the value of the property
-
toBuilder
public IborAveragedFixing.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-