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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
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.DayCountConvention
getDaycountConvention()
DiscountCurve
getDiscountCurve()
ForwardCurve
getForwardCurve()
String
getName()
Returns the name of the volatility surface.VolatilitySurface.QuotingConvention
getQuotingConvention()
Return the default quoting convention of this surface.LocalDate
getReferenceDate()
Return the reference date of this surface, i.e.String
toString()
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.finmath.marketdata.model.volatilities.VolatilitySurface
getValue, getValue
-
-
-
-
Constructor Detail
-
AbstractVolatilitySurface
public AbstractVolatilitySurface(String name, LocalDate referenceDate, ForwardCurve forwardCurve, DiscountCurve discountCurve, VolatilitySurface.QuotingConvention quotingConvention, DayCountConvention daycountConvention)
-
-
Method Detail
-
getName
public String 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
public LocalDate 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.
-
clone
public Object clone() throws CloneNotSupportedException
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
getQuotingConvention
public VolatilitySurface.QuotingConvention 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
public ForwardCurve getForwardCurve()
-
getDiscountCurve
public DiscountCurve getDiscountCurve()
-
getDaycountConvention
public DayCountConvention getDaycountConvention()
-
-