public final class FxIndexSensitivity extends Object implements PointSensitivity, PointSensitivityBuilder, org.joda.beans.ImmutableBean, Serializable
Holds the sensitivity to the FxIndex
curve at a fixing date.
Modifier and Type | Class and Description |
---|---|
static class |
FxIndexSensitivity.Meta
The meta-bean for
FxIndexSensitivity . |
Modifier and Type | Method and Description |
---|---|
MutablePointSensitivities |
buildInto(MutablePointSensitivities combination) |
FxIndexSensitivity |
cloned() |
int |
compareKey(PointSensitivity other) |
FxIndexSensitivity |
convertedTo(Currency resultCurrency,
FxRateProvider rateProvider) |
boolean |
equals(Object obj) |
Currency |
getCurrency()
Gets the currency of the sensitivity.
|
FxIndex |
getIndex()
Gets the FX index that the sensitivity refers to.
|
FxIndexObservation |
getObservation()
Gets the FX rate observation.
|
Currency |
getReferenceCurrency()
Gets the reference currency.
|
double |
getSensitivity()
Gets the value of the sensitivity.
|
int |
hashCode() |
FxIndexSensitivity |
mapSensitivity(DoubleUnaryOperator operator) |
static FxIndexSensitivity.Meta |
meta()
The meta-bean for
FxIndexSensitivity . |
FxIndexSensitivity.Meta |
metaBean() |
FxIndexSensitivity |
multipliedBy(double factor) |
FxIndexSensitivity |
normalize() |
static FxIndexSensitivity |
of(FxIndexObservation observation,
Currency referenceCurrency,
Currency sensitivityCurrency,
double sensitivity)
Obtains an instance from the observation, reference currency and sensitivity value,
specifying the currency of the value.
|
static FxIndexSensitivity |
of(FxIndexObservation observation,
Currency referenceCurrency,
double sensitivity)
Obtains an instance from the observation, reference currency and sensitivity value.
|
FxForwardSensitivity |
toFxForwardSensitivity()
Converts this sensitivity to an
FxForwardSensitivity . |
String |
toString() |
FxIndexSensitivity |
withCurrency(Currency currency) |
FxIndexSensitivity |
withSensitivity(double sensitivity) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
build, combinedWith, none, of, of
public static FxIndexSensitivity of(FxIndexObservation observation, Currency referenceCurrency, double sensitivity)
The sensitivity currency is defaulted to be the counter currency of queried currency pair.
observation
- the rate observation, including the fixing datereferenceCurrency
- the reference currencysensitivity
- the value of the sensitivitypublic static FxIndexSensitivity of(FxIndexObservation observation, Currency referenceCurrency, Currency sensitivityCurrency, double sensitivity)
observation
- the rate observation, including the fixing datereferenceCurrency
- the reference currencysensitivityCurrency
- the currency of the sensitivitysensitivity
- the value of the sensitivitypublic FxForwardSensitivity toFxForwardSensitivity()
FxForwardSensitivity
.
The time series, fixing date and FX index are lost by this conversion.
Instead, maturity date and currency pair are contained in FxForwardSensitivity
.
public FxIndex getIndex()
public FxIndexSensitivity withCurrency(Currency currency)
withCurrency
in interface PointSensitivity
withCurrency
in interface PointSensitivityBuilder
public FxIndexSensitivity withSensitivity(double sensitivity)
withSensitivity
in interface PointSensitivity
public int compareKey(PointSensitivity other)
compareKey
in interface PointSensitivity
public FxIndexSensitivity convertedTo(Currency resultCurrency, FxRateProvider rateProvider)
convertedTo
in interface FxConvertible<PointSensitivity>
convertedTo
in interface PointSensitivity
public FxIndexSensitivity multipliedBy(double factor)
multipliedBy
in interface PointSensitivityBuilder
public FxIndexSensitivity mapSensitivity(DoubleUnaryOperator operator)
mapSensitivity
in interface PointSensitivityBuilder
public FxIndexSensitivity normalize()
normalize
in interface PointSensitivityBuilder
public MutablePointSensitivities buildInto(MutablePointSensitivities combination)
buildInto
in interface PointSensitivityBuilder
public FxIndexSensitivity cloned()
cloned
in interface PointSensitivityBuilder
public static FxIndexSensitivity.Meta meta()
FxIndexSensitivity
.public FxIndexSensitivity.Meta metaBean()
metaBean
in interface org.joda.beans.Bean
public FxIndexObservation getObservation()
This includes the index and fixing date.
public Currency getReferenceCurrency()
This is the base currency of the FX conversion that occurs using the index. The reference currency must be one of the two currencies of the index.
public Currency getCurrency()
getCurrency
in interface PointSensitivity
public double getSensitivity()
getSensitivity
in interface PointSensitivity
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.