net.finmath.marketdata.model.volatilities
Class CapletVolatilities
- java.lang.Object
-
- net.finmath.marketdata.model.volatilities.AbstractVolatilitySurface
-
- net.finmath.marketdata.model.volatilities.CapletVolatilities
-
- All Implemented Interfaces:
- java.lang.Cloneable, VolatilitySurfaceInterface
public class CapletVolatilities extends AbstractVolatilitySurface
A very simple container for Caplet volatilities. It performs piecewise constant interpolation (discretization) in maturity dimension on iso-moneyness lines and uses the default interpolation from the Curve class in strike dimension. It allows to convert from several quoting conventions. It needs a forward curve and a discount curve. The tenor length of the Caplet is inferred from the forward curve.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.finmath.marketdata.model.volatilities.VolatilitySurfaceInterface
VolatilitySurfaceInterface.QuotingConvention
-
-
Constructor Summary
Constructors Constructor and Description CapletVolatilities(java.lang.String name, java.util.Calendar referenceDate, ForwardCurveInterface forwardCurve, double[] maturities, double[] strikes, double[] volatilities, VolatilitySurfaceInterface.QuotingConvention volatilityConvention, DiscountCurveInterface discountCurve)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static AbstractVolatilitySurfacefromFile(java.io.File inputFile)doublegetValue(AnalyticModelInterface model, double maturity, double strike, VolatilitySurfaceInterface.QuotingConvention quotingConvention)Returns the price or implied volatility for the corresponding maturity and strike.doublegetValue(double maturity, double strike, VolatilitySurfaceInterface.QuotingConvention quotingConvention)Returns the price or implied volatility for the corresponding maturity and strike.-
Methods inherited from class net.finmath.marketdata.model.volatilities.AbstractVolatilitySurface
clone, convertFromTo, convertFromTo, getName, getQuotingConvention, getReferenceDate, toString
-
-
-
-
Constructor Detail
-
CapletVolatilities
public CapletVolatilities(java.lang.String name, java.util.Calendar referenceDate, ForwardCurveInterface forwardCurve, double[] maturities, double[] strikes, double[] volatilities, VolatilitySurfaceInterface.QuotingConvention volatilityConvention, DiscountCurveInterface discountCurve)- 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.maturities- The vector of maturities of the quotes.strikes- The vector of strikes of the quotes.volatilities- The vector of volatilities of the quotes.volatilityConvention- The quoting convention of the volatilities provided.discountCurve- The associated discount curve.
-
-
Method Detail
-
getValue
public double getValue(double maturity, double strike, VolatilitySurfaceInterface.QuotingConvention quotingConvention)Description copied from interface:VolatilitySurfaceInterfaceReturns 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(AnalyticModelInterface model, double maturity, double strike, VolatilitySurfaceInterface.QuotingConvention quotingConvention)
Description copied from interface:VolatilitySurfaceInterfaceReturns 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.
-
fromFile
public static AbstractVolatilitySurface fromFile(java.io.File inputFile) throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG