Interface LocalVolatility

All Known Implementing Classes:
ConstantLocalVolatility, DupireLocalVolatility, PiecewiseConstantVolatility

public interface LocalVolatility
Interface for a local volatility function of the form sigma = sigma(t, S).

The interface is intentionally framework-neutral. The scalar method getValue(double, double) is the primary method and is suitable for finite-difference models. The random-variable overload is provided as a default method for Monte Carlo models.

Implementations may represent local volatility obtained from Dupire, Gatheral's implied-volatility formula, piecewise-constant Black-Scholes volatility, deterministic local-volatility tables, or any other model.

Author:
Alessandro Gnoatto
  • Method Summary

    Modifier and Type
    Method
    Description
    default double
    getLocalVolatility(double time, double assetValue)
    Returns the local volatility sigma(t, S).
    getLocalVolatility(double time, RandomVariable assetValue)
    Returns the local volatility path-wise for a random variable representing the asset value.
    double
    getValue(double time, double assetValue)
    Returns the local volatility sigma(t, S).
    getValue(double time, RandomVariable assetValue)
    Returns the local volatility path-wise for a random variable representing the asset value.
  • Method Details

    • getValue

      double getValue(double time, double assetValue)
      Returns the local volatility sigma(t, S).
      Parameters:
      time - The evaluation time.
      assetValue - The asset value.
      Returns:
      The local volatility.
    • getLocalVolatility

      default double getLocalVolatility(double time, double assetValue)
      Returns the local volatility sigma(t, S).
      Parameters:
      time - The evaluation time.
      assetValue - The asset value.
      Returns:
      The local volatility.
    • getValue

      default RandomVariable getValue(double time, RandomVariable assetValue)
      Returns the local volatility path-wise for a random variable representing the asset value.
      Parameters:
      time - The evaluation time.
      assetValue - The asset value random variable.
      Returns:
      The local volatility random variable.
    • getLocalVolatility

      default RandomVariable getLocalVolatility(double time, RandomVariable assetValue)
      Returns the local volatility path-wise for a random variable representing the asset value.
      Parameters:
      time - The evaluation time.
      assetValue - The asset value random variable.
      Returns:
      The local volatility random variable.