RandomLossLM< copulaPolicy, USNG > Class Template Reference

`#include <ql/experimental/credit/randomlosslatentmodel.hpp>`

Inheritance diagram for RandomLossLM< copulaPolicy, USNG >:
[legend]

## Public Member Functions

| RandomLossLM (const boost::shared_ptr< SpotRecoveryLatentModel< copulaPolicy > > &copula, Size nSims=0, Real accuracy=1.e-6, BigNatural seed=2863311530UL)
Public Member Functions inherited from LazyObject
void | recalculate ()
void | freeze ()
void | unfreeze ()
void | alwaysForwardNotifications ()
Public Member Functions inherited from Observable
| Observable (const Observable &)
Observable & | operator= (const Observable &)
void | notifyObservers ()
Public Member Functions inherited from Observer
| Observer (const Observer &)
Observer & | operator= (const Observer &)
std::pair< iterator, bool > | registerWith (const boost::shared_ptr< Observable > &)
void | registerWithObservables (const boost::shared_ptr< Observer > &)
Size | unregisterWith (const boost::shared_ptr< Observable > &)
void | unregisterWithAll ()
virtual void | deepUpdate ()

## Protected Member Functions

void | nextSample (const std::vector< Real > &values) const
void | initDates () const
Real | getEventRecovery (const defaultSimEvent &evt) const
Real | latentVarValue (const std::vector< Real > &factorsSample, Size iVar) const
Size | basketSize () const
Real | conditionalRecovery (Real latentVarSample, Size iName, const Date &d) const
Protected Member Functions inherited from RandomLM< RandomLossLM, copulaPolicy, USNG >
| RandomLM (Size numFactors, Size numLMVars, const copulaPolicy &copula, Size nSims, BigNatural seed)
void | update ()
void | performCalculations () const
void | performSimulations () const
const std::vector< simEvent< RandomLossLM< copulaPolicy, USNG > > > & | getSim (const Size iSim) const
Real | getEventRecovery (const simEvent< RandomLossLM< copulaPolicy, USNG > > &evt) const
virtual Probability | probAtLeastNEvents (Size n, const Date &d) const
virtual Disposable< std::vector< Probability > > | probsBeingNthEvent (Size n, const Date &d) const
virtual Real | defaultCorrelation (const Date &d, Size iName, Size jName) const
| Pearsons' default probability correlation.
virtual Real | expectedTrancheLoss (const Date &d) const
virtual std::pair< Real, Real > | expectedTrancheLossInterval (const Date &d, Probability confidencePerc) const
virtual Disposable< std::map< Real, Probability > > | lossDistribution (const Date &d) const
| Full loss distribution.
virtual Histogram | computeHistogram (const Date &d) const
virtual Real | expectedShortfall (const Date &d, Real percent) const
| Expected shortfall given a default loss percentile.
virtual Real | percentile (const Date &d, Real percentile) const
| Value at Risk given a default loss percentile.
virtual boost::tuples::tuple< Real, Real, Real > | percentileAndInterval (const Date &d, Real percentile) const
virtual Disposable< std::vector< Real > > | splitVaRLevel (const Date &date, Real loss) const
virtual Disposable< std::vector< std::vector< Real > > > | splitVaRAndError (const Date &date, Real loss, Probability confInterval) const
Protected Member Functions inherited from LazyObject
virtual void | calculate () const
Protected Member Functions inherited from DefaultLossModel
virtual Probability | probOverLoss (const Date &d, Real lossFraction) const
virtual Disposable< std::vector< Real > > | splitESFLevel (const Date &d, Real loss) const
| Associated ESF fraction to each counterparty.
virtual Real | densityTrancheLoss (const Date &d, Real lossFraction) const
| Probability density of a given loss fraction of the basket notional.
virtual Real | expectedRecovery (const Date &, Size iName, const DefaultProbKey &) const

## Friends

class | RandomLM< ::QuantLib::RandomLossLM, copulaPolicy, USNG >

## Additional Inherited Members

Public Types inherited from Observer
typedef std::set< boost::shared_ptr< Observable > > | set_type
typedef set_type::iterator | iterator
Protected Attributes inherited from RandomLM< RandomLossLM, copulaPolicy, USNG >
const Size | numFactors_
const Size | numLMVars_
const Size | nSims_
std::vector< std::vector< simEvent< RandomLossLM< copulaPolicy, USNG > > > > | simsBuffer_
copulaPolicy | copula_
boost::shared_ptr< copulaRNG_type > | copulasRng_
Protected Attributes inherited from LazyObject
bool | calculated_
bool | frozen_
bool | alwaysForward_
Protected Attributes inherited from DefaultLossModel
RelinkableHandle< Basket > | basket_
Static Protected Attributes inherited from RandomLM< RandomLossLM, copulaPolicy, USNG >
static const Size | maxHorizon_

## Detailed Description

### template<class copulaPolicy, class USNG = SobolRsg>
class QuantLib::RandomLossLM< copulaPolicy, USNG >

Random spot recovery rate loss model simulation for an arbitrary copula.