Class SurfaceIborCapletFloorletVolatilityBootstrapper
- java.lang.Object
-
- com.opengamma.strata.pricer.capfloor.SurfaceIborCapletFloorletVolatilityBootstrapper
-
public class SurfaceIborCapletFloorletVolatilityBootstrapper extends Object
Caplet volatilities calibration to cap volatilities based on interpolated surface.The caplet volatilities are computed by bootstrapping along the expiry time dimension. The result is an interpolated surface spanned by expiry and strike. The position of the node points on the resultant surface corresponds to last expiry date of market caps. The nodes should be interpolated by a local interpolation scheme along the time direction. See
SurfaceIborCapletFloorletVolatilityBootstrapDefinition
for detail.If the shift curve is not present in
SurfaceIborCapletFloorletBootstrapVolatilityDefinition
, the resultant volatility type is the same as the input volatility type, i.e., Black caplet volatilities are returned if Black cap volatilities are plugged in, and normal caplet volatilities are returned otherwise. On the other hand, if the shift curve is present inSurfaceIborCapletFloorletBootstrapVolatilityDefinition
, Black caplet volatilities are returned for any input volatility type.
-
-
Field Summary
Fields Modifier and Type Field Description static SurfaceIborCapletFloorletVolatilityBootstrapper
DEFAULT
Default implementation.
-
Method Summary
-
-
-
Field Detail
-
DEFAULT
public static final SurfaceIborCapletFloorletVolatilityBootstrapper DEFAULT
Default implementation.
-
-
Method Detail
-
of
public static SurfaceIborCapletFloorletVolatilityBootstrapper of(VolatilityIborCapFloorLegPricer pricer, ReferenceData referenceData)
Creates an instance.- Parameters:
pricer
- the cap pricerreferenceData
- 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)
-
-