Class InflationEndMonthRateComputation

• java.lang.Object
• com.opengamma.strata.product.rate.InflationEndMonthRateComputation
• All Implemented Interfaces:
RateComputation, Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

public final class InflationEndMonthRateComputation
extends Object
implements RateComputation, org.joda.beans.ImmutableBean, Serializable
Defines the computation of inflation figures from a price index where the start index value is known.

A typical application of this rate computation is payments of a capital indexed bond, where the reference start month is start month of the bond rather than start month of the payment period.

A price index is typically published monthly and has a delay before publication. The rate observed by this instance will be based on the start index value and the observation relative to the end month.

Serialized Form
• Nested Class Summary

Nested Classes
Modifier and Type Class Description
static class  InflationEndMonthRateComputation.Meta
The meta-bean for InflationEndMonthRateComputation.
• Method Summary

All 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.
double getStartIndexValue()
Gets the start index value.
int hashCode()
static InflationEndMonthRateComputation.Meta meta()
The meta-bean for InflationEndMonthRateComputation.
InflationEndMonthRateComputation.Meta metaBean()
static InflationEndMonthRateComputation of​(PriceIndex index, double startIndexValue, YearMonth referenceEndMonth)
Creates an instance from an index, start index value and reference end month.
String toString()
• Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait
• Methods inherited from interface org.joda.beans.Bean

property, propertyNames
• Method Detail

• of

public static InflationEndMonthRateComputation of​(PriceIndex index,
double startIndexValue,
YearMonth referenceEndMonth)
Creates an instance from an index, start index value and reference end month.
Parameters:
index - the index
startIndexValue - the start index value
referenceEndMonth - 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 interface RateComputation
Parameters:
builder - the builder to use
• meta

public static InflationEndMonthRateComputation.Meta meta()
The meta-bean for InflationEndMonthRateComputation.
Returns:
the meta-bean, not null
• metaBean

public InflationEndMonthRateComputation.Meta metaBean()
Specified by:
metaBean in interface org.joda.beans.Bean
• getStartIndexValue

public double getStartIndexValue()
Gets the start index value.

The published index value of the start month.

Returns:
the value of the property
• getEndObservation

public PriceIndexObservation getEndObservation()
Gets the observation at the end.

The inflation rate is the ratio between the start index value and end observation. The end month is typically three months before the end of the period.

Returns:
the value of the property, not null
• equals

public boolean equals​(Object obj)
Overrides:
equals in class Object
• hashCode

public int hashCode()
Overrides:
hashCode in class Object
• toString

public String toString()
Overrides:
toString in class Object