Class AmericanOption
java.lang.Object
net.finmath.finitedifference.assetderivativevaluation.products.AmericanOption
- All Implemented Interfaces:
FiniteDifferenceEquityProduct, FiniteDifferenceProduct<FiniteDifferenceEquityModel>, Product
Finite difference valuation of an American option on a single asset.
Given an underlying price S with strike K and maturity
T, the payoff is
max(sign * (S(T) - K), 0),
where sign corresponds to CallOrPut.CALL or CallOrPut.PUT.
- Version:
- 1.0
- Author:
- Alessandro Gnoatto
-
Constructor Summary
ConstructorsConstructorDescriptionAmericanOption(double maturity, double strike) Creates an American call option (single-asset case, unnamed underlying).AmericanOption(double maturity, double strike, double callOrPutSign) Creates an American option (single-asset case, unnamed underlying).AmericanOption(double maturity, double strike, CallOrPut callOrPutSign) Creates an American option (single-asset case, unnamed underlying).AmericanOption(String underlyingName, double maturity, double strike) Creates an American call option for a named underlying.AmericanOption(String underlyingName, double maturity, double strike, double callOrPutSign) Creates an American option for a named underlying.AmericanOption(String underlyingName, double maturity, double strike, CallOrPut callOrPutSign) Creates an American option for a named underlying. -
Method Summary
Modifier and TypeMethodDescriptionReturns whether the option is a call or put.Returns the exercise specification.doubleReturns the option maturity.doubleReturns the option strike.Returns the name of the underlying.double[]getValue(double evaluationTime, FiniteDifferenceEquityModel model) Returns the value.double[][]Returns the value.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FiniteDifferenceEquityProduct
getModelClassMethods inherited from interface FiniteDifferenceProduct
getValue
-
Constructor Details
-
AmericanOption
Creates an American option for a named underlying.- Parameters:
underlyingName- Name of the underlying.maturity- MaturityT.strike- StrikeK.callOrPutSign- Payoff sign, where1.0corresponds to a call and-1.0corresponds to a put.
-
AmericanOption
-
AmericanOption
public AmericanOption(double maturity, double strike, double callOrPutSign) Creates an American option (single-asset case, unnamed underlying).- Parameters:
maturity- MaturityT.strike- StrikeK.callOrPutSign- Payoff sign, where1.0corresponds to a call and-1.0corresponds to a put.
-
AmericanOption
Creates an American option (single-asset case, unnamed underlying).- Parameters:
maturity- MaturityT.strike- StrikeK.callOrPutSign- Option type.
-
AmericanOption
Creates an American call option for a named underlying.- Parameters:
underlyingName- Name of the underlying.maturity- MaturityT.strike- StrikeK.
-
AmericanOption
public AmericanOption(double maturity, double strike) Creates an American call option (single-asset case, unnamed underlying).- Parameters:
maturity- MaturityT.strike- StrikeK.
-
-
Method Details
-
getValue
Description copied from interface:FiniteDifferenceProductReturns the value.- Specified by:
getValuein interfaceFiniteDifferenceProduct<FiniteDifferenceEquityModel>- Parameters:
evaluationTime- The value.model- The value.- Returns:
- The value.
-
getValues
Description copied from interface:FiniteDifferenceProductReturns the value.- Specified by:
getValuesin interfaceFiniteDifferenceProduct<FiniteDifferenceEquityModel>- Parameters:
model- The value.- Returns:
- The value.
-
getUnderlyingName
Returns the name of the underlying.- Returns:
- The underlying name, or
nullif unspecified.
-
getMaturity
public double getMaturity()Returns the option maturity.- Returns:
- The maturity.
-
getStrike
public double getStrike()Returns the option strike.- Returns:
- The strike.
-
getCallOrPut
Returns whether the option is a call or put.- Returns:
- The option type.
-
getExercise
Returns the exercise specification.- Returns:
- The exercise specification.
-