public interface PriceIndexValues extends MarketDataView, ParameterizedData
This provides historic and forward values for a single PriceIndex, such as 'US-CPI-U'.
This is typically used in inflation products.
| Modifier and Type | Method and Description |
|---|---|
CurrencyParameterSensitivities |
createParameterSensitivity(Currency currency,
DoubleArray sensitivities)
Creates the parameter sensitivity when the sensitivity values are known.
|
LocalDateDoubleTimeSeries |
getFixings()
Gets the time-series of fixings for the index.
|
PriceIndex |
getIndex()
Gets the Price index.
|
static PriceIndexValues |
of(PriceIndex index,
LocalDate valuationDate,
Curve forwardCurve,
LocalDateDoubleTimeSeries fixings)
Obtains an instance from a curve and time-series of fixings.
|
CurrencyParameterSensitivities |
parameterSensitivity(InflationRateSensitivity pointSensitivity)
Calculates the parameter sensitivity from the point sensitivity.
|
double |
value(PriceIndexObservation observation)
Gets the historic or forward rate at the specified fixing month.
|
PointSensitivityBuilder |
valuePointSensitivity(PriceIndexObservation observation)
Calculates the point sensitivity of the historic or forward value at the specified fixing month.
|
PriceIndexValues |
withParameter(int parameterIndex,
double newValue) |
PriceIndexValues |
withPerturbation(ParameterPerturbation perturbation) |
findData, getValuationDatefindParameterIndex, getParameter, getParameterCount, getParameterMetadatastatic PriceIndexValues of(PriceIndex index, LocalDate valuationDate, Curve forwardCurve, LocalDateDoubleTimeSeries fixings)
The only supported implementation at present is SimplePriceIndexValues.
The curve must have x-values of months.
The y-values must be price index values.
The fixings time-series must not be empty.
index - the indexvaluationDate - the valuation date for which the curve is validforwardCurve - the forward curvefixings - the time-series of fixingsPriceIndex getIndex()
The index that the rates are for.
LocalDateDoubleTimeSeries getFixings()
The time-series contains historic fixings of the index. It may be empty if the data is not available.
PriceIndexValues withParameter(int parameterIndex, double newValue)
withParameter in interface ParameterizedDataPriceIndexValues withPerturbation(ParameterPerturbation perturbation)
withPerturbation in interface ParameterizedDatadouble value(PriceIndexObservation observation)
The rate of the Price index, such as 'US-CPI-U', varies over time. This method obtains the actual or estimated rate for the month.
This retrieves the actual rate if the fixing month is before the valuation month, or the estimated rate if the fixing month is after the valuation month. If the month equals the valuation month, then the best available value is returned.
observation - the rate observation, including the fixing monthRuntimeException - if the value cannot be obtainedPointSensitivityBuilder valuePointSensitivity(PriceIndexObservation observation)
This returns a sensitivity instance referring to the points that were queried in the market data.
If a time-series was used, then there is no sensitivity.
The sensitivity refers to the result of value(PriceIndexObservation).
observation - the rate observation, including the fixing monthRuntimeException - if the result cannot be calculatedCurrencyParameterSensitivities parameterSensitivity(InflationRateSensitivity pointSensitivity)
This is used to convert a single point sensitivity to parameter sensitivity. The calculation typically involves multiplying the point and unit sensitivities.
pointSensitivity - the point sensitivity to convertRuntimeException - if the result cannot be calculatedCurrencyParameterSensitivities createParameterSensitivity(Currency currency, DoubleArray sensitivities)
In most cases, parameterSensitivity(InflationRateSensitivity) should be used and manipulated.
However, it can be useful to create parameter sensitivity from pre-computed sensitivity values.
There will typically be one CurrencyParameterSensitivity for each underlying data
structure, such as a curve. For example, if the values are based on a single forward
curve, then there will be one CurrencyParameterSensitivity in the result.
currency - the currencysensitivities - the sensitivity values, which must match the parameter countRuntimeException - if the result cannot be calculatedCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.