Class BestOfOption

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

public class BestOfOption extends Object implements FiniteDifferenceEquityProduct
Finite-difference valuation of a European option on the best of two assets.

Let S1 and S2 denote the two underlying assets and let T be the maturity. The best-of underlying is

B(T) = max(S_1(T), S_2(T)).

The payoff is

\left( \omega \left( B(T) - K \right) \right)^{+},

where \omega = +1 for a call and \omega = -1 for a put. Hence

\left( max(S_1(T), S_2(T)) - K \right)^{+}

for a call, and

\left( K - max(S_1(T), S_2(T)) \right)^{+}

for a put.

This product is genuinely non-linear in the two assets and cannot be reduced to the linear-combination basket class. The current implementation requires a two-dimensional model state and supports European exercise only.

Author:
Alessandro Gnoatto
  • Constructor Details

    • BestOfOption

      public BestOfOption(String firstUnderlyingName, String secondUnderlyingName, double maturity, double strike, CallOrPut callOrPut)
      Creates a European best-of option for two named underlyings.
      Parameters:
      firstUnderlyingName - Name of the first underlying.
      secondUnderlyingName - Name of the second underlying.
      maturity - Maturity T.
      strike - Strike K.
      callOrPut - Option type.
    • BestOfOption

      public BestOfOption(String firstUnderlyingName, String secondUnderlyingName, double maturity, double strike, double callOrPutSign)
      Creates a European best-of option for two named underlyings.
      Parameters:
      firstUnderlyingName - Name of the first underlying.
      secondUnderlyingName - Name of the second underlying.
      maturity - Maturity T.
      strike - Strike K.
      callOrPutSign - Payoff sign, where 1.0 corresponds to a call and -1.0 corresponds to a put.
    • BestOfOption

      public BestOfOption(double maturity, double strike, CallOrPut callOrPut)
      Creates a European best-of option with unnamed underlyings.
      Parameters:
      maturity - Maturity T.
      strike - Strike K.
      callOrPut - Option type.
    • BestOfOption

      public BestOfOption(double maturity, double strike, double callOrPutSign)
      Creates a European best-of option with unnamed underlyings.
      Parameters:
      maturity - Maturity T.
      strike - 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.
    • getFirstUnderlyingName

      public String getFirstUnderlyingName()
      Returns the name of the first underlying.
      Returns:
      The name of the first underlying, or null if unspecified.
    • getSecondUnderlyingName

      public String getSecondUnderlyingName()
      Returns the name of the second underlying.
      Returns:
      The name of the second underlying, or null if unspecified.
    • getMaturity

      public double getMaturity()
      Returns the maturity.
      Returns:
      The maturity.
    • 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.