T - the trade typepublic final class TradeCalibrationMeasure<T extends ResolvedTrade> extends Object implements CalibrationMeasure<T>
This is initialized using functions that typically refer to pricers.
| Modifier and Type | Method and Description |
|---|---|
Class<T> |
getTradeType()
Gets the trade type of the calibrator.
|
static <R extends ResolvedTrade> |
of(String name,
Class<R> tradeType,
ToDoubleBiFunction<R,RatesProvider> valueFn,
BiFunction<R,RatesProvider,PointSensitivities> sensitivityFn)
Obtains a calibrator for a specific type of trade.
|
CurrencyParameterSensitivities |
sensitivities(T trade,
RatesProvider provider)
Calculates the parameter sensitivities that relate to the value.
|
String |
toString() |
double |
value(T trade,
RatesProvider provider)
Calculates the value, such as par spread.
|
public static final TradeCalibrationMeasure<ResolvedFraTrade> FRA_PAR_SPREAD
ResolvedFraTrade using par spread discounting.public static final TradeCalibrationMeasure<ResolvedIborFutureTrade> IBOR_FUTURE_PAR_SPREAD
ResolvedIborFutureTrade using par spread discounting.public static final TradeCalibrationMeasure<ResolvedOvernightFutureTrade> OVERNIGHT_FUTURE_PAR_SPREAD
ResolvedOvernightFutureTrade using par spread discounting.public static final TradeCalibrationMeasure<ResolvedSwapTrade> SWAP_PAR_SPREAD
ResolvedSwapTrade using par spread discounting.public static final TradeCalibrationMeasure<ResolvedIborFixingDepositTrade> IBOR_FIXING_DEPOSIT_PAR_SPREAD
ResolvedIborFixingDepositTrade using par spread discounting.public static final TradeCalibrationMeasure<ResolvedTermDepositTrade> TERM_DEPOSIT_PAR_SPREAD
ResolvedTermDepositTrade using par spread discounting.public static final TradeCalibrationMeasure<ResolvedFxSwapTrade> FX_SWAP_PAR_SPREAD
ResolvedFxSwapTrade using par spread discounting.public static <R extends ResolvedTrade> TradeCalibrationMeasure<R> of(String name, Class<R> tradeType, ToDoubleBiFunction<R,RatesProvider> valueFn, BiFunction<R,RatesProvider,PointSensitivities> sensitivityFn)
The functions typically refer to pricers.
R - the trade typename - the nametradeType - the trade typevalueFn - the function for calculating the valuesensitivityFn - the function for calculating the sensitivitypublic Class<T> getTradeType()
CalibrationMeasuregetTradeType in interface CalibrationMeasure<T extends ResolvedTrade>public double value(T trade, RatesProvider provider)
CalibrationMeasureThe value must be calculated using the specified rates provider.
value in interface CalibrationMeasure<T extends ResolvedTrade>trade - the tradeprovider - the rates providerpublic CurrencyParameterSensitivities sensitivities(T trade, RatesProvider provider)
CalibrationMeasureThe sensitivities must be calculated using the specified rates provider.
sensitivities in interface CalibrationMeasure<T extends ResolvedTrade>trade - the tradeprovider - the rates providerCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.