public final class FxForwardSensitivity extends Object implements PointSensitivity, PointSensitivityBuilder, org.joda.beans.ImmutableBean, Serializable
Holds the sensitivity to the curves associated with CurrencyPair
at a reference date.
Modifier and Type | Class and Description |
---|---|
static class |
FxForwardSensitivity.Meta
The meta-bean for
FxForwardSensitivity . |
Modifier and Type | Method and Description |
---|---|
MutablePointSensitivities |
buildInto(MutablePointSensitivities combination) |
FxForwardSensitivity |
cloned() |
int |
compareKey(PointSensitivity other) |
FxForwardSensitivity |
convertedTo(Currency resultCurrency,
FxRateProvider rateProvider) |
boolean |
equals(Object obj) |
Currency |
getCurrency()
Gets the currency of the sensitivity.
|
CurrencyPair |
getCurrencyPair()
Gets the currency pair for which the sensitivity is computed.
|
Currency |
getReferenceCounterCurrency()
Gets the currency counter to the reference currency.
|
Currency |
getReferenceCurrency()
Gets the reference currency.
|
LocalDate |
getReferenceDate()
Gets the date to query the rate for.
|
double |
getSensitivity()
Gets the value of the sensitivity.
|
int |
hashCode() |
FxForwardSensitivity |
mapSensitivity(DoubleUnaryOperator operator) |
static FxForwardSensitivity.Meta |
meta()
The meta-bean for
FxForwardSensitivity . |
FxForwardSensitivity.Meta |
metaBean() |
FxForwardSensitivity |
multipliedBy(double factor) |
FxForwardSensitivity |
normalize() |
static FxForwardSensitivity |
of(CurrencyPair currencyPair,
Currency referenceCurrency,
LocalDate referenceDate,
Currency sensitivityCurrency,
double sensitivity)
Obtains an instance from currency pair, reference currency, reference date
sensitivity currency and sensitivity value.
|
static FxForwardSensitivity |
of(CurrencyPair currencyPair,
Currency referenceCurrency,
LocalDate referenceDate,
double sensitivity)
Obtains an instance from currency pair, reference currency, reference date and sensitivity value.
|
String |
toString() |
FxForwardSensitivity |
withCurrency(Currency currency) |
FxForwardSensitivity |
withSensitivity(double sensitivity) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
build, combinedWith, none, of, of
public static FxForwardSensitivity of(CurrencyPair currencyPair, Currency referenceCurrency, LocalDate referenceDate, double sensitivity)
The sensitivity currency is defaulted to be a currency of the currency pair that is not the reference currency.
currencyPair
- the currency pairreferenceCurrency
- the reference currencyreferenceDate
- the reference datesensitivity
- the value of the sensitivitypublic static FxForwardSensitivity of(CurrencyPair currencyPair, Currency referenceCurrency, LocalDate referenceDate, Currency sensitivityCurrency, double sensitivity)
currencyPair
- the currency pairreferenceCurrency
- the reference currencyreferenceDate
- the reference datesensitivityCurrency
- the currency of the sensitivitysensitivity
- the value of the sensitivitypublic Currency getReferenceCounterCurrency()
The currency pair contains two currencies. One is the reference currency. This method returns the other.
public FxForwardSensitivity withCurrency(Currency currency)
withCurrency
in interface PointSensitivity
withCurrency
in interface PointSensitivityBuilder
public FxForwardSensitivity withSensitivity(double sensitivity)
withSensitivity
in interface PointSensitivity
public int compareKey(PointSensitivity other)
compareKey
in interface PointSensitivity
public FxForwardSensitivity convertedTo(Currency resultCurrency, FxRateProvider rateProvider)
convertedTo
in interface FxConvertible<PointSensitivity>
convertedTo
in interface PointSensitivity
public FxForwardSensitivity multipliedBy(double factor)
multipliedBy
in interface PointSensitivityBuilder
public FxForwardSensitivity mapSensitivity(DoubleUnaryOperator operator)
mapSensitivity
in interface PointSensitivityBuilder
public FxForwardSensitivity normalize()
normalize
in interface PointSensitivityBuilder
public MutablePointSensitivities buildInto(MutablePointSensitivities combination)
buildInto
in interface PointSensitivityBuilder
public FxForwardSensitivity cloned()
cloned
in interface PointSensitivityBuilder
public static FxForwardSensitivity.Meta meta()
FxForwardSensitivity
.public FxForwardSensitivity.Meta metaBean()
metaBean
in interface org.joda.beans.Bean
public CurrencyPair getCurrencyPair()
public Currency getReferenceCurrency()
This is the base currency of the FX conversion that occurs using the currency pair. The reference currency must be one of the two currencies of the currency pair.
public LocalDate getReferenceDate()
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.