Class BasketOption

java.lang.Object
net.finmath.finitedifference.assetderivativevaluation.products.BasketOption
All Implemented Interfaces:
FiniteDifferenceEquityProduct, FiniteDifferenceProduct<FiniteDifferenceEquityModel>, Product

public class BasketOption extends Object implements FiniteDifferenceEquityProduct
Finite-difference valuation of a European linear basket option on two assets.

Let S1 and S2 denote the two underlying assets, let q1 and q2 be the signed asset quantities, let K be the strike, and let \omega \in \{+1,-1\} denote the call/put sign. The payoff is

\left( \omega \left( q_1 S_1(T) + q_2 S_2(T) - K \right) \right)^{+}.

This single class covers a number of important special cases:

  • arithmetic basket options, when both quantities are positive,
  • spread options, for example with quantities (1,-1),
  • exchange options, for example with quantities (1,-1) and strike 0.

The class is written in a dimension-agnostic style through the quantity vector, but the current finite-difference implementation supports only the two-asset case, that is, exactly two quantities and a two-dimensional model state.

The current implementation supports only European exercise.

Author:
Alessandro Gnoatto
  • Constructor Details

    • BasketOption

      public BasketOption(String[] underlyingNames, double maturity, double[] quantities, double strike, CallOrPut callOrPut)
      Creates a European linear basket option.
      Parameters:
      underlyingNames - Names of the underlyings. May be null. If provided, the array length must match the basket dimension.
      maturity - Maturity T.
      quantities - Signed asset quantities.
      strike - Real strike K.
      callOrPut - Option type.
    • BasketOption

      public BasketOption(double maturity, double[] quantities, double strike, CallOrPut callOrPut)
      Creates a European linear basket option.
      Parameters:
      maturity - Maturity T.
      quantities - Signed asset quantities.
      strike - Real strike K.
      callOrPut - Option type.
    • BasketOption

      public BasketOption(String[] underlyingNames, double maturity, double[] quantities, double strike, double callOrPutSign)
      Creates a European linear basket option.
      Parameters:
      underlyingNames - Names of the underlyings. May be null. If provided, the array length must match the basket dimension.
      maturity - Maturity T.
      quantities - Signed asset quantities.
      strike - Real strike K.
      callOrPutSign - Payoff sign, where 1.0 corresponds to a call and -1.0 corresponds to a put.
    • BasketOption

      public BasketOption(double maturity, double[] quantities, double strike, double callOrPutSign)
      Creates a European linear basket option.
      Parameters:
      maturity - Maturity T.
      quantities - Signed asset quantities.
      strike - Real strike K.
      callOrPutSign - Payoff sign, where 1.0 corresponds to a call and -1.0 corresponds to a put.
  • Method Details

    • getValue

      public double[] getValue(double evaluationTime, FiniteDifferenceEquityModel model)
      Description copied from interface: FiniteDifferenceProduct
      Returns the value.
      Specified by:
      getValue in interface FiniteDifferenceProduct<FiniteDifferenceEquityModel>
      Parameters:
      evaluationTime - The value.
      model - The value.
      Returns:
      The value.
    • getValues

      public double[][] getValues(FiniteDifferenceEquityModel model)
      Description copied from interface: FiniteDifferenceProduct
      Returns the value.
      Specified by:
      getValues in interface FiniteDifferenceProduct<FiniteDifferenceEquityModel>
      Parameters:
      model - The value.
      Returns:
      The value.
    • getUnderlyingNames

      public String[] getUnderlyingNames()
      Returns the underlying names.
      Returns:
      The underlying names, or null if unspecified.
    • getMaturity

      public double getMaturity()
      Returns the maturity.
      Returns:
      The maturity.
    • getQuantities

      public double[] getQuantities()
      Returns the signed asset quantities.
      Returns:
      The signed asset quantities.
    • getStrike

      public double getStrike()
      Returns the strike.
      Returns:
      The strike.
    • getCallOrPut

      public CallOrPut getCallOrPut()
      Returns the option type.
      Returns:
      The option type.
    • getExercise

      public Exercise getExercise()
      Returns the exercise specification.
      Returns:
      The exercise specification.
    • toString

      public String toString()
      Overrides:
      toString in class Object