Class FiniteDifferenceExerciseUtil
java.lang.Object
net.finmath.finitedifference.FiniteDifferenceExerciseUtil
Utility methods adapting a general
Exercise specification to
finite-difference solvers working in time-to-maturity coordinates.
Finite-difference solvers in this project use time-to-maturity
tau = maturity - t. Exercise specifications are given in running time
t. This class performs the required conversion and can refine the
time discretization so that all Bermudan exercise dates are represented
exactly.
- Author:
- Alessandro Gnoatto
-
Method Summary
Modifier and TypeMethodDescriptionstatic doubleConvenience method returning the exercise start time in tau-coordinates for American exercise.static double[]getExerciseTimesToMaturity(Exercise exercise) Returns the exercise times in time-to-maturity coordinates.static booleanisContinuousExercise(Exercise exercise) Returns true if the exercise policy should be treated as continuous on the FD grid.static booleanisDiscreteExerciseTime(double tau, Exercise exercise) Returns true if the given tau-grid time is an actual Bermudan exercise time.static booleanisExerciseAllowedAtTimeToMaturity(double tau, Exercise exercise) Returns true if exercise is allowed at the given time-to-maturity.static TimeDiscretizationrefineTimeDiscretization(TimeDiscretization baseTimeDiscretization, Exercise exercise) Returns a refined time discretization that includes all Bermudan exercise dates in time-to-maturity coordinates.
-
Method Details
-
getExerciseTimesToMaturity
Returns the exercise times in time-to-maturity coordinates.- Parameters:
exercise- The exercise specification.- Returns:
- The exercise times in tau = maturity - t.
-
refineTimeDiscretization
public static TimeDiscretization refineTimeDiscretization(TimeDiscretization baseTimeDiscretization, Exercise exercise) Returns a refined time discretization that includes all Bermudan exercise dates in time-to-maturity coordinates.European and American exercise return the base discretization unchanged.
- Parameters:
baseTimeDiscretization- The original time discretization in tau.exercise- The exercise specification.- Returns:
- A refined time discretization in tau.
-
isExerciseAllowedAtTimeToMaturity
Returns true if exercise is allowed at the given time-to-maturity.- Parameters:
tau- The time-to-maturity.exercise- The exercise specification.- Returns:
- True if exercise is allowed.
-
isContinuousExercise
Returns true if the exercise policy should be treated as continuous on the FD grid.- Parameters:
exercise- The exercise specification.- Returns:
- True if the policy is continuous.
-
isDiscreteExerciseTime
Returns true if the given tau-grid time is an actual Bermudan exercise time.- Parameters:
tau- The time-to-maturity.exercise- The exercise specification.- Returns:
- True if tau corresponds to a Bermudan exercise date.
-
getAmericanExerciseStartTimeToMaturity
Convenience method returning the exercise start time in tau-coordinates for American exercise.- Parameters:
exercise- The exercise specification.- Returns:
- The corresponding tau value, or 0.0 if not applicable.
-