Table of Contents

Class RandomLossLM<TCopula, TInitTraits, TUsng>

Namespace
NanoQL.Experimental
Assembly
NanoQL.dll

The random spot recovery rate loss model simulation for any copula: each path's defaults and their recoveries, on a spot-recovery latent model's default and recovery variables.

[Experimental("NQL0001")]
public class RandomLossLM<TCopula, TInitTraits, TUsng> : RandomLM<TCopula, TInitTraits, TUsng>, IDefaultLossModel where TCopula : struct, ICopulaPolicy<TCopula, TInitTraits> where TInitTraits : struct where TUsng : class, ISeedableRsg<TUsng>

Type Parameters

TCopula

The copula policy.

TInitTraits

The policy's initialization parameters.

TUsng

The uniform sequence generator, which the copula inverts.

Inheritance
RandomLM<TCopula, TInitTraits, TUsng>
RandomLossLM<TCopula, TInitTraits, TUsng>
Implements
Derived
Inherited Members

Remarks

A default's recovery is kept in 256ths, QuantLib's rounding, as a value: QuantLib's stores the count in 8 bits, so a recovery of 1, 256/256, reads 0, a full loss for no loss, and its 12-bit name and day fields wrap past 4,095. Bound to a basket, the model simulates the live names. The simulation's rules are RandomLM<TCopula, TInitTraits, TUsng>'s.

Constructors

RandomLossLM(SpotRecoveryLatentModel<TCopula, TInitTraits>, int, long, double, int)

Initializes a new instance of the RandomLossLM<TCopula, TInitTraits, TUsng> class.

public RandomLossLM(SpotRecoveryLatentModel<TCopula, TInitTraits> copula, int nSims, long seed, double accuracy = 1E-06, int maxHorizon = 4050)

Parameters

copula SpotRecoveryLatentModel<TCopula, TInitTraits>

The spot-recovery latent model.

nSims int

The number of paths, at least 1.

seed long

The generator's seed, in [1, 4294967295]; QuantLib's default is 2863311530.

accuracy double

The default day's solver accuracy.

maxHorizon int

The simulation's horizon in days, QuantLib's 4,050 by default.

Exceptions

ArgumentNullException

copula is null.

ArgumentOutOfRangeException

A count or the seed lies outside its range.

Methods

ResetModel()

The model's per-basket precomputation, run once on the bound copy: QuantLib's resetModel.

protected override void ResetModel()