QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
DefaultEvent::DefaultSettlement Class Reference

#include <defaultevent.hpp>

+ Inheritance diagram for DefaultEvent::DefaultSettlement:
+ Collaboration diagram for DefaultEvent::DefaultSettlement:

Public Member Functions

Date date () const override
 returns the date at which the event occurs More...
 
Real recoveryRate (Seniority sen) const
 
void accept (AcyclicVisitor &) override
 
- Public Member Functions inherited from Event
 ~Event () override=default
 
virtual bool hasOccurred (const Date &refDate=Date(), ext::optional< bool > includeRefDate=ext::nullopt) const
 returns true if an event has already occurred before a date More...
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 

Protected Member Functions

 DefaultSettlement (const Date &date, const std::map< Seniority, Real > &recoveryRates)
 
 DefaultSettlement (const Date &date=Date(), Seniority seniority=NoSeniority, Real recoveryRate=0.4)
 

Private Attributes

Date settlementDate_
 
std::map< Seniority, RealrecoveryRates_
 Realized recovery rates. More...
 

Friends

class DefaultEvent
 

Detailed Description

Definition at line 51 of file defaultevent.hpp.

Constructor & Destructor Documentation

◆ DefaultSettlement() [1/2]

DefaultSettlement ( const Date date,
const std::map< Seniority, Real > &  recoveryRates 
)
protected

Default settlement events encode the settlement date and the recovery rates for the affected seniorities. Specific events might require different sets of recoveries to be present. The way these objects are constructed is a prerogative of the particular event class.

Definition at line 54 of file defaultevent.cpp.

◆ DefaultSettlement() [2/2]

DefaultSettlement ( const Date date = Date(),
Seniority  seniority = NoSeniority,
Real  recoveryRate = 0.4 
)
protected

When NoSeniority is passed all seniorities are assumed to have settled to the recovery passed.

Definition at line 63 of file defaultevent.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ date()

Date date ( ) const
overridevirtual

returns the date at which the event occurs

Implements Event.

Definition at line 42 of file defaultevent.cpp.

+ Here is the caller graph for this function:

◆ recoveryRate()

Real recoveryRate ( Seniority  sen) const

Returns the recovery rate of a default event which has already settled.

Definition at line 77 of file defaultevent.cpp.

+ Here is the caller graph for this function:

◆ accept()

void accept ( AcyclicVisitor v)
overridevirtual

Reimplemented from Event.

Definition at line 46 of file defaultevent.cpp.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ DefaultEvent

friend class DefaultEvent
friend

Definition at line 53 of file defaultevent.hpp.

Member Data Documentation

◆ settlementDate_

Date settlementDate_
private

Definition at line 79 of file defaultevent.hpp.

◆ recoveryRates_

std::map<Seniority, Real> recoveryRates_
private

Realized recovery rates.

Definition at line 81 of file defaultevent.hpp.