public final class SimpleIborIndexRates extends Object implements IborIndexRates, org.joda.beans.ImmutableBean, Serializable
This provides historic and forward rates for a single IborIndex, such as 'GBP-LIBOR-3M'.
This implementation is based on an underlying curve that is stored with fixing and direct forward rates.
| Modifier and Type | Class and Description |
|---|---|
static class |
SimpleIborIndexRates.Meta
The meta-bean for
SimpleIborIndexRates. |
| 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) |
OptionalInt |
findParameterIndex(ParameterMetadata metadata) |
Curve |
getCurve()
Gets the underlying forward curve.
|
LocalDateDoubleTimeSeries |
getFixings()
Gets the time-series of fixings, defaulted to an empty time-series.
|
IborIndex |
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 SimpleIborIndexRates.Meta |
meta()
The meta-bean for
SimpleIborIndexRates. |
SimpleIborIndexRates.Meta |
metaBean() |
static SimpleIborIndexRates |
of(IborIndex index,
LocalDate valuationDate,
Curve curve)
Obtains an instance from a curve, with an empty time-series of fixings.
|
static SimpleIborIndexRates |
of(IborIndex index,
LocalDate valuationDate,
Curve curve,
LocalDateDoubleTimeSeries fixings)
Obtains an instance from a curve and time-series of fixing.
|
CurrencyParameterSensitivities |
parameterSensitivity(IborRateSensitivity pointSensitivity)
Calculates the parameter sensitivity from the point sensitivity.
|
double |
rate(IborIndexObservation observation)
Gets the historic or forward rate at the specified fixing date.
|
double |
rateIgnoringFixings(IborIndexObservation 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(IborIndexObservation 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(IborIndexObservation observation)
Calculates the point sensitivity of the historic or forward rate at the specified fixing date.
|
String |
toString() |
SimpleIborIndexRates |
withCurve(Curve curve)
Returns a new instance with a different curve.
|
SimpleIborIndexRates |
withParameter(int parameterIndex,
double newValue) |
SimpleIborIndexRates |
withPerturbation(ParameterPerturbation perturbation) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitexplainRatepublic static SimpleIborIndexRates of(IborIndex index, LocalDate valuationDate, Curve curve)
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 forward rates.
A suitable metadata instance for the curve can be created by Curves.forwardRates(String, DayCount).
In the curve the Ibor rates are indexed by the maturity date.
of in interface IborIndexRatesindex - the indexvaluationDate - the valuation date for which the curve is validcurve - the curve of forward ratespublic static SimpleIborIndexRates of(IborIndex index, LocalDate valuationDate, Curve curve, 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 forward rates.
In the curve the Ibor rates are indexed by the maturity date.
of in interface IborIndexRatesindex - the indexvaluationDate - the valuation date for which the curve is validcurve - the curve of forward ratesfixings - 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 OptionalInt findParameterIndex(ParameterMetadata metadata)
findParameterIndex in interface ParameterizedDatapublic SimpleIborIndexRates withParameter(int parameterIndex, double newValue)
withParameter in interface ParameterizedDatawithParameter in interface IborIndexRatespublic SimpleIborIndexRates withPerturbation(ParameterPerturbation perturbation)
withPerturbation in interface ParameterizedDatawithPerturbation in interface IborIndexRatespublic double rate(IborIndexObservation observation)
IborIndexRatesThe rate of the Ibor index, such as 'GBP-LIBOR-3M', 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.
rate in interface IborIndexRatesobservation - the rate observation, including the fixing datepublic double rateIgnoringFixings(IborIndexObservation observation)
IborIndexRatesrate(IborIndexObservation).
An instance of IborIndexRates 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 IborIndexRatesobservation - the rate observation, including the fixing datepublic PointSensitivityBuilder ratePointSensitivity(IborIndexObservation observation)
IborIndexRates
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 rate(IborIndexObservation).
ratePointSensitivity in interface IborIndexRatesobservation - the rate observation, including the fixing datepublic PointSensitivityBuilder rateIgnoringFixingsPointSensitivity(IborIndexObservation observation)
IborIndexRatesratePointSensitivity(IborIndexObservation).
An instance of IborIndexRates 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 IborIndexRatesobservation - the rate observation, including the fixing datepublic CurrencyParameterSensitivities parameterSensitivity(IborRateSensitivity pointSensitivity)
IborIndexRatesThis is used to convert a single point sensitivity to parameter sensitivity. The calculation typically involves multiplying the point and unit sensitivities.
parameterSensitivity in interface IborIndexRatespointSensitivity - the point sensitivity to convertpublic CurrencyParameterSensitivities createParameterSensitivity(Currency currency, DoubleArray sensitivities)
IborIndexRates
In most cases, IborIndexRates.parameterSensitivity(IborRateSensitivity) 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 IborIndexRatescurrency - the currencysensitivities - the sensitivity values, which must match the parameter countpublic SimpleIborIndexRates withCurve(Curve curve)
curve - the new curvepublic static SimpleIborIndexRates.Meta meta()
SimpleIborIndexRates.public SimpleIborIndexRates.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic IborIndex getIndex()
getIndex in interface IborIndexRatespublic LocalDate getValuationDate()
getValuationDate in interface MarketDataViewpublic Curve getCurve()
public LocalDateDoubleTimeSeries getFixings()
getFixings in interface IborIndexRatesCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.