Table of Contents

Class MCAmericanBasketEngine

Namespace
NanoQL.PricingEngines
Assembly
NanoQL.dll

The Longstaff-Schwartz Monte Carlo engine for American and Bermudan basket options on correlated processes.

public static class MCAmericanBasketEngine
Inheritance
MCAmericanBasketEngine
Inherited Members

Remarks

The method is intrinsically weak for out-of-the-money options, as QuantLib warns. The pricing and the calibration draw from the same traits; the value, its error estimate where the traits allow one, and the exercise probability among the additional results as "exerciseProbability", as QuantLib's. The calibration is one call's working state.

The paths run on the clock spanning every Black-Scholes process's structures, each process read on it, and the payoffs are discounted on the first process's risk-free curve at that clock's times, where QuantLib evolves every process on the first's times (Divergences/TwoAssetMismatchedTimesTests.cs); a market on one clock keeps QuantLib's arithmetic.

Methods

Calculate<TRng, TStats>(BasketOption, EvaluationContext, StochasticProcessArray, int?, int?, bool, bool, int?, double?, int?, long, int?, int, LsmBasisSystemPolynomialType, long?)

Prices an American or Bermudan basket option by Longstaff-Schwartz.

public static MultiAssetOptionResults Calculate<TRng, TStats>(BasketOption option, EvaluationContext context, StochasticProcessArray processes, int? timeSteps, int? timeStepsPerYear, bool brownianBridge, bool antitheticVariate, int? requiredSamples, double? requiredTolerance, int? maxSamples, long seed, int? nCalibrationSamples = null, int polynomialOrder = 2, LsmBasisSystemPolynomialType polynomialType = LsmBasisSystemPolynomialType.Monomial, long? seedCalibration = null) where TRng : IRngTraits where TStats : IStatistics, new()

Parameters

option BasketOption

The basket option, of an early exercise.

context EvaluationContext

The evaluation context.

processes StochasticProcessArray

The assets' correlated processes, the first a 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.

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.

maxSamples int?

The most samples for a tolerance, or null.

seed long

The seed, in [1, 4294967295].

nCalibrationSamples int?

The calibration samples, or null for 2,048.

polynomialOrder int

The regression basis' highest order.

polynomialType LsmBasisSystemPolynomialType

The regression basis' family.

seedCalibration long?

The calibration seed, in [1, 4294967295], or null for the Longstaff-Schwartz base's default; QuantLib's engine takes none, and its base's default is always 4294967295, the narrowed null, which passing that seed reproduces.

Returns

MultiAssetOptionResults

The option's results: the value, its error estimate, and the exercise probability.

Type Parameters

TRng

The random number traits of both simulations.

TStats

The statistics accumulator.

Exceptions

ArgumentNullException

An argument is null.

ArgumentException

The steps are given neither or both ways or aren't positive, or the basis family is another.

ArgumentOutOfRangeException

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

NanoQLException

The first process isn't a Black-Scholes process, the exercise isn't early or pays at expiry, or the samples can't reach the tolerance.