Interface FiniteDifferenceProduct<M extends FiniteDifferenceModel>

Type Parameters:
M - The finite-difference model type compatible with the product.
All Superinterfaces:
Product
All Known Subinterfaces:
FiniteDifferenceConstrainedProduct, FiniteDifferenceEquityEventProduct, FiniteDifferenceEquityProduct, FiniteDifferenceInterestRateProduct
All Known Implementing Classes:
AmericanOption, AsianOption, BarrierOption, BasketOption, BermudanOption, BestOfOption, Bond, DigitalBarrierOption, DigitalBasketOption, DigitalOption, DoubleBarrierBinaryOption, DoubleBarrierOption, EuropeanOption, FloatingStrikeSwingOption, OptionOnBond, ShoutOption, Swap, SwapLeg, Swaption, Swaption.ResolvedSwaption, SwingOption, TouchOption, WorstOfOption

public interface FiniteDifferenceProduct<M extends FiniteDifferenceModel> extends Product
Base interface for finite-difference products.

The interface abstracts the common structure shared by all finite-difference products, independently of the asset class. A product is parameterized by the specific finite-difference model type against which it can be valued.

Author:
Alessandro Gnoatto
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value.
    double[]
    getValue(double evaluationTime, M model)
    Returns the value.
    default Object
    getValue(double evaluationTime, Model model)
    Return the valuation of the product using the given model.
    double[][]
    getValues(M model)
    Returns the value.

    Methods inherited from interface Product

    getValues
  • Method Details

    • getValue

      double[] getValue(double evaluationTime, M model)
      Returns the value.
      Parameters:
      evaluationTime - The value.
      model - The value.
      Returns:
      The value.
    • getValues

      double[][] getValues(M model)
      Returns the value.
      Parameters:
      model - The value.
      Returns:
      The value.
    • getModelClass

      Class<M> getModelClass()
      Returns the value.
      Returns:
      The value.
    • getValue

      default Object getValue(double evaluationTime, Model model)
      Description copied from interface: Product
      Return 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:
      getValue in interface Product
      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.