public final class OvernightRateSensitivity extends Object implements PointSensitivity, PointSensitivityBuilder, org.joda.beans.ImmutableBean, Serializable
Holds the sensitivity to the OvernightIndex curve for a fixing period.
This class handles the common case where the rate for a period is approximated instead of computing the individual rate for each date in the period by storing the end date of the fixing period.
| Modifier and Type | Class and Description |
|---|---|
static class |
OvernightRateSensitivity.Meta
The meta-bean for
OvernightRateSensitivity. |
| Modifier and Type | Method and Description |
|---|---|
MutablePointSensitivities |
buildInto(MutablePointSensitivities combination) |
OvernightRateSensitivity |
cloned() |
int |
compareKey(PointSensitivity other) |
OvernightRateSensitivity |
convertedTo(Currency resultCurrency,
FxRateProvider rateProvider) |
boolean |
equals(Object obj) |
Currency |
getCurrency()
Gets the currency of the sensitivity.
|
LocalDate |
getEndDate()
Gets the end date of the period.
|
OvernightIndex |
getIndex()
Gets the Overnight index that the sensitivity refers to.
|
OvernightIndexObservation |
getObservation()
Gets the Overnight rate observation.
|
double |
getSensitivity()
Gets the value of the sensitivity.
|
int |
hashCode() |
OvernightRateSensitivity |
mapSensitivity(DoubleUnaryOperator operator) |
static OvernightRateSensitivity.Meta |
meta()
The meta-bean for
OvernightRateSensitivity. |
OvernightRateSensitivity.Meta |
metaBean() |
OvernightRateSensitivity |
multipliedBy(double factor) |
OvernightRateSensitivity |
normalize() |
static OvernightRateSensitivity |
of(OvernightIndexObservation observation,
Currency sensitivityCurrency,
double sensitivity)
Obtains an instance from the observation and sensitivity value,
specifying the currency of the value.
|
static OvernightRateSensitivity |
of(OvernightIndexObservation observation,
double sensitivity)
Obtains an instance from the observation and sensitivity value.
|
static OvernightRateSensitivity |
ofPeriod(OvernightIndexObservation observation,
LocalDate endDate,
Currency sensitivityCurrency,
double sensitivity)
Obtains an instance for a period observation of the index from the observation
and sensitivity value, specifying the currency of the value.
|
static OvernightRateSensitivity |
ofPeriod(OvernightIndexObservation observation,
LocalDate endDate,
double sensitivity)
Obtains an instance for a period observation of the index from the observation
and sensitivity value.
|
String |
toString() |
OvernightRateSensitivity |
withCurrency(Currency currency) |
OvernightRateSensitivity |
withSensitivity(double sensitivity) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitbuild, combinedWith, none, of, ofpublic static OvernightRateSensitivity of(OvernightIndexObservation observation, double sensitivity)
The currency is defaulted from the index. The end date will be the maturity date of the observation.
observation - the rate observation, including the fixing datesensitivity - the value of the sensitivitypublic static OvernightRateSensitivity of(OvernightIndexObservation observation, Currency sensitivityCurrency, double sensitivity)
The end date will be the maturity date of the observation.
observation - the rate observation, including the fixing datesensitivityCurrency - the currency of the sensitivitysensitivity - the value of the sensitivitypublic static OvernightRateSensitivity ofPeriod(OvernightIndexObservation observation, LocalDate endDate, double sensitivity)
The currency is defaulted from the index.
observation - the rate observation, including the fixing dateendDate - the end date of the periodsensitivity - the value of the sensitivitypublic static OvernightRateSensitivity ofPeriod(OvernightIndexObservation observation, LocalDate endDate, Currency sensitivityCurrency, double sensitivity)
observation - the rate observation, including the fixing dateendDate - the end date of the periodsensitivityCurrency - the currency of the sensitivitysensitivity - the value of the sensitivitypublic OvernightIndex getIndex()
public OvernightRateSensitivity withCurrency(Currency currency)
withCurrency in interface PointSensitivitywithCurrency in interface PointSensitivityBuilderpublic OvernightRateSensitivity withSensitivity(double sensitivity)
withSensitivity in interface PointSensitivitypublic int compareKey(PointSensitivity other)
compareKey in interface PointSensitivitypublic OvernightRateSensitivity convertedTo(Currency resultCurrency, FxRateProvider rateProvider)
convertedTo in interface FxConvertible<PointSensitivity>convertedTo in interface PointSensitivitypublic OvernightRateSensitivity multipliedBy(double factor)
multipliedBy in interface PointSensitivityBuilderpublic OvernightRateSensitivity mapSensitivity(DoubleUnaryOperator operator)
mapSensitivity in interface PointSensitivityBuilderpublic OvernightRateSensitivity normalize()
normalize in interface PointSensitivityBuilderpublic MutablePointSensitivities buildInto(MutablePointSensitivities combination)
buildInto in interface PointSensitivityBuilderpublic OvernightRateSensitivity cloned()
cloned in interface PointSensitivityBuilderpublic static OvernightRateSensitivity.Meta meta()
OvernightRateSensitivity.public OvernightRateSensitivity.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic OvernightIndexObservation getObservation()
This includes the index and fixing date.
public LocalDate getEndDate()
public Currency getCurrency()
getCurrency in interface PointSensitivitypublic double getSensitivity()
getSensitivity in interface PointSensitivityCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.