public final class DirectIborCapletFloorletFlatVolatilityDefinition extends Object implements IborCapletFloorletVolatilityDefinition, org.joda.beans.ImmutableBean, Serializable
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 by CurveInterpolator
.
The penalty defined in this class is based on the finite difference approximation of the second order derivatives
along time dimension. See PenaltyMatrixGenerator
for detail.
Modifier and Type | Class and Description |
---|---|
static class |
DirectIborCapletFloorletFlatVolatilityDefinition.Builder
The bean-builder for
DirectIborCapletFloorletFlatVolatilityDefinition . |
static class |
DirectIborCapletFloorletFlatVolatilityDefinition.Meta
The meta-bean for
DirectIborCapletFloorletFlatVolatilityDefinition . |
Modifier and Type | Method and Description |
---|---|
static DirectIborCapletFloorletFlatVolatilityDefinition.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
DoubleMatrix |
computePenaltyMatrix(DoubleArray expiries)
Computes penalty matrix.
|
CurveMetadata |
createCurveMetadata(RawOptionData capFloorData)
Creates curve metadata.
|
SurfaceMetadata |
createMetadata(RawOptionData capFloorData)
Creates surface metadata.
|
boolean |
equals(Object obj) |
DayCount |
getDayCount()
Gets the day count to measure the time.
|
CurveExtrapolator |
getExtrapolatorLeft()
Gets the extrapolator for the caplet volatilities on the left.
|
CurveExtrapolator |
getExtrapolatorRight()
Gets the extrapolator for the caplet volatilities on the right.
|
IborIndex |
getIndex()
Gets the Ibor index for which the data is valid.
|
CurveInterpolator |
getInterpolator()
Gets the interpolator for the caplet volatilities.
|
double |
getLambda()
Gets penalty intensity parameter.
|
IborCapletFloorletVolatilitiesName |
getName()
Gets the name of the volatilities.
|
int |
hashCode() |
static DirectIborCapletFloorletFlatVolatilityDefinition.Meta |
meta()
The meta-bean for
DirectIborCapletFloorletFlatVolatilityDefinition . |
DirectIborCapletFloorletFlatVolatilityDefinition.Meta |
metaBean() |
static DirectIborCapletFloorletFlatVolatilityDefinition |
of(IborCapletFloorletVolatilitiesName name,
IborIndex index,
DayCount dayCount,
double lambda,
CurveInterpolator interpolator)
Obtains an instance with flat extrapolators.
|
static DirectIborCapletFloorletFlatVolatilityDefinition |
of(IborCapletFloorletVolatilitiesName name,
IborIndex index,
DayCount dayCount,
double lambda,
CurveInterpolator interpolator,
CurveExtrapolator extrapolatorLeft,
CurveExtrapolator extrapolatorRight)
Obtains an instance.
|
DirectIborCapletFloorletFlatVolatilityDefinition.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
createCap
public static DirectIborCapletFloorletFlatVolatilityDefinition of(IborCapletFloorletVolatilitiesName name, IborIndex index, DayCount dayCount, double lambda, CurveInterpolator interpolator)
name
- the name of the volatilitiesindex
- the Ibor indexdayCount
- the day count to uselambda
- the penalty intensity parameterinterpolator
- the interpolatorpublic static DirectIborCapletFloorletFlatVolatilityDefinition of(IborCapletFloorletVolatilitiesName name, IborIndex index, DayCount dayCount, double lambda, CurveInterpolator interpolator, CurveExtrapolator extrapolatorLeft, CurveExtrapolator extrapolatorRight)
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 rightpublic SurfaceMetadata createMetadata(RawOptionData capFloorData)
IborCapletFloorletVolatilityDefinition
createMetadata
in interface IborCapletFloorletVolatilityDefinition
capFloorData
- the cap/floor datapublic CurveMetadata createCurveMetadata(RawOptionData capFloorData)
capFloorData
- the datapublic DoubleMatrix computePenaltyMatrix(DoubleArray expiries)
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.
expiries
- the expiriespublic static DirectIborCapletFloorletFlatVolatilityDefinition.Meta meta()
DirectIborCapletFloorletFlatVolatilityDefinition
.public static DirectIborCapletFloorletFlatVolatilityDefinition.Builder builder()
public DirectIborCapletFloorletFlatVolatilityDefinition.Meta metaBean()
metaBean
in interface org.joda.beans.Bean
public IborCapletFloorletVolatilitiesName getName()
getName
in interface IborCapletFloorletVolatilityDefinition
public IborIndex getIndex()
getIndex
in interface IborCapletFloorletVolatilityDefinition
public DayCount getDayCount()
getDayCount
in interface IborCapletFloorletVolatilityDefinition
public double getLambda()
public CurveInterpolator getInterpolator()
public CurveExtrapolator getExtrapolatorLeft()
public CurveExtrapolator getExtrapolatorRight()
public DirectIborCapletFloorletFlatVolatilityDefinition.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.