Table of Contents

Class MCLDDiscreteArithmeticAPEngine

Namespace
NanoQL.PricingEngines
Assembly
NanoQL.dll

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

public static class MCLDDiscreteArithmeticAPEngine
Inheritance
MCLDDiscreteArithmeticAPEngine
Inherited Members

Methods

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

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

public static OneAssetOptionResults Calculate(DiscreteAveragingAsianOption option, EvaluationContext context, GeneralizedBlackScholesProcess process, bool brownianBridge, bool antitheticVariate, bool controlVariate, int? requiredSamples, double? requiredTolerance, int? maxSamples, long seed)

Parameters

option DiscreteAveragingAsianOption

The option.

context EvaluationContext

The evaluation context.

process GeneralizedBlackScholesProcess

The Black-Scholes process.

brownianBridge bool

Whether the draws are ordered by a Brownian bridge.

antitheticVariate bool

Whether antithetic variates are used.

controlVariate bool

Whether the geometric average is a control variate.

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].

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.

ArgumentOutOfRangeException

A number of samples 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.