QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
#include <randomdefaultmodel.hpp>
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 &) | |
Observer & | operator= (const Observer &) |
virtual | ~Observer () |
std::pair< iterator, bool > | registerWith (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 &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
Private Attributes | |
Handle< OneFactorCopula > | copula_ |
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< Pool > | pool_ |
std::vector< DefaultProbKey > | defaultKeys_ |
Random default times using a one-factor Gaussian copula.
Definition at line 63 of file randomdefaultmodel.hpp.
GaussianRandomDefaultModel | ( | const ext::shared_ptr< Pool > & | pool, |
const std::vector< DefaultProbKey > & | defaultKeys, | ||
const Handle< OneFactorCopula > & | copula, | ||
Real | accuracy, | ||
long | seed | ||
) |
|
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.
|
overridevirtual |
Implements RandomDefaultModel.
Definition at line 60 of file randomdefaultmodel.cpp.
|
private |
Definition at line 74 of file randomdefaultmodel.hpp.
|
private |
Definition at line 75 of file randomdefaultmodel.hpp.
|
private |
Definition at line 76 of file randomdefaultmodel.hpp.
|
private |
Definition at line 77 of file randomdefaultmodel.hpp.