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

#include <issuer.hpp>

+ Collaboration diagram for Issuer:

Public Types

typedef std::pair< DefaultProbKey, Handle< DefaultProbabilityTermStructure > > key_curve_pair
 

Public Member Functions

 Issuer (std::vector< key_curve_pair > probabilities=std::vector< key_curve_pair >(), DefaultEventSet events=DefaultEventSet())
 
 Issuer (const std::vector< std::vector< ext::shared_ptr< DefaultType > > > &eventTypes, const std::vector< Currency > &currencies, const std::vector< Seniority > &seniorities, const std::vector< Handle< DefaultProbabilityTermStructure > > &curves, DefaultEventSet events=DefaultEventSet())
 
Inspectors
const Handle< DefaultProbabilityTermStructure > & defaultProbability (const DefaultProbKey &key) const
 

Utilities

std::vector< std::pair< DefaultProbKey, Handle< DefaultProbabilityTermStructure > > > probabilities_
 probabilities of events for each bond collection More...
 
DefaultEventSet events_
 History of past events affecting this issuer. Notice it is possible. More...
 
ext::shared_ptr< DefaultEventdefaultedBetween (const Date &start, const Date &end, const DefaultProbKey &key, bool includeRefDate=false) const
 If a default event with the required seniority and. More...
 
std::vector< ext::shared_ptr< DefaultEvent > > defaultsBetween (const Date &start, const Date &end, const DefaultProbKey &contractKey, bool includeRefDate) const
 

Detailed Description

Definition at line 40 of file issuer.hpp.

Member Typedef Documentation

◆ key_curve_pair

Definition at line 44 of file issuer.hpp.

Constructor & Destructor Documentation

◆ Issuer() [1/2]

Issuer ( std::vector< key_curve_pair probabilities = std::vector< key_curve_pair >(),
DefaultEventSet  events = DefaultEventSet() 
)

The first argument represents the probability of an issuer of having any of its bonds with the given seniority, currency incurring in that particular event. The second argument represents the history of past events. Theres no check on whether the event list makes sense, events can occur several times and several of them can take place on the same date.

To do: add settlement event access

◆ Issuer() [2/2]

Issuer ( const std::vector< std::vector< ext::shared_ptr< DefaultType > > > &  eventTypes,
const std::vector< Currency > &  currencies,
const std::vector< Seniority > &  seniorities,
const std::vector< Handle< DefaultProbabilityTermStructure > > &  curves,
DefaultEventSet  events = DefaultEventSet() 
)

Definition at line 41 of file issuer.cpp.

Member Function Documentation

◆ defaultProbability()

const Handle< DefaultProbabilityTermStructure > & defaultProbability ( const DefaultProbKey key) const

Definition at line 60 of file issuer.cpp.

◆ defaultedBetween()

ext::shared_ptr< DefaultEvent > defaultedBetween ( const Date start,
const Date end,
const DefaultProbKey key,
bool  includeRefDate = false 
) const

If a default event with the required seniority and.

Definition at line 68 of file issuer.cpp.

◆ defaultsBetween()

std::vector< ext::shared_ptr< DefaultEvent > > defaultsBetween ( const Date start,
const Date end,
const DefaultProbKey contractKey,
bool  includeRefDate 
) const

Definition at line 84 of file issuer.cpp.

Member Data Documentation

◆ probabilities_

std::vector<std::pair<DefaultProbKey, Handle<DefaultProbabilityTermStructure> > > probabilities_
private

probabilities of events for each bond collection

Definition at line 94 of file issuer.hpp.

◆ events_

DefaultEventSet events_
private

History of past events affecting this issuer. Notice it is possible.

Definition at line 98 of file issuer.hpp.