Module net.finmath.lib
Class AbstractVolatilitySurface
java.lang.Object
net.finmath.marketdata2.model.volatilities.AbstractVolatilitySurface
- All Implemented Interfaces:
Cloneable
,VolatilitySurface
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.marketdata2.model.volatilities.VolatilitySurface
VolatilitySurface.QuotingConvention
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractVolatilitySurface(String name, LocalDate referenceDate)
AbstractVolatilitySurface(String name, LocalDate referenceDate, ForwardCurve forwardCurve, DiscountCurve discountCurve, VolatilitySurface.QuotingConvention quotingConvention, DayCountConvention daycountConvention)
-
Method Summary
Modifier and TypeMethodDescriptionclone()
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.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.getName()
Returns the name of the volatility surface.Return the default quoting convention of this surface.Return the reference date of this surface, i.e.toString()
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.finmath.marketdata2.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:VolatilitySurface
Returns the name of the volatility surface.- Specified by:
getName
in interfaceVolatilitySurface
- Returns:
- The name of the volatility surface.
-
getReferenceDate
Description copied from interface:VolatilitySurface
Return the reference date of this surface, i.e. the date associated with t=0.- Specified by:
getReferenceDate
in interfaceVolatilitySurface
- Returns:
- The date identified as t=0.
-
toString
-
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
getQuotingConvention
Description copied from interface:VolatilitySurface
Return the default quoting convention of this surface.- Specified by:
getQuotingConvention
in 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
-