quantlib.pricingengines.forward.mc_variance_swap_engine.

MCVarianceSwapEngine

class MCVarianceSwapEngine(GeneralizedBlackScholesProcess process, Size time_steps=Null[Integer](), Size time_steps_per_year=Null[Integer](), bool brownian_bridge=False, bool antithetic_variate=False, Size required_samples=Null[Integer](), Real required_tolerance=Null[Real](), Size max_samples=Null[Integer](), BigNatural seed=0)

Bases: PricingEngine

Variance-swap pricing engine using Monte Carlo simulation

as described in Demeterfi, Derman, Kamal & Zou, “A Guide to Volatility and Variance Swaps”, 1999 TODO define tolerance of numerical integral and incorporate it in errorEstimate

Test returned fair variances checked for consistency with implied volatility curve.

Calculate variance via Monte Carlo

Parameters:
processGeneralizedBlackScholesProcess
time_stepsSize
time_steps_per_yearSize
brownian_bridgebool
antithetic_variatebool
required_samplesSize
required_toleranceReal
max_samplesSize
seedBigNatural