Class InflationMonthlyRateComputation
- java.lang.Object
-
- com.opengamma.strata.product.rate.InflationMonthlyRateComputation
-
- All Implemented Interfaces:
RateComputation
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class InflationMonthlyRateComputation extends Object implements RateComputation, org.joda.beans.ImmutableBean, Serializable
Defines the computation of inflation figures from a price index.A price index is typically published monthly and has a delay before publication. The rate observed by this instance will be based on two observations of the index, one relative to the accrual start date and one relative to the accrual end date.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InflationMonthlyRateComputation.Meta
The meta-bean forInflationMonthlyRateComputation
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collectIndices(ImmutableSet.Builder<Index> builder)
Collects all the indices referred to by this computation.boolean
equals(Object obj)
PriceIndexObservation
getEndObservation()
Gets the observation at the end.PriceIndex
getIndex()
Gets the Price index.PriceIndexObservation
getStartObservation()
Gets the observation at the start.int
hashCode()
static InflationMonthlyRateComputation.Meta
meta()
The meta-bean forInflationMonthlyRateComputation
.InflationMonthlyRateComputation.Meta
metaBean()
static InflationMonthlyRateComputation
of(PriceIndex index, YearMonth referenceStartMonth, YearMonth referenceEndMonth)
Creates an instance from an index, reference start month and reference end month.String
toString()
-
-
-
Method Detail
-
of
public static InflationMonthlyRateComputation of(PriceIndex index, YearMonth referenceStartMonth, YearMonth referenceEndMonth)
Creates an instance from an index, reference start month and reference end month.- Parameters:
index
- the indexreferenceStartMonth
- the reference start monthreferenceEndMonth
- the reference end month- Returns:
- the inflation rate computation
-
getIndex
public PriceIndex getIndex()
Gets the Price index.- Returns:
- the Price index
-
collectIndices
public void collectIndices(ImmutableSet.Builder<Index> builder)
Description copied from interface:RateComputation
Collects all the indices referred to by this computation.A computation will typically refer to one index, such as 'GBP-LIBOR-3M'. Each index that is referred to must be added to the specified builder.
- Specified by:
collectIndices
in interfaceRateComputation
- Parameters:
builder
- the builder to use
-
meta
public static InflationMonthlyRateComputation.Meta meta()
The meta-bean forInflationMonthlyRateComputation
.- Returns:
- the meta-bean, not null
-
metaBean
public InflationMonthlyRateComputation.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getStartObservation
public PriceIndexObservation getStartObservation()
Gets the observation at the start.The inflation rate is the ratio between the start and end observation. The start month is typically three months before the start of the period.
- Returns:
- the value of the property, not null
-
getEndObservation
public PriceIndexObservation getEndObservation()
Gets the observation at the end.The inflation rate is the ratio between the start and end observation. The end month is typically three months before the end of the period.
- Returns:
- the value of the property, not null
-
-