Module net.finmath.lib
Class CapletVolatilitiesParametricDisplacedFourParameterAnalytic
java.lang.Object
net.finmath.marketdata.model.volatilities.AbstractVolatilitySurface
net.finmath.marketdata.model.volatilities.AbstractVolatilitySurfaceParametric
net.finmath.marketdata.model.volatilities.CapletVolatilitiesParametricDisplacedFourParameterAnalytic
- All Implemented Interfaces:
Cloneable
,ParameterObject
,VolatilitySurface
public class CapletVolatilitiesParametricDisplacedFourParameterAnalytic
extends AbstractVolatilitySurfaceParametric
A parametric caplet volatility surface created form the four parameter model
for the instantaneous displaced forward rate lognormal volatility given by
\( \sigma(t) = (a + b t) \exp(- c t) + d \).
In other words, the Black volatility of the displaced rate for maturity T is given by
\[ \sqrt{ \frac{1}{T} \int_0^T ((a + b t) \exp(- c t) + d)^2 dt } \].
The displacement may be either set as a fixed parameter (isDisplacementCalibrateable = false) or
as a free parameter (isDisplacementCalibrateable = true). This will alter the behavior of
the getCloneForParameter method which either requires a double[4] or a double[5] argument.
- Version:
- 1.0
- Author:
- Christian Fries
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.finmath.marketdata.model.volatilities.VolatilitySurface
VolatilitySurface.QuotingConvention
-
Constructor Summary
ConstructorsConstructorDescriptionCapletVolatilitiesParametricDisplacedFourParameterAnalytic(String name, LocalDate referenceDate, ForwardCurve forwardCurve, DiscountCurve discountCurve, double displacement, boolean isDisplacementCalibrateable, double a, double b, double c, double d, double timeScaling)
Create a model with parameters a,b,c,d defining a displaced lognormal volatility surface. -
Method Summary
Modifier and TypeMethodDescriptiongetCloneForParameter(double[] value)
Returns a clone of this volatility surface with modified parameters.double[]
Get the current parameter associated with the state of the objects.double
getValue(double maturity, double strike, VolatilitySurface.QuotingConvention quotingConvention)
Returns the price or implied volatility for the corresponding maturity and strike.double
getValue(AnalyticModel model, double maturity, double strike, VolatilitySurface.QuotingConvention quotingConvention)
Returns the price or implied volatility for the corresponding maturity and strike.void
setParameter(double[] parameter)
Set the current parameter and change the state of the objects.Methods inherited from class net.finmath.marketdata.model.volatilities.AbstractVolatilitySurfaceParametric
getCloneCalibrated, getCloneCalibrated, getCloneCalibrated
Methods inherited from class net.finmath.marketdata.model.volatilities.AbstractVolatilitySurface
clone, convertFromTo, convertFromTo, getDaycountConvention, getDiscountCurve, getForwardCurve, getName, getQuotingConvention, getReferenceDate, toString
-
Constructor Details
-
CapletVolatilitiesParametricDisplacedFourParameterAnalytic
public CapletVolatilitiesParametricDisplacedFourParameterAnalytic(String name, LocalDate referenceDate, ForwardCurve forwardCurve, DiscountCurve discountCurve, double displacement, boolean isDisplacementCalibrateable, double a, double b, double c, double d, double timeScaling)Create a model with parameters a,b,c,d defining a displaced lognormal volatility surface.- Parameters:
name
- The name of this volatility surface.referenceDate
- The reference date for this volatility surface, i.e., the date which defined t=0.forwardCurve
- The underlying forward curve.discountCurve
- The associated discount curve.displacement
- The displacement for the forward rate.isDisplacementCalibrateable
- Boolean specifying if the displacement parameter is considered a free parameter of the model.a
- The parameter ab
- The parameter bc
- The parameter cd
- The parameter dtimeScaling
- A scaling factor applied to t when converting from global double time to the parametric function argument t.
-
-
Method Details
-
getValue
public double getValue(double maturity, double strike, VolatilitySurface.QuotingConvention quotingConvention)Description copied from interface:VolatilitySurface
Returns the price or implied volatility for the corresponding maturity and strike.- Parameters:
maturity
- The option maturity for which the price or implied volatility is requested.strike
- The option strike for which the price or implied volatility is requested.quotingConvention
- The quoting convention to be used for the return value.- Returns:
- The price or implied volatility depending on the quoting convention.
-
getValue
public double getValue(AnalyticModel model, double maturity, double strike, VolatilitySurface.QuotingConvention quotingConvention)Description copied from interface:VolatilitySurface
Returns the price or implied volatility for the corresponding maturity and strike.- Parameters:
model
- An analytic model providing a context. Some curves do not need this (may be null).maturity
- The option maturity for which the price or implied volatility is requested.strike
- The option strike for which the price or implied volatility is requested.quotingConvention
- The quoting convention to be used for the return value.- Returns:
- The price or implied volatility depending on the quoting convention.
-
getParameter
public double[] getParameter()Description copied from interface:ParameterObject
Get the current parameter associated with the state of the objects.- Returns:
- The parameter.
-
setParameter
public void setParameter(double[] parameter)Description copied from interface:ParameterObject
Set the current parameter and change the state of the objects.- Parameters:
parameter
- The parameter associated with the new state of the objects.
-
getCloneForParameter
public AbstractVolatilitySurfaceParametric getCloneForParameter(double[] value) throws CloneNotSupportedExceptionDescription copied from class:AbstractVolatilitySurfaceParametric
Returns a clone of this volatility surface with modified parameters.- Specified by:
getCloneForParameter
in interfaceParameterObject
- Specified by:
getCloneForParameter
in classAbstractVolatilitySurfaceParametric
- Parameters:
value
- Parameter array.- Returns:
- Clone with new parameters.
- Throws:
CloneNotSupportedException
- Thrown if this object cannot be cloned.
-