public final class HistoricPriceIndexValues extends Object implements PriceIndexValues, org.joda.beans.ImmutableBean, Serializable
This allows the time-series to be queried but not the curve.
| Modifier and Type | Class and Description |
|---|---|
static class |
HistoricPriceIndexValues.Meta
The meta-bean for
HistoricPriceIndexValues. |
| Modifier and Type | Method and Description |
|---|---|
CurrencyParameterSensitivities |
createParameterSensitivity(Currency currency,
DoubleArray sensitivities)
Creates the parameter sensitivity when the sensitivity values are known.
|
boolean |
equals(Object obj) |
<T> Optional<T> |
findData(MarketDataName<T> name) |
LocalDateDoubleTimeSeries |
getFixings()
Gets the monthly time-series of fixings.
|
PriceIndex |
getIndex()
Gets the index that the values are for.
|
double |
getParameter(int parameterIndex) |
int |
getParameterCount() |
ParameterMetadata |
getParameterMetadata(int parameterIndex) |
LocalDate |
getValuationDate()
Gets the valuation date.
|
int |
hashCode() |
static HistoricPriceIndexValues.Meta |
meta()
The meta-bean for
HistoricPriceIndexValues. |
HistoricPriceIndexValues.Meta |
metaBean() |
static HistoricPriceIndexValues |
of(PriceIndex index,
LocalDate valuationDate,
LocalDateDoubleTimeSeries fixings)
Obtains an instance from a time-series of fixings.
|
CurrencyParameterSensitivities |
parameterSensitivity(InflationRateSensitivity pointSensitivity)
Calculates the parameter sensitivity from the point sensitivity.
|
String |
toString() |
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.
|
HistoricPriceIndexValues |
withParameter(int parameterIndex,
double newValue) |
HistoricPriceIndexValues |
withPerturbation(ParameterPerturbation perturbation) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitoffindParameterIndexpublic static HistoricPriceIndexValues of(PriceIndex index, LocalDate valuationDate, LocalDateDoubleTimeSeries fixings)
index - the indexvaluationDate - the valuation date for which the curve is validfixings - the time-series of fixingspublic <T> Optional<T> findData(MarketDataName<T> name)
findData in interface MarketDataViewpublic int getParameterCount()
getParameterCount in interface ParameterizedDatapublic double getParameter(int parameterIndex)
getParameter in interface ParameterizedDatapublic ParameterMetadata getParameterMetadata(int parameterIndex)
getParameterMetadata in interface ParameterizedDatapublic HistoricPriceIndexValues withParameter(int parameterIndex, double newValue)
withParameter in interface ParameterizedDatawithParameter in interface PriceIndexValuespublic HistoricPriceIndexValues withPerturbation(ParameterPerturbation perturbation)
withPerturbation in interface ParameterizedDatawithPerturbation in interface PriceIndexValuespublic double value(PriceIndexObservation observation)
PriceIndexValuesThe 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.
value in interface PriceIndexValuesobservation - the rate observation, including the fixing monthpublic PointSensitivityBuilder valuePointSensitivity(PriceIndexObservation observation)
PriceIndexValues
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 PriceIndexValues.value(PriceIndexObservation).
valuePointSensitivity in interface PriceIndexValuesobservation - the rate observation, including the fixing monthpublic CurrencyParameterSensitivities parameterSensitivity(InflationRateSensitivity pointSensitivity)
PriceIndexValuesThis is used to convert a single point sensitivity to parameter sensitivity. The calculation typically involves multiplying the point and unit sensitivities.
parameterSensitivity in interface PriceIndexValuespointSensitivity - the point sensitivity to convertpublic CurrencyParameterSensitivities createParameterSensitivity(Currency currency, DoubleArray sensitivities)
PriceIndexValues
In most cases, PriceIndexValues.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.
createParameterSensitivity in interface PriceIndexValuescurrency - the currencysensitivities - the sensitivity values, which must match the parameter countpublic static HistoricPriceIndexValues.Meta meta()
HistoricPriceIndexValues.public HistoricPriceIndexValues.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic PriceIndex getIndex()
getIndex in interface PriceIndexValuespublic LocalDate getValuationDate()
getValuationDate in interface MarketDataViewpublic LocalDateDoubleTimeSeries getFixings()
Only one value is stored per month. The value is stored in the time-series on the last date of each month (which may be a non-working day).
getFixings in interface PriceIndexValuesCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.