Local Volatility Models
This module contains implementations of local volatility models used in quantitative finance.
- class torchquantlib.models.local_volatility.dupire_local_volatility.DupireLocalVol(local_vol_func)[source]
Bases:
StochasticModelDupire local volatility model.
This model extends the Black-Scholes model by allowing the volatility to be a function of both the underlying asset price and time. It is based on Dupire’s formula, which relates the local volatility to the implied volatility surface.
The model is described by the following stochastic differential equation: dS = μSdt + σ(S,t)SdW
where: S is the asset price μ is the drift (usually the risk-free rate) σ(S,t) is the local volatility function W is a Wiener process
- simulate(S0, T, N, steps=100)[source]
Simulate asset price paths using the Dupire Local Volatility model.
- Parameters:
S0 (float) – Initial asset price.
T (float) – Time horizon for simulation.
N (int) – Number of simulation paths.
steps (int) – Number of time steps in each path.
- Returns:
Simulated asset prices at time T.
- Return type:
torch.Tensor