Class LocalVolMonteCarlo

java.lang.Object
com.quantfinlib.pricing.LocalVolMonteCarlo

public final class LocalVolMonteCarlo extends Object
Monte Carlo under Dupire local volatility, log-Euler scheme:
  X_{n+1} = X_n + (r − q − ½σ_n²) Δt + σ_n √Δt Z_n,   σ_n = σ_loc(t_n, e^{X_n}),   X = ln S

(Glasserman 2003, Monte Carlo Methods in Financial Engineering, section 6.1). With constant σ the scheme is exact in distribution. The local vol at each step is read from a table of GRID_POINTS log-moneyness nodes spanning ±8 ATM standard deviations of the final expiry, linearly interpolated and held flat beyond; the table is built once per call. Antithetic pairs; seeded SplittableRandom, so a given seed reproduces the same price.

  • Field Details

    • GRID_POINTS

      public static final int GRID_POINTS
      Local vol table size per time step.
      See Also:
  • Constructor Details

    • LocalVolMonteCarlo

      public LocalVolMonteCarlo(DupireLocalVol localVol)
  • Method Details

    • price

      public LocalVolMonteCarlo.Result price(BlackScholes.OptionType type, double strike, double expiry, int pathPairs, int steps, long seed)
      European option price.
      Parameters:
      pathPairs - number of antithetic pairs (≥ 1)
      steps - time steps (≥ 1)