- java.lang.Object
-
- net.finmath.fouriermethod.products.smile.EuropeanOptionSmile
-
- All Implemented Interfaces:
Function<org.apache.commons.math3.complex.Complex,org.apache.commons.math3.complex.Complex>,CharacteristicFunction,SmileByIntegralTransform
- Direct Known Subclasses:
EuropeanOptionSmileByCarrMadan
public abstract class EuropeanOptionSmile extends Object implements SmileByIntegralTransform
This is an abstract base class for Fourier-based methodologies for the valuation of a smile of options. Concrete different Fourier methodologies should provide different implementations of the getValue method, which is left here as abstract.- Author:
- Alessandro Gnoatto
-
-
Constructor Summary
Constructors Constructor Description EuropeanOptionSmile(double maturity, double[] strikes)EuropeanOptionSmile(String underlyingName, double maturity, double[] strikes)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.apache.commons.math3.complex.Complexapply(org.apache.commons.math3.complex.Complex z)abstract EuropeanOptionSmilegetCloneWithModifiedParameters(double maturity, double[] strikes)Returns the same valuation method for different parameters (maturity and strikes).SingleAssetEuropeanOptionProductDescriptorgetDescriptor(LocalDate referenceDate, int index)Return a product descriptor for a specific strike.Map<Double,SingleAssetEuropeanOptionProductDescriptor>getDescriptors(LocalDate referenceDate)Return a collection of product descriptors for each option in the smile.doublegetIntegrationDomainImagLowerBound()Return the lower bound of the imaginary part of the domain where the characteristic function can be integrated.doublegetIntegrationDomainImagUpperBound()Return the upper bound of the imaginary part of the domain where the characteristic function can be integrated.doublegetMaturity()Return the maturity of the associated payoff.double[]getStrikes()StringgetUnderlyingName()abstract Map<String,Function<Double,Double>>getValue(double evaluationTime, CharacteristicFunctionModel model)Return the value of a family of options with the same maturity for different strikes.
-
-
-
Constructor Detail
-
EuropeanOptionSmile
public EuropeanOptionSmile(String underlyingName, double maturity, double[] strikes)
-
EuropeanOptionSmile
public EuropeanOptionSmile(double maturity, double[] strikes)
-
-
Method Detail
-
getMaturity
public double getMaturity()
Description copied from interface:SmileByIntegralTransformReturn the maturity of the associated payoff.- Specified by:
getMaturityin interfaceSmileByIntegralTransform- Returns:
- The maturity of the associated payoff.
-
getStrikes
public double[] getStrikes()
-
getUnderlyingName
public String getUnderlyingName()
-
getIntegrationDomainImagLowerBound
public double getIntegrationDomainImagLowerBound()
Description copied from interface:SmileByIntegralTransformReturn the lower bound of the imaginary part of the domain where the characteristic function can be integrated.- Specified by:
getIntegrationDomainImagLowerBoundin interfaceSmileByIntegralTransform- Returns:
- the lower bound of the imaginary part of the domain of integration.
-
getIntegrationDomainImagUpperBound
public double getIntegrationDomainImagUpperBound()
Description copied from interface:SmileByIntegralTransformReturn the upper bound of the imaginary part of the domain where the characteristic function can be integrated.- Specified by:
getIntegrationDomainImagUpperBoundin interfaceSmileByIntegralTransform- Returns:
- the upper bound of the imaginary part of the domain of integration.
-
getValue
public abstract Map<String,Function<Double,Double>> getValue(double evaluationTime, CharacteristicFunctionModel model) throws CalculationException
Description copied from interface:SmileByIntegralTransformReturn the value of a family of options with the same maturity for different strikes.- Specified by:
getValuein interfaceSmileByIntegralTransform- Parameters:
evaluationTime- The evaluation time.model- The model against which the product should be values.- Returns:
- The map of product values mapping from strike to value.
- Throws:
CalculationException- Thrown if the valuation failed.
-
getCloneWithModifiedParameters
public abstract EuropeanOptionSmile getCloneWithModifiedParameters(double maturity, double[] strikes)
Returns the same valuation method for different parameters (maturity and strikes).- Parameters:
maturity- The new maturity.strikes- The new strikes.- Returns:
- the same valuation method now referring to a different maturity and strike grid.
-
apply
public org.apache.commons.math3.complex.Complex apply(org.apache.commons.math3.complex.Complex z)
-
getDescriptors
public Map<Double,SingleAssetEuropeanOptionProductDescriptor> getDescriptors(LocalDate referenceDate)
Return a collection of product descriptors for each option in the smile.- Parameters:
referenceDate- The reference date (translating the maturity floating point date to dates.- Returns:
- a collection of product descriptors for each option in the smile.
-
getDescriptor
public SingleAssetEuropeanOptionProductDescriptor getDescriptor(LocalDate referenceDate, int index) throws ArrayIndexOutOfBoundsException
Return a product descriptor for a specific strike.- Parameters:
referenceDate- The reference date (translating the maturity floating point date to dates.index- The index corresponding to the strike grid.- Returns:
- a product descriptor for a specific strike.
- Throws:
ArrayIndexOutOfBoundsException- Thrown if index is out of bound.
-
-