Table of Contents

Class AmericanPathPricer

Namespace
NanoQL.PricingEngines
Assembly
NanoQL.dll

The American early-exercise path pricer: the payoff of the underlying at a time step, the state the underlying scaled by the strike, and a polynomial basis of the state with the payoff as one more function.

public sealed class AmericanPathPricer : IEarlyExercisePathPricer<MonteCarloPath, double>
Inheritance
AmericanPathPricer
Implements
Inherited Members

Remarks

Immutable. The state is the underlying divided by the strike where the payoff is striked, for the regression's numerical stability. The Legendre and first-kind Chebyshev bases are refused, as QuantLib refuses them; the second-kind Chebyshev basis is NaN above 1, so a call's regression, on its in-the-money paths, is refused by the singular value decomposition.

Constructors

AmericanPathPricer(Payoff, int, LsmBasisSystemPolynomialType)

Initializes a new instance of the AmericanPathPricer class.

public AmericanPathPricer(Payoff payoff, int polynomialOrder, LsmBasisSystemPolynomialType polynomialType)

Parameters

payoff Payoff

The payoff.

polynomialOrder int

The basis' highest order.

polynomialType LsmBasisSystemPolynomialType

The basis' family: monomial, Laguerre, Hermite, hyperbolic or second-kind Chebyshev.

Exceptions

ArgumentNullException

payoff is null.

ArgumentOutOfRangeException

polynomialOrder is negative.

ArgumentException

The family is Legendre or first-kind Chebyshev ("insufficient polynomial type").

NanoQLException

The family is unknown.

Methods

BasisSystem()

The basis: the polynomials of the state, then the payoff of the state.

public ImmutableArray<Func<double, double>> BasisSystem()

Returns

ImmutableArray<Func<double, double>>

The basis functions.

Evaluate(MonteCarloPath, int)

The payoff of the underlying at a time step.

public double Evaluate(MonteCarloPath path, int t)

Parameters

path MonteCarloPath

The path.

t int

The time step's index.

Returns

double

The exercise value.

Exceptions

ArgumentOutOfRangeException

t isn't a point of the path, where QuantLib reads past its end.

State(MonteCarloPath, int)

The scaled underlying at a time step.

public double State(MonteCarloPath path, int t)

Parameters

path MonteCarloPath

The path.

t int

The time step's index.

Returns

double

The state.

Exceptions

ArgumentOutOfRangeException

t isn't a point of the path, where QuantLib reads past its end.