Class DirectIborCapletFloorletFlatVolatilityDefinition
- java.lang.Object
-
- com.opengamma.strata.pricer.capfloor.DirectIborCapletFloorletFlatVolatilityDefinition
-
- All Implemented Interfaces:
IborCapletFloorletVolatilityDefinition,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class DirectIborCapletFloorletFlatVolatilityDefinition extends Object implements IborCapletFloorletVolatilityDefinition, org.joda.beans.ImmutableBean, Serializable
Definition of caplet volatilities calibration.This definition is used with
DirectIborCapletFloorletFlatVolatilityCalibrator. The volatilities of the constituent caplets in the market caps are "model parameters" and calibrated to the market data under a certain penalty constraint. The resulting volatilities object will be a set of caplet volatilities on the expiry dimension interpolated byCurveInterpolator.The penalty defined in this class is based on the finite difference approximation of the second order derivatives along time dimension. See
PenaltyMatrixGeneratorfor detail.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDirectIborCapletFloorletFlatVolatilityDefinition.BuilderThe bean-builder forDirectIborCapletFloorletFlatVolatilityDefinition.static classDirectIborCapletFloorletFlatVolatilityDefinition.MetaThe meta-bean forDirectIborCapletFloorletFlatVolatilityDefinition.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DirectIborCapletFloorletFlatVolatilityDefinition.Builderbuilder()Returns a builder used to create an instance of the bean.DoubleMatrixcomputePenaltyMatrix(DoubleArray expiries)Computes penalty matrix.CurveMetadatacreateCurveMetadata(RawOptionData capFloorData)Creates curve metadata.SurfaceMetadatacreateMetadata(RawOptionData capFloorData)Creates surface metadata.booleanequals(Object obj)DayCountgetDayCount()Gets the day count to measure the time.CurveExtrapolatorgetExtrapolatorLeft()Gets the extrapolator for the caplet volatilities on the left.CurveExtrapolatorgetExtrapolatorRight()Gets the extrapolator for the caplet volatilities on the right.IborIndexgetIndex()Gets the Ibor index for which the data is valid.CurveInterpolatorgetInterpolator()Gets the interpolator for the caplet volatilities.doublegetLambda()Gets penalty intensity parameter.IborCapletFloorletVolatilitiesNamegetName()Gets the name of the volatilities.inthashCode()static DirectIborCapletFloorletFlatVolatilityDefinition.Metameta()The meta-bean forDirectIborCapletFloorletFlatVolatilityDefinition.DirectIborCapletFloorletFlatVolatilityDefinition.MetametaBean()static DirectIborCapletFloorletFlatVolatilityDefinitionof(IborCapletFloorletVolatilitiesName name, IborIndex index, DayCount dayCount, double lambda, CurveInterpolator interpolator)Obtains an instance with flat extrapolators.static DirectIborCapletFloorletFlatVolatilityDefinitionof(IborCapletFloorletVolatilitiesName name, IborIndex index, DayCount dayCount, double lambda, CurveInterpolator interpolator, CurveExtrapolator extrapolatorLeft, CurveExtrapolator extrapolatorRight)Obtains an instance.DirectIborCapletFloorletFlatVolatilityDefinition.BuildertoBuilder()Returns a builder that allows this bean to be mutated.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.opengamma.strata.pricer.capfloor.IborCapletFloorletVolatilityDefinition
createCap
-
-
-
-
Method Detail
-
of
public static DirectIborCapletFloorletFlatVolatilityDefinition of(IborCapletFloorletVolatilitiesName name, IborIndex index, DayCount dayCount, double lambda, CurveInterpolator interpolator)
Obtains an instance with flat extrapolators.- Parameters:
name- the name of the volatilitiesindex- the Ibor indexdayCount- the day count to uselambda- the penalty intensity parameterinterpolator- the interpolator- Returns:
- the instance
-
of
public static DirectIborCapletFloorletFlatVolatilityDefinition of(IborCapletFloorletVolatilitiesName name, IborIndex index, DayCount dayCount, double lambda, CurveInterpolator interpolator, CurveExtrapolator extrapolatorLeft, CurveExtrapolator extrapolatorRight)
Obtains an instance.- Parameters:
name- the name of the volatilitiesindex- the Ibor indexdayCount- the day count to uselambda- the penalty intensity parameterinterpolator- the surface interpolatorextrapolatorLeft- the extrapolator leftextrapolatorRight- the extrapolator right- Returns:
- the instance
-
createMetadata
public SurfaceMetadata createMetadata(RawOptionData capFloorData)
Description copied from interface:IborCapletFloorletVolatilityDefinitionCreates surface metadata.- Specified by:
createMetadatain interfaceIborCapletFloorletVolatilityDefinition- Parameters:
capFloorData- the cap/floor data- Returns:
- the surface metadata
-
createCurveMetadata
public CurveMetadata createCurveMetadata(RawOptionData capFloorData)
Creates curve metadata.- Parameters:
capFloorData- the data- Returns:
- the curve metadata
-
computePenaltyMatrix
public DoubleMatrix computePenaltyMatrix(DoubleArray expiries)
Computes penalty matrix.The penalty matrix is based on the second order finite difference differentiation in
PenaltyMatrixGenerator. The number of node points must be greater than 2 in order to compute the second order derivative.- Parameters:
expiries- the expiries- Returns:
- the penalty matrix
-
meta
public static DirectIborCapletFloorletFlatVolatilityDefinition.Meta meta()
The meta-bean forDirectIborCapletFloorletFlatVolatilityDefinition.- Returns:
- the meta-bean, not null
-
builder
public static DirectIborCapletFloorletFlatVolatilityDefinition.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public DirectIborCapletFloorletFlatVolatilityDefinition.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getName
public IborCapletFloorletVolatilitiesName getName()
Gets the name of the volatilities.- Specified by:
getNamein interfaceIborCapletFloorletVolatilityDefinition- Returns:
- the value of the property, not null
-
getIndex
public IborIndex getIndex()
Gets the Ibor index for which the data is valid.- Specified by:
getIndexin interfaceIborCapletFloorletVolatilityDefinition- Returns:
- the value of the property, not null
-
getDayCount
public DayCount getDayCount()
Gets the day count to measure the time.- Specified by:
getDayCountin interfaceIborCapletFloorletVolatilityDefinition- Returns:
- the value of the property, not null
-
getLambda
public double getLambda()
Gets penalty intensity parameter.- Returns:
- the value of the property
-
getInterpolator
public CurveInterpolator getInterpolator()
Gets the interpolator for the caplet volatilities.- Returns:
- the value of the property, not null
-
getExtrapolatorLeft
public CurveExtrapolator getExtrapolatorLeft()
Gets the extrapolator for the caplet volatilities on the left.- Returns:
- the value of the property, not null
-
getExtrapolatorRight
public CurveExtrapolator getExtrapolatorRight()
Gets the extrapolator for the caplet volatilities on the right.- Returns:
- the value of the property, not null
-
toBuilder
public DirectIborCapletFloorletFlatVolatilityDefinition.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-