Class LocalVolMonteCarlo
java.lang.Object
com.quantfinlib.pricing.LocalVolMonteCarlo
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordPrice and its Monte Carlo standard error. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intLocal vol table size per time step. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprice(BlackScholes.OptionType type, double strike, double expiry, int pathPairs, int steps, long seed) European option price.
-
Field Details
-
GRID_POINTS
public static final int GRID_POINTSLocal vol table size per time step.- See Also:
-
-
Constructor Details
-
LocalVolMonteCarlo
-
-
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)
-