Module net.finmath.lib
Class AbstractFourierTransformProduct
- java.lang.Object
-
- net.finmath.fouriermethod.products.AbstractFourierTransformProduct
-
- All Implemented Interfaces:
Function<org.apache.commons.math3.complex.Complex,org.apache.commons.math3.complex.Complex>,CharacteristicFunction,FourierTransformProduct,Product
- Direct Known Subclasses:
DigitalOption,EuropeanOption
public abstract class AbstractFourierTransformProduct extends Object implements CharacteristicFunction, FourierTransformProduct
- Version:
- 1.0
- Author:
- Christian Fries
-
-
Constructor Summary
Constructors Constructor Description AbstractFourierTransformProduct()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract doublegetIntegrationDomainImagLowerBound()Return the lower bound of the imaginary part of the domain where the characteristic function can be integrated.abstract doublegetIntegrationDomainImagUpperBound()Return the upper bound of the imaginary part of the domain where the characteristic function can be integrated.abstract doublegetMaturity()Return the maturity of the associated payoff.DoublegetValue(double evaluationTime, Model model)Return the valuation of the product using the given model.doublegetValue(CharacteristicFunctionModel model)This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime.Map<String,Object>getValues(double evaluationTime, Model model)Return the valuation of the product using the given model.
-
-
-
Method Detail
-
getValue
public Double getValue(double evaluationTime, Model model)
Description copied from interface:ProductReturn the valuation of the product using the given model. Implement this method using a checked cast of the model to a derived model for which the product provides a valuation algorithm. Example: an interest rate product requires that the passed model object implements the interface of an interest rate model. Since there is no polymorphism on arguments (see Double Dynamic Dispatch), we reply on a checked cast.- Specified by:
getValuein interfaceFourierTransformProduct- Specified by:
getValuein interfaceProduct- Parameters:
evaluationTime- The evaluation time as double. Cash flows prior and including this time are not considered.model- The model under which the product is valued.- Returns:
- Object containing the value of the product using the given model.
-
getValues
public Map<String,Object> getValues(double evaluationTime, Model model)
Description copied from interface:ProductReturn the valuation of the product using the given model. Implement this method using a checked cast of the model to a derived model for which the product provides a valuation algorithm. Example: an interest rate product requires that the passed model object implements the interface of an interest rate model. Since there is no polymorphism on arguments (see Double Dynamic Dispatch), we reply on a checked cast.- Specified by:
getValuesin interfaceFourierTransformProduct- Specified by:
getValuesin interfaceProduct- Parameters:
evaluationTime- The evaluation time as double. Cash flows prior and including this time are not considered.model- The model under which the product is valued.- Returns:
- Map containing the value of the product using the given model.
-
getValue
public double getValue(CharacteristicFunctionModel model) throws CalculationException
Description copied from interface:FourierTransformProductThis method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value conditional to evalutationTime, for a Monte-Carlo simulation this is the (sum of) value discounted to evaluation time. Cashflows prior evaluationTime are not considered.- Specified by:
getValuein interfaceFourierTransformProduct- Parameters:
model- The model used to price the product.- Returns:
- The random variable representing the value of the product discounted to evaluation time
- Throws:
CalculationException- Thrown if the valuation fails, specific cause may be available via thecause()method.
-
getMaturity
public abstract double getMaturity()
Description copied from interface:FourierTransformProductReturn the maturity of the associated payoff.- Specified by:
getMaturityin interfaceFourierTransformProduct- Returns:
- The maturity of the associated payoff.
-
getIntegrationDomainImagLowerBound
public abstract double getIntegrationDomainImagLowerBound()
Description copied from interface:FourierTransformProductReturn the lower bound of the imaginary part of the domain where the characteristic function can be integrated.- Specified by:
getIntegrationDomainImagLowerBoundin interfaceFourierTransformProduct- Returns:
- the lower bound of the imaginary part of the domain of integration.
-
getIntegrationDomainImagUpperBound
public abstract double getIntegrationDomainImagUpperBound()
Description copied from interface:FourierTransformProductReturn the upper bound of the imaginary part of the domain where the characteristic function can be integrated.- Specified by:
getIntegrationDomainImagUpperBoundin interfaceFourierTransformProduct- Returns:
- the upper bound of the imaginary part of the domain of integration.
-
-