Table of Contents

Class MCDiscreteArithmeticASEngine

Namespace
NanoQL.PricingEngines
Assembly
NanoQL.dll

The Monte Carlo engine for discrete arithmetic average-strike Asian options on a Black-Scholes process.

public static class MCDiscreteArithmeticASEngine
Inheritance
MCDiscreteArithmeticASEngine
Inherited Members

Remarks

The value and, where the generator allows one, its error estimate, with the grid as the additional result "TimeGrid", as QuantLib's: a static class over a private simulation deriving MCDiscreteAveragingAsianEngineBase<TMc, TPath, TStats>, the exercise a time of the grid where it follows the last fixing, the seed explicit.

Documented divergences. The paths and the discount run on the engine's clock, Clock(GeneralizedBlackScholesProcess, FdmQuantoHelper?), from the earliest reference date of the structures, where QuantLib's run on the risk-free curve's (Divergences/AsianMismatchedTimesTests.cs); a fixing date given twice counts twice in the average strike (Divergences/AsianDuplicateFixingsTests.cs).

Methods

Calculate<TRng, TStats>(DiscreteAveragingAsianOption, EvaluationContext, GeneralizedBlackScholesProcess, bool, bool, int?, double?, int?, long)

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

public static OneAssetOptionResults Calculate<TRng, TStats>(DiscreteAveragingAsianOption option, EvaluationContext context, GeneralizedBlackScholesProcess process, bool brownianBridge, bool antitheticVariate, int? requiredSamples, double? requiredTolerance, int? maxSamples, long seed) where TRng : IRngTraits where TStats : IStatistics, new()

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.

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.

Type Parameters

TRng

The random-number traits.

TStats

The statistics accumulator.

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.