Table of Contents

Class InhomogeneousPoolLossModel<TCopula, TInitTraits>

Namespace
NanoQL.Experimental
Assembly
NanoQL.dll

The default loss distribution of a finite inhomogeneous pool by Hull-White bucketing: the conditional distributions of a one-factor constant-loss latent model integrated over the factor on a midpoint grid.

[Experimental("NQL0001")]
public class InhomogeneousPoolLossModel<TCopula, TInitTraits> : DefaultLossModel, IDefaultLossModel where TCopula : struct, ICopulaPolicy<TCopula, TInitTraits> where TInitTraits : struct

Type Parameters

TCopula

The copula policy.

TInitTraits

The policy's initialization parameters.

Inheritance
InhomogeneousPoolLossModel<TCopula, TInitTraits>
Implements
Derived
Inherited Members

Remarks

The losses are split into buckets from 0 to the tranche's detachment, and the expected tranche loss is a left Riemann sum of the excess probability: QuantLib's design, kept. Bound to a basket with realized defaults, the model prices its live names over the restated tranche; QuantLib's pairs the latent model's recoveries with the live notionals and refuses ("sizes differ: 3 vs 2").

Constructors

InhomogeneousPoolLossModel(ConstantLossLatentModel<TCopula, TInitTraits>, int, double, double, int)

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

public InhomogeneousPoolLossModel(ConstantLossLatentModel<TCopula, TInitTraits> copula, int nBuckets, double max = 5, double min = -5, int nSteps = 50)

Parameters

copula ConstantLossLatentModel<TCopula, TInitTraits>

The one-factor constant-loss latent model.

nBuckets int

The number of buckets.

max double

The factor grid's upper end.

min double

The factor grid's lower end.

nSteps int

The number of factor steps.

Exceptions

ArgumentNullException

copula is null.

ArgumentException

The latent model has more than one factor ("Inhomogeneous model not implemented for multifactor").

Methods

ExpectedShortfall(Date, double)

The expected shortfall at a percentile of the default loss.

public override double ExpectedShortfall(Date d, double percentile)

Parameters

d Date

The date.

percentile double

The percentile.

Returns

double

The shortfall.

Exceptions

NanoQLException

The model doesn't implement it.

ExpectedTrancheLoss(Date)

The expected tranche loss by a date, an amount.

public override double ExpectedTrancheLoss(Date d)

Parameters

d Date

The date.

Returns

double

The loss.

Exceptions

NanoQLException

The model doesn't implement it.

LossDistrib(Date)

The pool's loss distribution by a date, from 0 to the tranche's detachment.

protected Distribution LossDistrib(Date d)

Parameters

d Date

The date.

Returns

Distribution

The distribution.

Exceptions

NanoQLException

The model isn't bound to a basket.

Percentile(Date, double)

The value at risk at a percentile of the default loss.

public override double Percentile(Date d, double percentile)

Parameters

d Date

The date.

percentile double

The percentile.

Returns

double

The loss.

Exceptions

NanoQLException

The model doesn't implement it.

ResetModel()

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

protected override void ResetModel()