Table of Contents

Class MultiPath

Namespace
NanoQL.Methods
Assembly
NanoQL.dll

Correlated multiple asset paths: multiPath[j] is the path followed by the j-th asset.

public sealed class MultiPath
Inheritance
MultiPath
Inherited Members

Remarks

A MultiPathGenerator<TGsg>'s sample is a view of its own paths, valid until its next draw; a multi-path built from paths copies them, as QuantLib's copies its vector.

Constructors

MultiPath()

Initializes a new instance of the MultiPath class, with no asset.

public MultiPath()

MultiPath(ImmutableArray<MonteCarloPath>)

Initializes a new instance of the MultiPath class from paths, which it copies.

public MultiPath(ImmutableArray<MonteCarloPath> multiPath)

Parameters

multiPath ImmutableArray<MonteCarloPath>

The assets' paths.

MultiPath(int, TimeGrid)

Initializes a new instance of the MultiPath class: paths of zeros over a time grid.

public MultiPath(int nAsset, TimeGrid timeGrid)

Parameters

nAsset int

The number of assets, positive.

timeGrid TimeGrid

The time grid.

Exceptions

ArgumentOutOfRangeException

nAsset isn't positive.

Properties

AssetNumber

Gets the number of assets.

public int AssetNumber { get; }

Property Value

int

this[int]

The j-th asset's path.

public MonteCarloPath this[int j] { get; }

Parameters

j int

The asset's index.

Property Value

MonteCarloPath

The path.

Exceptions

ArgumentOutOfRangeException

j isn't one of the assets, where QuantLib reads past its end.

Methods

At(int)

The j-th asset's path, its index checked: QuantLib's at.

public MonteCarloPath At(int j)

Parameters

j int

The asset's index.

Returns

MonteCarloPath

The path.

Exceptions

ArgumentOutOfRangeException

j is outside the assets.

PathSize()

The number of times in each path.

public int PathSize()

Returns

int

The paths' length.

Exceptions

NanoQLException

The multi-path has no asset, where QuantLib reads the first of no paths (a divergence: nanoql refuses it).