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 | List of all members
ConstantRecoveryModel Class Reference

#include <recoveryratemodel.hpp>

+ Inheritance diagram for ConstantRecoveryModel:
+ Collaboration diagram for ConstantRecoveryModel:

Public Member Functions

 ConstantRecoveryModel (const Handle< RecoveryRateQuote > &quote)
 
 ConstantRecoveryModel (Real recovery, Seniority sen=NoSeniority)
 
void update () override
 
bool appliesToSeniority (Seniority) const override
 
- Public Member Functions inherited from RecoveryRateModel
virtual Real recoveryValue (const Date &defaultDate, const DefaultProbKey &defaultKey=DefaultProbKey()) const
 
virtual bool appliesToSeniority (Seniority) const =0
 
 ~RecoveryRateModel () override=default
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
virtual void deepUpdate ()
 

Protected Member Functions

Real recoveryValueImpl (const Date &, const DefaultProbKey &) const override
 
virtual Real recoveryValueImpl (const Date &, const DefaultProbKey &defaultKey) const =0
 

Private Attributes

Handle< RecoveryRateQuotequote_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 

Detailed Description

Simple Recovery Rate model returning the constant value of the quote independently of the date and the seniority.

Examples
LatentModel.cpp.

Definition at line 62 of file recoveryratemodel.hpp.

Constructor & Destructor Documentation

◆ ConstantRecoveryModel() [1/2]

ConstantRecoveryModel ( const Handle< RecoveryRateQuote > &  quote)
explicit

Definition at line 24 of file recoveryratemodel.cpp.

+ Here is the call graph for this function:

◆ ConstantRecoveryModel() [2/2]

ConstantRecoveryModel ( Real  recovery,
Seniority  sen = NoSeniority 
)
explicit

Definition at line 30 of file recoveryratemodel.cpp.

Member Function Documentation

◆ update()

void update ( )
overridevirtual

This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.

Implements Observer.

Definition at line 68 of file recoveryratemodel.hpp.

+ Here is the call graph for this function:

◆ appliesToSeniority()

bool appliesToSeniority ( Seniority  ) const
overridevirtual

Returns true if the model will return recovery rates for the requested seniority.

Implements RecoveryRateModel.

Definition at line 69 of file recoveryratemodel.hpp.

◆ recoveryValueImpl()

Real recoveryValueImpl ( const Date ,
const DefaultProbKey  
) const
overrideprotectedvirtual

Notice the quote's value is returned without a check on a match of the seniorties of the quote and the request.

Implements RecoveryRateModel.

Definition at line 76 of file recoveryratemodel.hpp.

Member Data Documentation

◆ quote_

Handle<RecoveryRateQuote> quote_
private

Definition at line 82 of file recoveryratemodel.hpp.