public final class HistoricOvernightIndexRates extends Object implements OvernightIndexRates, 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 |
HistoricOvernightIndexRates.Meta
The meta-bean for
HistoricOvernightIndexRates. |
| 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 time-series of fixings, defaulted to an empty time-series.
|
OvernightIndex |
getIndex()
Gets the index that the rates are for.
|
double |
getParameter(int parameterIndex) |
int |
getParameterCount() |
ParameterMetadata |
getParameterMetadata(int parameterIndex) |
LocalDate |
getValuationDate()
Gets the valuation date.
|
int |
hashCode() |
static HistoricOvernightIndexRates.Meta |
meta()
The meta-bean for
HistoricOvernightIndexRates. |
HistoricOvernightIndexRates.Meta |
metaBean() |
static HistoricOvernightIndexRates |
of(OvernightIndex index,
LocalDate valuationDate,
LocalDateDoubleTimeSeries fixings)
Obtains an instance from a time-series of fixings.
|
CurrencyParameterSensitivities |
parameterSensitivity(OvernightRateSensitivity pointSensitivity)
Calculates the parameter sensitivity from the point sensitivity.
|
double |
periodRate(OvernightIndexObservation startDateObservation,
LocalDate endDate)
Gets the historic or forward rate at the specified fixing period.
|
PointSensitivityBuilder |
periodRatePointSensitivity(OvernightIndexObservation startDateObservation,
LocalDate endDate)
Calculates the point sensitivity of the historic or forward rate at the specified fixing period.
|
double |
rate(OvernightIndexObservation observation)
Gets the historic or forward rate at the specified fixing date.
|
double |
rateIgnoringFixings(OvernightIndexObservation observation)
Ignores the time-series of fixings to get the forward rate at the specified
fixing date, used in rare and special cases.
|
PointSensitivityBuilder |
rateIgnoringFixingsPointSensitivity(OvernightIndexObservation observation)
Ignores the time-series of fixings to get the forward rate point sensitivity at the
specified fixing date, used in rare and special cases.
|
PointSensitivityBuilder |
ratePointSensitivity(OvernightIndexObservation observation)
Calculates the point sensitivity of the historic or forward rate at the specified fixing date.
|
String |
toString() |
HistoricOvernightIndexRates |
withParameter(int parameterIndex,
double newValue) |
HistoricOvernightIndexRates |
withPerturbation(ParameterPerturbation perturbation) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitof, offindParameterIndexpublic static HistoricOvernightIndexRates of(OvernightIndex 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 HistoricOvernightIndexRates withParameter(int parameterIndex, double newValue)
withParameter in interface ParameterizedDatawithParameter in interface OvernightIndexRatespublic HistoricOvernightIndexRates withPerturbation(ParameterPerturbation perturbation)
withPerturbation in interface ParameterizedDatawithPerturbation in interface OvernightIndexRatespublic double rate(OvernightIndexObservation observation)
OvernightIndexRatesThe rate of the Overnight index, such as 'EUR-EONIA', varies over time. This method obtains the actual or estimated rate for the fixing date.
This retrieves the actual rate if the fixing date is before the valuation date, or the estimated rate if the fixing date is after the valuation date. If the fixing date equals the valuation date, then the best available rate is returned. The reference period for the underlying deposit is computed from the index conventions.
rate in interface OvernightIndexRatesobservation - the rate observation, including the fixing datepublic double rateIgnoringFixings(OvernightIndexObservation observation)
OvernightIndexRatesrate(OvernightIndexObservation).
An instance of OvernightIndexRates is typically based on a forward curve and a historic time-series.
The rate(LocalDate) method uses either the curve or time-series, depending on whether the
fixing date is before or after the valuation date. This method only queries the forward curve,
totally ignoring the time-series, which is needed for rare and special cases only.
rateIgnoringFixings in interface OvernightIndexRatesobservation - the rate observation, including the fixing datepublic PointSensitivityBuilder ratePointSensitivity(OvernightIndexObservation observation)
OvernightIndexRates
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.
Otherwise, the sensitivity has the value 1.
The sensitivity refers to the result of OvernightIndexRates.rate(OvernightIndexObservation).
ratePointSensitivity in interface OvernightIndexRatesobservation - the rate observation, including the fixing datepublic PointSensitivityBuilder rateIgnoringFixingsPointSensitivity(OvernightIndexObservation observation)
OvernightIndexRatesratePointSensitivity(OvernightIndexObservation).
An instance of OvernightIndexRates is typically based on a forward curve and a historic time-series.
The ratePointSensitivity(LocalDate) method uses either the curve or time-series, depending on whether the
fixing date is before or after the valuation date. This method only queries the forward curve,
totally ignoring the time-series, which is needed for rare and special cases only.
rateIgnoringFixingsPointSensitivity in interface OvernightIndexRatesobservation - the rate observation, including the fixing datepublic double periodRate(OvernightIndexObservation startDateObservation, LocalDate endDate)
OvernightIndexRatesThe start date should be on or after the valuation date. The end date should be after the start date.
This computes the forward rate in the simple simply compounded convention of the index between two given date.
This is used mainly to speed-up computation by computing the rate on a longer period instead of each individual
overnight rate. When data related to the overnight index rate are stored based on the fixing date and not
the start and end date of the period, the call may return an IllegalArgumentException.
periodRate in interface OvernightIndexRatesstartDateObservation - the rate observation for the start of the periodendDate - the end or maturity date of the period on which the rate is computedpublic PointSensitivityBuilder periodRatePointSensitivity(OvernightIndexObservation startDateObservation, LocalDate endDate)
OvernightIndexRates
This returns a sensitivity instance referring to the points that were queried in the market data.
The sensitivity refers to the result of OvernightIndexRates.periodRate(OvernightIndexObservation, LocalDate).
periodRatePointSensitivity in interface OvernightIndexRatesstartDateObservation - the rate observation for the start of the periodendDate - the end or maturity date of the period on which the rate is computedpublic CurrencyParameterSensitivities parameterSensitivity(OvernightRateSensitivity pointSensitivity)
OvernightIndexRatesThis is used to convert a single point sensitivity to parameter sensitivity. The calculation typically involves multiplying the point and unit sensitivities.
parameterSensitivity in interface OvernightIndexRatespointSensitivity - the point sensitivity to convertpublic CurrencyParameterSensitivities createParameterSensitivity(Currency currency, DoubleArray sensitivities)
OvernightIndexRates
In most cases, OvernightIndexRates.parameterSensitivity(OvernightRateSensitivity) 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 rates are based on a single forward
curve, then there will be one CurrencyParameterSensitivity in the result.
createParameterSensitivity in interface OvernightIndexRatescurrency - the currencysensitivities - the sensitivity values, which must match the parameter countpublic static HistoricOvernightIndexRates.Meta meta()
HistoricOvernightIndexRates.public HistoricOvernightIndexRates.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic OvernightIndex getIndex()
getIndex in interface OvernightIndexRatespublic LocalDate getValuationDate()
getValuationDate in interface MarketDataViewpublic LocalDateDoubleTimeSeries getFixings()
getFixings in interface OvernightIndexRatesCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.