Class LossDistMonteCarlo
- Namespace
- NanoQL.Experimental
- Assembly
- NanoQL.dll
The loss distribution of varying volumes and default probabilities by a Monte Carlo simulation of independent defaults, each a Mersenne Twister draw at or below its probability.
[Experimental("NQL0001")]
public sealed class LossDistMonteCarlo : LossDist
- Inheritance
-
LossDistMonteCarlo
- Inherited Members
Remarks
The seed is required, in [1, 4294967295]; QuantLib's defaults to 42, which gives its draws.
Constructors
LossDistMonteCarlo(int, double, int, long, double)
Initializes a new instance of the LossDistMonteCarlo class.
public LossDistMonteCarlo(int nBuckets, double maximum, int simulations, long seed, double epsilon = 1E-06)
Parameters
nBucketsintThe number of buckets.
maximumdoubleThe largest loss.
simulationsintThe number of paths.
seedlongThe Mersenne Twister's seed, in [1, 4294967295]; QuantLib's default is 42.
epsilondoubleThe shift each path's loss takes into its bucket.
Exceptions
- ArgumentOutOfRangeException
seedlies outside [1, 4294967295].
Properties
Buckets
Gets the number of buckets of the distributions built.
public override int Buckets { get; }
Property Value
Maximum
Gets the distributions' largest loss.
public override double Maximum { get; }
Property Value
Methods
Evaluate(IReadOnlyList<double>, IReadOnlyList<double>)
The distribution of the pool's loss: QuantLib's operator().
public override Distribution Evaluate(IReadOnlyList<double> volumes, IReadOnlyList<double> probabilities)
Parameters
volumesIReadOnlyList<double>The names' volumes (losses given default).
probabilitiesIReadOnlyList<double>The names' default probabilities.
Returns
- Distribution
The distribution.
Exceptions
- ArgumentNullException
A list is null.