Table of Contents

Class BankruptcyEvent

Namespace
NanoQL.Experimental
Assembly
NanoQL.dll

A bankruptcy: a default event stronger than every other, which matches every contract event type.

[Experimental("NQL0001")]
public sealed class BankruptcyEvent : DefaultEvent, IEquatable<DefaultEvent>
Inheritance
BankruptcyEvent
Implements
Inherited Members

Remarks

A settlement settles the seniorities it holds, or the one its single rate names, as any event's does: QuantLib's map constructor refuses a settlement that doesn't hold all five ISDA seniorities ("Bankruptcy event should have settled for all seniorities.", defaultevent.cpp:210-213), while its single-rate constructor fills the others with ISDA's conventional recoveries, so the two forms disagree. A documented divergence (Divergences/SingleSenioritySettlementTests.cs); no QuantLib code or test builds one.

Constructors

BankruptcyEvent(Date, Currency?, Seniority, Date?, IReadOnlyDictionary<Seniority, double>?)

Initializes a new instance of the BankruptcyEvent class, settled for the seniorities a map holds.

public BankruptcyEvent(Date creditEventDate, Currency? currency, Seniority bondsSeniority, Date? settleDate, IReadOnlyDictionary<Seniority, double>? recoveryRates)

Parameters

creditEventDate Date

The credit event's date.

currency Currency

The bonds' currency; null for QuantLib's empty currency.

bondsSeniority Seniority

The seniority of the bonds that triggered the event.

settleDate Date?

The settlement date, or null for an event not settled.

recoveryRates IReadOnlyDictionary<Seniority, double>

The realized recoveries by seniority (DefaultEvent's map form).

Exceptions

ArgumentException

As DefaultEvent's map constructor.

ArgumentOutOfRangeException

bondsSeniority isn't a member of its type.

BankruptcyEvent(Date, Currency?, Seniority, Date?, double)

Initializes a new instance of the BankruptcyEvent class, settled at one recovery rate.

public BankruptcyEvent(Date creditEventDate, Currency? currency, Seniority bondsSeniority, Date? settleDate, double recoveryRate)

Parameters

creditEventDate Date

The credit event's date.

currency Currency

The bonds' currency; null for QuantLib's empty currency.

bondsSeniority Seniority

The seniority of the bonds that triggered the event, the seniority the recovery settles (every ISDA seniority for NoSeniority).

settleDate Date?

The settlement date, or null for an event not settled.

recoveryRate double

The realized recovery.

Exceptions

ArgumentException

As DefaultEvent's single-rate constructor.

ArgumentOutOfRangeException

bondsSeniority isn't a member of its type.

Methods

MatchesEventType(DefaultType, EvaluationContext)

A bankruptcy triggers every contract event type.

public override bool MatchesEventType(DefaultType contractEventType, EvaluationContext context)

Parameters

contractEventType DefaultType

The contract's event type.

context EvaluationContext

The evaluation context.

Returns

bool

true.

Exceptions

ArgumentNullException

An argument is null.