Class MultiPath
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
multiPathImmutableArray<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
Exceptions
- ArgumentOutOfRangeException
nAssetisn't positive.
Properties
AssetNumber
Gets the number of assets.
public int AssetNumber { get; }
Property Value
this[int]
The j-th asset's path.
public MonteCarloPath this[int j] { get; }
Parameters
jintThe asset's index.
Property Value
- MonteCarloPath
The path.
Exceptions
- ArgumentOutOfRangeException
jisn'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
jintThe asset's index.
Returns
- MonteCarloPath
The path.
Exceptions
- ArgumentOutOfRangeException
jis 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).