Table of Contents

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

nBuckets int

The number of buckets.

maximum double

The largest loss.

simulations int

The number of paths.

seed long

The Mersenne Twister's seed, in [1, 4294967295]; QuantLib's default is 42.

epsilon double

The shift each path's loss takes into its bucket.

Exceptions

ArgumentOutOfRangeException

seed lies outside [1, 4294967295].

Properties

Buckets

Gets the number of buckets of the distributions built.

public override int Buckets { get; }

Property Value

int

Maximum

Gets the distributions' largest loss.

public override double Maximum { get; }

Property Value

double

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

volumes IReadOnlyList<double>

The names' volumes (losses given default).

probabilities IReadOnlyList<double>

The names' default probabilities.

Returns

Distribution

The distribution.

Exceptions

ArgumentNullException

A list is null.