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

#include <randomdefaultmodel.hpp>

+ Inheritance diagram for GaussianRandomDefaultModel:
+ Collaboration diagram for GaussianRandomDefaultModel:

Public Member Functions

 GaussianRandomDefaultModel (const ext::shared_ptr< Pool > &pool, const std::vector< DefaultProbKey > &defaultKeys, const Handle< OneFactorCopula > &copula, Real accuracy, long seed)
 
void nextSequence (Real tmax=QL_MAX_REAL) override
 
void reset () override
 
- Public Member Functions inherited from RandomDefaultModel
 RandomDefaultModel (const ext::shared_ptr< Pool > &pool, const std::vector< DefaultProbKey > &defaultKeys)
 
 ~RandomDefaultModel () override=default
 
void update () override
 
virtual void nextSequence (Real tmax=QL_MAX_REAL)=0
 
virtual void reset ()=0
 
- 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 ()
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 

Private Attributes

Handle< OneFactorCopulacopula_
 
Real accuracy_
 
long seed_
 
PseudoRandom::rsg_type rsg_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Attributes inherited from RandomDefaultModel
ext::shared_ptr< Poolpool_
 
std::vector< DefaultProbKeydefaultKeys_
 

Detailed Description

Random default times using a one-factor Gaussian copula.

Definition at line 63 of file randomdefaultmodel.hpp.

Constructor & Destructor Documentation

◆ GaussianRandomDefaultModel()

GaussianRandomDefaultModel ( const ext::shared_ptr< Pool > &  pool,
const std::vector< DefaultProbKey > &  defaultKeys,
const Handle< OneFactorCopula > &  copula,
Real  accuracy,
long  seed 
)

Definition at line 49 of file randomdefaultmodel.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ nextSequence()

void nextSequence ( Real  tmax = QL_MAX_REAL)
overridevirtual

Generate a sequence of random default times, one for each name in the pool, and store the result in the Pool using method setTime(name). tmax denotes the maximum relevant time- default times > tmax are not computed but set to tmax + 1 instead to save coputation time.

Implements RandomDefaultModel.

Definition at line 65 of file randomdefaultmodel.cpp.

+ Here is the call graph for this function:

◆ reset()

void reset ( )
overridevirtual

Implements RandomDefaultModel.

Definition at line 60 of file randomdefaultmodel.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ copula_

Handle<OneFactorCopula> copula_
private

Definition at line 74 of file randomdefaultmodel.hpp.

◆ accuracy_

Real accuracy_
private

Definition at line 75 of file randomdefaultmodel.hpp.

◆ seed_

long seed_
private

Definition at line 76 of file randomdefaultmodel.hpp.

◆ rsg_

PseudoRandom::rsg_type rsg_
private

Definition at line 77 of file randomdefaultmodel.hpp.