public final class FxRateShifts extends Object implements ScenarioPerturbation<FxRate>, org.joda.beans.ImmutableBean, Serializable
This class contains shifts, each of which is associated with a scenario and applied to an FX rate based on the shift type.
| Modifier and Type | Class and Description |
|---|---|
static class |
FxRateShifts.Meta
The meta-bean for
FxRateShifts. |
| Modifier and Type | Method and Description |
|---|---|
MarketDataBox<FxRate> |
applyTo(MarketDataBox<FxRate> marketData,
ReferenceData refData) |
boolean |
equals(Object obj) |
CurrencyPair |
getCurrencyPair()
Gets the currency pair for which the shifts are applied.
|
Class<FxRate> |
getMarketDataType() |
int |
getScenarioCount() |
DoubleArray |
getShiftAmount()
Gets the shifts to apply to
FxRate. |
ShiftType |
getShiftType()
Gets the type of shift applied to the FX rate.
|
int |
hashCode() |
static FxRateShifts.Meta |
meta()
The meta-bean for
FxRateShifts. |
FxRateShifts.Meta |
metaBean() |
static FxRateShifts |
of(ShiftType shiftType,
DoubleArray shiftAmount,
CurrencyPair currencyPair)
Creates an instance.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitnonepublic static FxRateShifts of(ShiftType shiftType, DoubleArray shiftAmount, CurrencyPair currencyPair)
shiftType - the shift typeshiftAmount - the shift amountcurrencyPair - the currency pairpublic MarketDataBox<FxRate> applyTo(MarketDataBox<FxRate> marketData, ReferenceData refData)
applyTo in interface ScenarioPerturbation<FxRate>public int getScenarioCount()
getScenarioCount in interface ScenarioPerturbation<FxRate>public Class<FxRate> getMarketDataType()
getMarketDataType in interface ScenarioPerturbation<FxRate>public static FxRateShifts.Meta meta()
FxRateShifts.public FxRateShifts.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic ShiftType getShiftType()
public DoubleArray getShiftAmount()
FxRate.
Each element in the array corresponds to each scenario.
public CurrencyPair getCurrencyPair()
This also defines the direction of the FX rate to be shifted.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.