## Class CalibrationMeasures

• public final class CalibrationMeasures
extends Object

The most commonly used measures are par spread and converted present value.

• ### Field Summary

Fields
Modifier and Type Field 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.
• ### Method Summary

All Methods
Modifier and Type Method 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()
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.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
• ### Field Detail

public static final CalibrationMeasures PAR_SPREAD
The par spread instance, which is the default used in curve calibration.

This computes par spread for Term Deposits, IborFixingDeposit, FRA, Ibor Futures Swap and FX Swap by discounting.

• #### MARKET_QUOTE

public static final CalibrationMeasures MARKET_QUOTE
The market quote instance, which is the default used in synthetic curve calibration.

This computes par rate for Term Deposits, IborFixingDeposit, FRA and Swap by discounting, and price Ibor Futures by discounting.

• #### PRESENT_VALUE

public static final CalibrationMeasures PRESENT_VALUE
The present value instance, which is the default used in present value sensitivity to market quote stored during curve calibration.

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.

• ### Method Detail

• #### of

public static CalibrationMeasures of​(String name,
List<? extends CalibrationMeasure<? extends ResolvedTrade>> measures)
Obtains an instance from a list of individual trade-specific measures.

Each measure must be for a different trade type.

Parameters:
name - the name of the set of measures
measures - the list of measures
Returns:
the calibration measures
Throws:
IllegalArgumentException - if a trade type is specified more than once
• #### of

@SafeVarargs
public static CalibrationMeasures of​(String name,
CalibrationMeasure<? extends ResolvedTrade>... measures)
Obtains an instance from a list of individual trade-specific measures.

Each measure must be for a different trade type.

Parameters:
name - the name of the set of measures
measures - the list of measures
Returns:
the calibration measures
Throws:
IllegalArgumentException - if a trade type is specified more than once
• #### getName

public String getName()
Gets the name of the set of measures.
Returns:
the name

public ImmutableSet<Class<?>> getTradeTypes()
Returns:
• #### value

public double value​(ResolvedTrade trade,
RatesProvider provider)
Calculates the value, such as par spread.

The value must be calculated using the specified rates provider.

Parameters:
trade - the trade
provider - the rates provider
Returns:
the sensitivity
Throws:
IllegalArgumentException - if the trade cannot be valued
• #### derivative

public DoubleArray derivative​(ResolvedTrade trade,
RatesProvider provider,
List<CurveParameterSize> curveOrder)
Calculates the sensitivity with respect to the rates provider.

The result array is composed of the concatenated curve sensitivities from all curves currently being processed.

Parameters:
trade - the trade
provider - the rates provider
curveOrder - the order of the curves
Returns:
the sensitivity derivative
• #### toString

public String toString()
Overrides:
toString in class Object