Table of Contents

Class MCLDDiscreteArithmeticAPHestonEngine

Namespace
NanoQL.PricingEngines
Assembly
NanoQL.dll

MCDiscreteArithmeticAPHestonEngine on low-discrepancy draws with QuantLib's default statistics: QuantLib-Python's MCLDDiscreteArithmeticAPHestonEngine, QuantLib's MCDiscreteArithmeticAPHestonEngine<LowDiscrepancy>, its calculations closed at LowDiscrepancy and GeneralStatistics.

public static class MCLDDiscreteArithmeticAPHestonEngine
Inheritance
MCLDDiscreteArithmeticAPHestonEngine
Inherited Members

Methods

Calculate(DiscreteAveragingAsianOption, EvaluationContext, HestonProcess, bool, int?, double?, int?, long, int?, int?, bool)

Prices a discrete arithmetic average-price Asian option by Monte Carlo on a Heston process.

public static OneAssetOptionResults Calculate(DiscreteAveragingAsianOption option, EvaluationContext context, HestonProcess process, bool antitheticVariate, int? requiredSamples, double? requiredTolerance, int? maxSamples, long seed, int? timeSteps = null, int? timeStepsPerYear = null, bool controlVariate = false)

Parameters

option DiscreteAveragingAsianOption

The option.

context EvaluationContext

The evaluation context.

process HestonProcess

The Heston process.

antitheticVariate bool

Whether antithetic variates are used.

requiredSamples int?

The number of samples, or null.

requiredTolerance double?

The absolute tolerance, or null; it takes precedence.

maxSamples int?

The most samples for a tolerance, or null for no limit.

seed long

The seed, in [1, 4294967295].

timeSteps int?

The number of time steps, or null.

timeStepsPerYear int?

The number of time steps per year, or null.

controlVariate bool

Whether the geometric average is a control variate.

Returns

OneAssetOptionResults

The option's results, the NPV, the error estimate and the grid; the expired results when it has expired.

Exceptions

ArgumentNullException

The option, the context or the process is null.

ArgumentException

Both the time steps and the time steps per year are given.

ArgumentOutOfRangeException

A number of samples or steps is negative, or the seed is outside its range.

NanoQLException

The option's past fixings fail its checks, the payoff isn't plain vanilla, the exercise isn't European, every fixing is in the past, or the samples can't reach the tolerance.