Class SabrIborCapletFloorletVolatilityBootstrapper
- java.lang.Object
-
- com.opengamma.strata.pricer.capfloor.SabrIborCapletFloorletVolatilityBootstrapper
-
public class SabrIborCapletFloorletVolatilityBootstrapper extends Object
Caplet volatilities calibration to cap volatilities based on SABR model.The SABR model parameters are computed by bootstrapping along the expiry time dimension. The result is a complete set of curves for the SABR parameters spanned by the expiry time. The position of the node points on the resultant curves corresponds to market cap expiries, and are interpolated by a local interpolation scheme. See
SabrIborCapletFloorletVolatilityBootstrapDefinition
for detail.The calibration to SABR is computed once the option volatility date is converted to prices. Thus we should note that the error values in
RawOptionData
are applied in the price space rather than the volatility space.
-
-
Field Summary
Fields Modifier and Type Field Description static SabrIborCapletFloorletVolatilityBootstrapper
DEFAULT
Default implementation.
-
Method Summary
-
-
-
Field Detail
-
DEFAULT
public static final SabrIborCapletFloorletVolatilityBootstrapper DEFAULT
Default implementation.
-
-
Method Detail
-
of
public static SabrIborCapletFloorletVolatilityBootstrapper of(VolatilityIborCapFloorLegPricer pricer, SabrIborCapletFloorletPeriodPricer sabrPeriodPricer, double epsilon, ReferenceData referenceData)
Creates an instance.The epsilon is the parameter used in
NonLinearLeastSquare
, where the iteration stops when certain quantities are smaller than this parameter.- Parameters:
pricer
- the cap/floor pricer to convert quoted volatilities to pricessabrPeriodPricer
- the SABR pricerepsilon
- the epsilon parameterreferenceData
- the reference data- Returns:
- the instance
-
calibrate
public IborCapletFloorletVolatilityCalibrationResult calibrate(IborCapletFloorletVolatilityDefinition definition, ZonedDateTime calibrationDateTime, RawOptionData capFloorData, RatesProvider ratesProvider)
Calibrates caplet volatilities to cap volatilities.- Parameters:
definition
- the caplet volatility definitioncalibrationDateTime
- the calibration timecapFloorData
- the cap dataratesProvider
- the rates provider- Returns:
- the calibration result
-
getReferenceData
protected ReferenceData getReferenceData()
Gets the reference data.- Returns:
- the reference data
-
getLegPricer
protected VolatilityIborCapFloorLegPricer getLegPricer()
Gets the leg pricer.- Returns:
- the leg pricer
-
reduceRawData
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)
-
volatilitiesFunction
protected Function<Surface,IborCapletFloorletVolatilities> volatilitiesFunction(IborCapletFloorletVolatilityDefinition definition, ZonedDateTime calibrationDateTime, RawOptionData capFloorData)
-
-