public interface OvernightIndexRates extends MarketDataView, ParameterizedData
This provides historic and forward rates for a single OvernightIndex, such as 'EUR-EONIA'.
| 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.
|
OvernightIndex |
getIndex()
Gets the Overnight index.
|
static OvernightIndexRates |
of(OvernightIndex index,
LocalDate valuationDate,
Curve forwardCurve)
Obtains an instance from a forward curve, with an empty time-series of fixings.
|
static OvernightIndexRates |
of(OvernightIndex index,
LocalDate valuationDate,
Curve forwardCurve,
LocalDateDoubleTimeSeries fixings)
Obtains an instance from a curve and 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.
|
OvernightIndexRates |
withParameter(int parameterIndex,
double newValue) |
OvernightIndexRates |
withPerturbation(ParameterPerturbation perturbation) |
findData, getValuationDatefindParameterIndex, getParameter, getParameterCount, getParameterMetadatastatic OvernightIndexRates of(OvernightIndex index, LocalDate valuationDate, Curve forwardCurve)
The curve is specified by an instance of Curve, such as InterpolatedNodalCurve.
The curve must have x-values of year fractions with
the day count specified. The y-values must be zero rates
or discount factors.
index - the indexvaluationDate - the valuation date for which the curve is validforwardCurve - the forward curvestatic OvernightIndexRates of(OvernightIndex index, LocalDate valuationDate, Curve forwardCurve, LocalDateDoubleTimeSeries fixings)
The curve is specified by an instance of Curve, such as InterpolatedNodalCurve.
The curve must have x-values of year fractions with
the day count specified. The y-values must be zero rates
or discount factors.
index - the indexvaluationDate - the valuation date for which the curve is validforwardCurve - the forward curvefixings - the time-series of fixingsOvernightIndex 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.
OvernightIndexRates withParameter(int parameterIndex, double newValue)
withParameter in interface ParameterizedDataOvernightIndexRates withPerturbation(ParameterPerturbation perturbation)
withPerturbation in interface ParameterizedDatadouble rate(OvernightIndexObservation observation)
The 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.
observation - the rate observation, including the fixing dateRuntimeException - if the value cannot be obtaineddouble rateIgnoringFixings(OvernightIndexObservation observation)
rate(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.
observation - the rate observation, including the fixing datePointSensitivityBuilder ratePointSensitivity(OvernightIndexObservation 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.
Otherwise, the sensitivity has the value 1.
The sensitivity refers to the result of rate(OvernightIndexObservation).
observation - the rate observation, including the fixing dateRuntimeException - if the result cannot be calculatedPointSensitivityBuilder rateIgnoringFixingsPointSensitivity(OvernightIndexObservation observation)
ratePointSensitivity(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.
observation - the rate observation, including the fixing datedouble periodRate(OvernightIndexObservation startDateObservation, LocalDate endDate)
The 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.
startDateObservation - the rate observation for the start of the periodendDate - the end or maturity date of the period on which the rate is computedRuntimeException - if the value cannot be obtainedPointSensitivityBuilder periodRatePointSensitivity(OvernightIndexObservation startDateObservation, LocalDate endDate)
This returns a sensitivity instance referring to the points that were queried in the market data.
The sensitivity refers to the result of periodRate(OvernightIndexObservation, LocalDate).
startDateObservation - the rate observation for the start of the periodendDate - the end or maturity date of the period on which the rate is computedRuntimeException - if the result cannot be calculatedCurrencyParameterSensitivities parameterSensitivity(OvernightRateSensitivity 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(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.
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.