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 TypeMethodDescriptiondefault doublegetLocalVolatility(double time, double assetValue) Returns the local volatilitysigma(t, S).default RandomVariablegetLocalVolatility(double time, RandomVariable assetValue) Returns the local volatility path-wise for a random variable representing the asset value.doublegetValue(double time, double assetValue) Returns the local volatilitysigma(t, S).default RandomVariablegetValue(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 volatilitysigma(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 volatilitysigma(t, S).- Parameters:
time- The evaluation time.assetValue- The asset value.- Returns:
- The local volatility.
-
getValue
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
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.
-