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
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 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.StringtoString()-
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 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:VolatilitySurfaceReturns the name of the volatility surface.- Specified by:
getNamein interfaceVolatilitySurface- Returns:
- The name of the volatility surface.
-
getReferenceDate
public LocalDate 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.
-
clone
public Object clone() throws CloneNotSupportedException
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
getQuotingConvention
public VolatilitySurface.QuotingConvention 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
public ForwardCurve getForwardCurve()
-
getDiscountCurve
public DiscountCurve getDiscountCurve()
-
getDaycountConvention
public DayCountConvention getDaycountConvention()
-
-