Table of Contents

Class MCDiscreteGeometricAPHestonEngine

Namespace
NanoQL.PricingEngines
Assembly
NanoQL.dll

The Monte Carlo engine for discrete geometric average-price Asian options on a Heston process.

public static class MCDiscreteGeometricAPHestonEngine
Inheritance
MCDiscreteGeometricAPHestonEngine
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> on multi-variate paths, the grid the fixing times with the steps or steps per year given, the seed explicit. The process is HestonProcess or a process deriving it, QuantLib's template parameter P.

Documented divergences. The paths and the discount run on the engine's clock, Clock(HestonProcess, FdmQuantoHelper?, LocalVolTermStructure?), from the earliest reference date of the structures, where QuantLib's run on the risk-free curve's (Divergences/AsianMismatchedTimesTests.cs). The geometric product is kept in double's normal range and the past fixings are read by their log where their product leaves it (GeometricAPOHestonPathPricer); a fixing date given twice counts twice.

Methods

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

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

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

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.

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.

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.