public final class CalibrationMeasures extends Object
The most commonly used measures are par spread and converted present value.
| Modifier and Type | Field and Description |
|---|---|
static CalibrationMeasures |
MARKET_QUOTE
The market quote instance, which is the default used in synthetic curve calibration.
|
static CalibrationMeasures |
PAR_SPREAD
The par spread instance, which is the default used in curve calibration.
|
static CalibrationMeasures |
PRESENT_VALUE
The present value instance, which is the default used in present value sensitivity to market quote stored during
curve calibration.
|
| Modifier and Type | Method and Description |
|---|---|
DoubleArray |
derivative(ResolvedTrade trade,
RatesProvider provider,
List<CurveParameterSize> curveOrder)
Calculates the sensitivity with respect to the rates provider.
|
String |
getName()
Gets the name of the set of measures.
|
ImmutableSet<Class<?>> |
getTradeTypes()
Gets the supported trade types.
|
static CalibrationMeasures |
of(String name,
CalibrationMeasure<? extends ResolvedTrade>... measures)
Obtains an instance from a list of individual trade-specific measures.
|
static CalibrationMeasures |
of(String name,
List<? extends CalibrationMeasure<? extends ResolvedTrade>> measures)
Obtains an instance from a list of individual trade-specific measures.
|
String |
toString() |
double |
value(ResolvedTrade trade,
RatesProvider provider)
Calculates the value, such as par spread.
|
public static final CalibrationMeasures PAR_SPREAD
This computes par spread for Term Deposits, IborFixingDeposit, FRA, Ibor Futures Swap and FX Swap by discounting.
public static final CalibrationMeasures MARKET_QUOTE
This computes par rate for Term Deposits, IborFixingDeposit, FRA and Swap by discounting, and price Ibor Futures by discounting.
public static final CalibrationMeasures PRESENT_VALUE
This computes present value for Term Deposits, IborFixingDeposit, FRA and Swap by discounting, and price Ibor Futures by discounting; the derivative is the derivative with respect to the market quotes.
public static CalibrationMeasures of(String name, List<? extends CalibrationMeasure<? extends ResolvedTrade>> measures)
Each measure must be for a different trade type.
name - the name of the set of measuresmeasures - the list of measuresIllegalArgumentException - if a trade type is specified more than once@SafeVarargs public static CalibrationMeasures of(String name, CalibrationMeasure<? extends ResolvedTrade>... measures)
Each measure must be for a different trade type.
name - the name of the set of measuresmeasures - the list of measuresIllegalArgumentException - if a trade type is specified more than oncepublic String getName()
public ImmutableSet<Class<?>> getTradeTypes()
public double value(ResolvedTrade trade, RatesProvider provider)
The value must be calculated using the specified rates provider.
trade - the tradeprovider - the rates providerIllegalArgumentException - if the trade cannot be valuedpublic DoubleArray derivative(ResolvedTrade trade, RatesProvider provider, List<CurveParameterSize> curveOrder)
The result array is composed of the concatenated curve sensitivities from all curves currently being processed.
trade - the tradeprovider - the rates providercurveOrder - the order of the curvesCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.