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

Stores a recovery rate market quote and the associated seniority. More...

#include <recoveryratequote.hpp>

+ Inheritance diagram for RecoveryRateQuote:
+ Collaboration diagram for RecoveryRateQuote:

Public Member Functions

 RecoveryRateQuote (Real value=Null< Real >(), Seniority seniority=NoSeniority)
 
Quote interface
Real value () const override
 returns the current value More...
 
Seniority seniority () const
 
bool isValid () const override
 returns true if the Quote holds a valid value More...
 
- Public Member Functions inherited from Quote
 ~Quote () override=default
 
virtual Real value () const =0
 returns the current value More...
 
virtual bool isValid () const =0
 returns true if the Quote holds a valid value 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 ()
 

Static Public Member Functions

static Real conventionalRecovery (Seniority sen)
 

Friends

std::map< Seniority, RealmakeIsdaConvMap ()
 Helper function for conventional recoveries. Returns the ISDA. More...
 

Modifiers

static const Real IsdaConvRecoveries []
 
Seniority seniority_
 
Real recoveryRate_
 
template<Size N>
static std::map< Seniority, RealmakeIsdaMap (const Real(&(arrayIsdaRR))[N])
 
Real setValue (Real value=Null< Real >())
 returns the difference between the new value and the old value More...
 
void reset ()
 

Detailed Description

Stores a recovery rate market quote and the associated seniority.

Definition at line 30 of file recoveryratequote.hpp.

Constructor & Destructor Documentation

◆ RecoveryRateQuote()

RecoveryRateQuote ( Real  value = Null<Real>(),
Seniority  seniority = NoSeniority 
)

Definition at line 37 of file recoveryratequote.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ conventionalRecovery()

static Real conventionalRecovery ( Seniority  sen)
static

Returns a map with the ISDA conventional (values by default) of the recovery rate per each ISDA seniority.

Definition at line 36 of file recoveryratequote.hpp.

◆ value()

Real value ( ) const
overridevirtual

returns the current value

Implements Quote.

Definition at line 74 of file recoveryratequote.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ seniority()

Seniority seniority ( ) const

Definition at line 70 of file recoveryratequote.hpp.

◆ isValid()

bool isValid ( ) const
overridevirtual

returns true if the Quote holds a valid value

Implements Quote.

Definition at line 79 of file recoveryratequote.hpp.

+ Here is the caller graph for this function:

◆ setValue()

Real setValue ( Real  value = Null<Real>())

returns the difference between the new value and the old value

Definition at line 45 of file recoveryratequote.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset()

void reset ( )

Definition at line 54 of file recoveryratequote.cpp.

+ Here is the call graph for this function:

◆ makeIsdaMap()

std::map< Seniority, Real > makeIsdaMap ( const   Real(&(arrayIsdaRR))[N])
static

Turn a set of recoveries into a seniority-recovery map (intended to be used in an event construction)

Definition at line 94 of file recoveryratequote.hpp.

Friends And Related Function Documentation

◆ makeIsdaConvMap

std::map< Seniority, Real > makeIsdaConvMap ( )
friend

Helper function for conventional recoveries. Returns the ISDA.

Definition at line 32 of file recoveryratequote.cpp.

Member Data Documentation

◆ IsdaConvRecoveries

const Real IsdaConvRecoveries
staticprivate
Initial value:
= {
0.65,
0.4,
0.2,
0.2,
0.15
}

Definition at line 63 of file recoveryratequote.hpp.

◆ seniority_

Seniority seniority_
private

Definition at line 65 of file recoveryratequote.hpp.

◆ recoveryRate_

Real recoveryRate_
private

Definition at line 67 of file recoveryratequote.hpp.