## Class InflationEndInterpolatedRateComputation

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

public final class InflationEndInterpolatedRateComputation
extends Object
implements RateComputation, org.joda.beans.ImmutableBean, Serializable
Defines the computation of inflation figures from a price index with interpolation 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 the 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 specified start index value and two index observations relative to the end month. Linear interpolation based on the number of days of the payment month is used to find the appropriate value.

Serialized Form
• ### Nested Class Summary

Nested Classes
Modifier and Type Class Description
static class  InflationEndInterpolatedRateComputation.Meta
The meta-bean for InflationEndInterpolatedRateComputation.
• ### 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.
PriceIndexObservation getEndSecondObservation()
Gets the observation for interpolation at the end.
PriceIndex getIndex()
Gets the Price index.
double getStartIndexValue()
Gets the start index value.
double getWeight()
Gets the positive weight used when interpolating.
int hashCode()
static InflationEndInterpolatedRateComputation.Meta meta()
The meta-bean for InflationEndInterpolatedRateComputation.
InflationEndInterpolatedRateComputation.Meta metaBean()
static InflationEndInterpolatedRateComputation of​(PriceIndex index, double startIndexValue, YearMonth referenceEndMonth, double weight)
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 InflationEndInterpolatedRateComputation of​(PriceIndex index,
double startIndexValue,
YearMonth referenceEndMonth,
double weight)
Creates an instance from an index, start index value and reference end month.

The second end observations will be one month later than the end month.

Parameters:
index - the index
startIndexValue - the start index value
referenceEndMonth - the reference end month
weight - the weight
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 InflationEndInterpolatedRateComputation.Meta meta()
The meta-bean for InflationEndInterpolatedRateComputation.
Returns:
the meta-bean, not null
• #### metaBean

public InflationEndInterpolatedRateComputation.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 the interpolated end observations. The end month is typically three months before the end of the period.

Returns:
the value of the property, not null
• #### getEndSecondObservation

public PriceIndexObservation getEndSecondObservation()
Gets the observation for interpolation at the end.

The inflation rate is the ratio between the start index value and the interpolated end observations. The month is typically one month after the month of the end observation.

Returns:
the value of the property, not null
• #### getWeight

public double getWeight()
Gets the positive weight used when interpolating.

Given two price index observations, typically in adjacent months, the weight is used to determine the adjusted index value. The value is given by the formula (weight * price_index_1 + (1 - weight) * price_index_2).

Returns:
the value of the property
• #### 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