Table of Contents

Class DoubleBarrierPathPricer

Namespace
NanoQL.Experimental
Assembly
NanoQL.dll

The path pricer of a double barrier option: either barrier is checked at the path's points, a knock-out paying its rebate at the first hit's node and a knock-in its rebate at expiry where neither is hit.

[Experimental("NQL0001")]
public sealed class DoubleBarrierPathPricer : PathPricer<MonteCarloPath>
Inheritance
DoubleBarrierPathPricer
Inherited Members

Remarks

Immutable and public, as QuantLib's.

Constructors

DoubleBarrierPathPricer(DoubleBarrierType, double, double, double, OptionType, double, IEnumerable<double>)

Initializes a new instance of the DoubleBarrierPathPricer class.

public DoubleBarrierPathPricer(DoubleBarrierType barrierType, double barrierLow, double barrierHigh, double rebate, OptionType type, double strike, IEnumerable<double> discounts)

Parameters

barrierType DoubleBarrierType

The barrier's type, a knock-in or a knock-out.

barrierLow double

The lower barrier, positive.

barrierHigh double

The upper barrier, positive.

rebate double

The rebate.

type OptionType

The option type.

strike double

The strike, non-negative.

discounts IEnumerable<double>

The discount factors at the path's grid times.

Exceptions

ArgumentNullException

discounts is null.

ArgumentOutOfRangeException

barrierType or type isn't a member of its type.

ArgumentException

The strike is negative ("strike less than zero not allowed") or a barrier isn't positive.

Methods

Evaluate(MonteCarloPath)

The discounted payoff on a path, the barriers checked at its points.

public override double Evaluate(MonteCarloPath path)

Parameters

path MonteCarloPath

The path.

Returns

double

The value.

Exceptions

ArgumentNullException

path is null.

NanoQLException

The path has fewer than two points, or the type is a KIKO or a KOKI ("unknown barrier type").