public class DirectIborCapletFloorletFlatVolatilityCalibrator extends Object
The volatilities of the constituent caplets in the market caps are "model parameters" and calibrated to the market data under the penalty constraint. The penalty is based on the second-order finite difference differentiation along the expiry dimension.
The resultant volatility type is the same as the input volatility type. e.g.,
Black caplet volatilities BlackIborCapletFloorletExpiryFlatVolatilities are returned
if Black cap volatilities are plugged in,
and normal caplet volatilities NormalIborCapletFloorletExpiryFlatVolatilities are returned otherwise.
The calibration is conducted once the cap volatilities are converted to cap prices.
Thus the error values in RawOptionData are applied in the price space rather than the volatility space.
public static DirectIborCapletFloorletFlatVolatilityCalibrator standard()
public static DirectIborCapletFloorletFlatVolatilityCalibrator of(VolatilityIborCapFloorLegPricer pricer, double epsilon, ReferenceData referenceData)
The epsilon is the parameter used in NonLinearLeastSquareWithPenalty,
where the iteration stops when certain quantities are smaller than this parameter.
pricer - the cap pricerepsilon - the epsilon parameterreferenceData - the reference datapublic IborCapletFloorletVolatilityCalibrationResult calibrate(IborCapletFloorletVolatilityDefinition definition, ZonedDateTime calibrationDateTime, RawOptionData capFloorData, RatesProvider ratesProvider)
definition - the caplet volatility definitioncalibrationDateTime - the calibration timecapFloorData - the cap dataratesProvider - the rates providerprotected ReferenceData getReferenceData()
protected VolatilityIborCapFloorLegPricer getLegPricer()
protected void reduceRawData(IborCapletFloorletVolatilityDefinition definition, RatesProvider ratesProvider, DoubleArray strikes, DoubleArray volatilityData, DoubleArray errors, LocalDate startDate, LocalDate endDate, SurfaceMetadata metadata, Function<Surface,IborCapletFloorletVolatilities> volatilityFunction, List<Double> timeList, List<Double> strikeList, List<Double> volList, List<ResolvedIborCapFloorLeg> capList, List<Double> priceList, List<Double> errorList)
protected Function<Surface,IborCapletFloorletVolatilities> volatilitiesFunction(IborCapletFloorletVolatilityDefinition definition, ZonedDateTime calibrationDateTime, RawOptionData capFloorData)
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.