Module net.finmath.lib
Class AbstractVolatilitySurface
java.lang.Object
net.finmath.marketdata.model.volatilities.AbstractVolatilitySurface
- All Implemented Interfaces:
Cloneable,VolatilitySurface
- Direct Known Subclasses:
AbstractVolatilitySurfaceParametric,CapletVolatilities
public abstract class AbstractVolatilitySurface extends Object implements VolatilitySurface, Cloneable
Abstract base class for a volatility surface. It stores the name of the surface and
provides some convenient way of getting values.
- 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
Constructors Constructor Description AbstractVolatilitySurface(String name, LocalDate referenceDate)AbstractVolatilitySurface(String name, LocalDate referenceDate, ForwardCurve forwardCurve, DiscountCurve discountCurve, VolatilitySurface.QuotingConvention quotingConvention, DayCountConvention daycountConvention) -
Method Summary
Modifier and Type Method Description Objectclone()doubleconvertFromTo(double optionMaturity, double optionStrike, double value, VolatilitySurface.QuotingConvention fromQuotingConvention, VolatilitySurface.QuotingConvention toQuotingConvention)Convert the value of a caplet from one quoting convention to another quoting convention.doubleconvertFromTo(AnalyticModel model, double optionMaturity, double optionStrike, double value, VolatilitySurface.QuotingConvention fromQuotingConvention, VolatilitySurface.QuotingConvention toQuotingConvention)Convert the value of a caplet from one quoting convention to another quoting convention.DayCountConventiongetDaycountConvention()DiscountCurvegetDiscountCurve()ForwardCurvegetForwardCurve()StringgetName()Returns the name of the volatility surface.VolatilitySurface.QuotingConventiongetQuotingConvention()Return the default quoting convention of this surface.LocalDategetReferenceDate()Return the reference date of this surface, i.e. the date associated with t=0.StringtoString()Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.finmath.marketdata.model.volatilities.VolatilitySurface
getValue, getValue
-
Constructor Details
-
AbstractVolatilitySurface
public AbstractVolatilitySurface(String name, LocalDate referenceDate, ForwardCurve forwardCurve, DiscountCurve discountCurve, VolatilitySurface.QuotingConvention quotingConvention, DayCountConvention daycountConvention) -
AbstractVolatilitySurface
-
-
Method Details
-
getName
Description copied from interface:VolatilitySurfaceReturns the name of the volatility surface.- Specified by:
getNamein interfaceVolatilitySurface- Returns:
- The name of the volatility surface.
-
getReferenceDate
Description copied from interface:VolatilitySurfaceReturn the reference date of this surface, i.e. the date associated with t=0.- Specified by:
getReferenceDatein interfaceVolatilitySurface- Returns:
- The date identified as t=0.
-
toString
-
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
getQuotingConvention
Description copied from interface:VolatilitySurfaceReturn the default quoting convention of this surface.- Specified by:
getQuotingConventionin interfaceVolatilitySurface- Returns:
- the quotingConvention
-
convertFromTo
public double convertFromTo(AnalyticModel model, double optionMaturity, double optionStrike, double value, VolatilitySurface.QuotingConvention fromQuotingConvention, VolatilitySurface.QuotingConvention toQuotingConvention)Convert the value of a caplet from one quoting convention to another quoting convention.- Parameters:
model- An analytic model providing the context when fetching required market date.optionMaturity- Option maturity of the caplet.optionStrike- Option strike of the caplet.value- Value of the caplet given in the form offromQuotingConvention.fromQuotingConvention- The quoting convention of the given value.toQuotingConvention- The quoting convention requested.- Returns:
- Value of the caplet given in the form of
toQuotingConvention.
-
convertFromTo
public double convertFromTo(double optionMaturity, double optionStrike, double value, VolatilitySurface.QuotingConvention fromQuotingConvention, VolatilitySurface.QuotingConvention toQuotingConvention)Convert the value of a caplet from one quoting convention to another quoting convention.- Parameters:
optionMaturity- Option maturity of the caplet.optionStrike- Option strike of the caplet.value- Value of the caplet given in the form offromQuotingConvention.fromQuotingConvention- The quoting convention of the given value.toQuotingConvention- The quoting convention requested.- Returns:
- Value of the caplet given in the form of
toQuotingConvention.
-
getForwardCurve
-
getDiscountCurve
-
getDaycountConvention
-