public class CapletVolatilities extends AbstractVolatilitySurface
VolatilitySurface.QuotingConvention| Constructor and Description |
|---|
CapletVolatilities(String name,
LocalDate referenceDate,
ForwardCurve forwardCurve,
double[] maturities,
double[] strikes,
double[] volatilities,
VolatilitySurface.QuotingConvention volatilityConvention,
DiscountCurve discountCurve) |
| Modifier and Type | Method and Description |
|---|---|
static AbstractVolatilitySurface |
fromFile(File inputFile) |
double |
getValue(AnalyticModel model,
double maturity,
double strike,
VolatilitySurface.QuotingConvention quotingConvention)
Returns the price or implied volatility for the corresponding maturity and strike.
|
double |
getValue(double maturity,
double strike,
VolatilitySurface.QuotingConvention quotingConvention)
Returns the price or implied volatility for the corresponding maturity and strike.
|
clone, convertFromTo, convertFromTo, getDaycountConvention, getDiscountCurve, getForwardCurve, getName, getQuotingConvention, getReferenceDate, toStringpublic CapletVolatilities(String name, LocalDate referenceDate, ForwardCurve forwardCurve, double[] maturities, double[] strikes, double[] volatilities, VolatilitySurface.QuotingConvention volatilityConvention, DiscountCurve discountCurve)
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.public double getValue(double maturity,
double strike,
VolatilitySurface.QuotingConvention quotingConvention)
VolatilitySurfacematurity - 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.public double getValue(AnalyticModel model, double maturity, double strike, VolatilitySurface.QuotingConvention quotingConvention)
VolatilitySurfacemodel - 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.public static AbstractVolatilitySurface fromFile(File inputFile) throws FileNotFoundException
FileNotFoundExceptionCopyright © 2019. All rights reserved.