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
creditEventDateDateThe credit event's date.
currencyCurrencyThe bonds' currency; null for QuantLib's empty currency.
bondsSenioritySeniorityThe seniority of the bonds that triggered the event.
settleDateDate?The settlement date, or null for an event not settled.
recoveryRatesIReadOnlyDictionary<Seniority, double>The realized recoveries by seniority (DefaultEvent's map form).
Exceptions
- ArgumentException
As DefaultEvent's map constructor.
- ArgumentOutOfRangeException
bondsSeniorityisn'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
creditEventDateDateThe credit event's date.
currencyCurrencyThe bonds' currency; null for QuantLib's empty currency.
bondsSenioritySeniorityThe seniority of the bonds that triggered the event, the seniority the recovery settles (every ISDA seniority for NoSeniority).
settleDateDate?The settlement date, or null for an event not settled.
recoveryRatedoubleThe realized recovery.
Exceptions
- ArgumentException
As DefaultEvent's single-rate constructor.
- ArgumentOutOfRangeException
bondsSeniorityisn'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
contractEventTypeDefaultTypeThe contract's event type.
contextEvaluationContextThe evaluation context.
Returns
Exceptions
- ArgumentNullException
An argument is null.