Module net.finmath.lib
Class StaticVolatilityCube
java.lang.Object
net.finmath.singleswaprate.model.volatilities.StaticVolatilityCube
- All Implemented Interfaces:
VolatilityCube
A volatility cube that always returns the given value.
- Author:
- Christian Fries, Roland Bachl
-
Constructor Summary
ConstructorsConstructorDescriptionStaticVolatilityCube(String name, LocalDate referenceDate, double value)Create the cube.StaticVolatilityCube(String name, LocalDate referenceDate, double correlationDecay, double value)Create the cube.StaticVolatilityCube(String name, LocalDate referenceDate, double correlationDecay, double iborOisDecorrelation, double value)Create the cube. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturn the correlation decay parameter of the cube.doubleReturn the IBOR vs OIS decorrelation parameter.doublegetLowestStrike(VolatilityCubeModel model)Returns the lowest possible value of strike that can be evaluated by this cube.getName()Returns the name of the volatility cube.Returns a map with all implementation dependent parameters of this volatility cube.Return the reference date of this cube, i.e.doublegetValue(double termination, double maturity, double strike, VolatilitySurface.QuotingConvention quotingConvention)Return the volatility at the specified coordinates in the desired quotation.doublegetValue(VolatilityCubeModel model, double termination, double maturity, double strike, VolatilitySurface.QuotingConvention quotingConvention)Return the volatility at the specified coordinates in the desired quotation.
-
Constructor Details
-
StaticVolatilityCube
public StaticVolatilityCube(String name, LocalDate referenceDate, double correlationDecay, double iborOisDecorrelation, double value)Create the cube.- Parameters:
name- The name of the cube.referenceDate- The reference date of the cube.correlationDecay- The correlation decay parameter of the cube.iborOisDecorrelation- The ibor ois decorrelation parameter of the cube.value- The value this cube is to return.
-
StaticVolatilityCube
public StaticVolatilityCube(String name, LocalDate referenceDate, double correlationDecay, double value)Create the cube. With ibor ois decorrelation set to 1.0.- Parameters:
name- The name of the cube.referenceDate- The reference date of the cube.correlationDecay- The correlation decay parameter of the cube.value- The value this cube is to return.
-
StaticVolatilityCube
Create the cube. With ibor ois decorrelation set to 1.0 and correlation decay set to 0.0.- Parameters:
name- The name of the cube.referenceDate- The reference date of the cube.value- The value this cube is to return.
-
-
Method Details
-
getValue
public double getValue(VolatilityCubeModel model, double termination, double maturity, double strike, VolatilitySurface.QuotingConvention quotingConvention)Description copied from interface:VolatilityCubeReturn the volatility at the specified coordinates in the desired quotation.- Specified by:
getValuein interfaceVolatilityCube- Parameters:
model- A model providing context.termination- End date of the underlying.maturity- Maturity date of the option.strike- Strike rate of the option.quotingConvention- Desired quoting convention.- Returns:
- The volatility.
-
getValue
public double getValue(double termination, double maturity, double strike, VolatilitySurface.QuotingConvention quotingConvention)Description copied from interface:VolatilityCubeReturn the volatility at the specified coordinates in the desired quotation.- Specified by:
getValuein interfaceVolatilityCube- Parameters:
termination- End date of the underlying.maturity- Maturity date of the option.strike- Strike rate of the option.quotingConvention- Desired quoting convention.- Returns:
- The volatility.
-
getName
Description copied from interface:VolatilityCubeReturns the name of the volatility cube.- Specified by:
getNamein interfaceVolatilityCube- Returns:
- The name of the volatility cube.
-
getReferenceDate
Description copied from interface:VolatilityCubeReturn the reference date of this cube, i.e. the date associated with t=0.- Specified by:
getReferenceDatein interfaceVolatilityCube- Returns:
- The date identified as t=0.
-
getCorrelationDecay
public double getCorrelationDecay()Description copied from interface:VolatilityCubeReturn the correlation decay parameter of the cube. This is used to determine the correlation between tenors in a derived volvol cube.- Specified by:
getCorrelationDecayin interfaceVolatilityCube- Returns:
- The correlation decay parameter.
-
getIborOisDecorrelation
public double getIborOisDecorrelation()Description copied from interface:VolatilityCubeReturn the IBOR vs OIS decorrelation parameter. This parameter scales the convexity adjustment in a multi curve model, using different curves for forward rates and discounting.- Specified by:
getIborOisDecorrelationin interfaceVolatilityCube- Returns:
- The IBOR vs OIS decorrelation parameter.
-
getParameters
Description copied from interface:VolatilityCubeReturns a map with all implementation dependent parameters of this volatility cube.- Specified by:
getParametersin interfaceVolatilityCube- Returns:
- A map of all parameters.
-
getLowestStrike
Description copied from interface:VolatilityCubeReturns the lowest possible value of strike that can be evaluated by this cube. This is relevant for instance when an implementation uses a SABR model with displacement.- Specified by:
getLowestStrikein interfaceVolatilityCube- Parameters:
model- A model for context.- Returns:
- Lowest possible strike this volatility cube supports.
-