Table of Contents

Class MCLDBarrierEngine

Namespace
NanoQL.PricingEngines
Assembly
NanoQL.dll

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

public static class MCLDBarrierEngine
Inheritance
MCLDBarrierEngine
Inherited Members

Methods

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

Prices a barrier option by Monte Carlo.

public static OneAssetOptionResults Calculate(BarrierOption option, EvaluationContext context, GeneralizedBlackScholesProcess process, int? timeSteps, int? timeStepsPerYear, bool brownianBridge, bool antitheticVariate, int? requiredSamples, double? requiredTolerance, int? maxSamples, bool isBiased, long seed)

Parameters

option BarrierOption

The option.

context EvaluationContext

The evaluation context.

process GeneralizedBlackScholesProcess

The Black-Scholes process.

timeSteps int?

The number of time steps, or null for steps per year.

timeStepsPerYear int?

The number of time steps per year, or null for a number of steps.

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.

isBiased bool

Whether the barrier is checked at the path's points only.

seed long

The seed, in [1, 4294967295].

Returns

OneAssetOptionResults

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

Exceptions

ArgumentNullException

The option, the context or the process is null.

ArgumentException

The time steps are given neither or both ways, or aren't positive.

ArgumentOutOfRangeException

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

NanoQLException

The exercise isn't European, the spot isn't positive or lies beyond the barrier ("barrier touched"), the payoff isn't plain vanilla, neither a tolerance nor a number of samples is given, or the samples can't reach the tolerance.