Interface Exercise

All Known Implementing Classes:
AbstractExercise, AmericanExercise, BermudanExercise, EuropeanExercise

public interface Exercise
General exercise specification for an option-like product.

Exercise times are expressed in running time, i.e. increasing calendar-time coordinates measured from the model reference date.

The interface is intentionally method-agnostic and may be used by finite- difference, Monte Carlo, lattice / tree, or other numerical methods.

Author:
Alessandro Gnoatto
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    Returns the exercise times in running time.
    double
    Returns the maturity of the contract in running time.
    boolean
    Returns true if this is American exercise.
    boolean
    Returns true if this is Bermudan exercise.
    boolean
    Returns whether exercise is allowed continuously in time.
    boolean
    Returns true if this is European exercise.
    boolean
    isExerciseAllowed(double time)
    Returns whether exercise is allowed at the given running time.
  • Method Details

    • getMaturity

      double getMaturity()
      Returns the maturity of the contract in running time.
      Returns:
      The maturity.
    • getExerciseTimes

      double[] getExerciseTimes()
      Returns the exercise times in running time.

      For European exercise this is typically a singleton containing only the maturity. For American exercise this may also return only the maturity, since the exercise region is continuous and not represented by a finite list. For Bermudan exercise this returns the scheduled exercise dates.

      Returns:
      The exercise times.
    • isContinuousExercise

      boolean isContinuousExercise()
      Returns whether exercise is allowed continuously in time.
      Returns:
      True if the exercise right is continuous in time.
    • isExerciseAllowed

      boolean isExerciseAllowed(double time)
      Returns whether exercise is allowed at the given running time.

      This method is interpreted in contractual terms, not in numerical-grid terms. For Bermudan exercise it checks whether the given time matches one of the scheduled exercise times (up to a small tolerance). For American exercise it checks whether the time lies inside the exercise interval.

      Parameters:
      time - The running time.
      Returns:
      True if exercise is allowed.
    • isEuropean

      boolean isEuropean()
      Returns true if this is European exercise.
      Returns:
      True if European.
    • isAmerican

      boolean isAmerican()
      Returns true if this is American exercise.
      Returns:
      True if American.
    • isBermudan

      boolean isBermudan()
      Returns true if this is Bermudan exercise.
      Returns:
      True if Bermudan.