|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
Loss distribution with Monte Carlo simulation. More...
#include <lossdistribution.hpp>
Inheritance diagram for LossDistMonteCarlo:
Collaboration diagram for LossDistMonteCarlo:Public Member Functions | |
| LossDistMonteCarlo (Size nBuckets, Real maximum, Size simulations, long seed=42, Real epsilon=1e-6) | |
| Distribution | operator() (const std::vector< Real > &volumes, const std::vector< Real > &probabilities) const override |
| Size | buckets () const override |
| Real | maximum () const override |
Public Member Functions inherited from LossDist | |
| LossDist ()=default | |
| virtual | ~LossDist ()=default |
| virtual Distribution | operator() (const std::vector< Real > &volumes, const std::vector< Real > &probabilities) const =0 |
| virtual Size | buckets () const =0 |
| virtual Real | maximum () const =0 |
Private Attributes | |
| Size | nBuckets_ |
| Real | maximum_ |
| Size | simulations_ |
| long | seed_ |
| Real | epsilon_ |
Additional Inherited Members | |
Static Public Member Functions inherited from LossDist | |
| static Real | binomialProbabilityOfNEvents (int n, std::vector< Real > &p) |
| static Real | binomialProbabilityOfAtLeastNEvents (int n, std::vector< Real > &p) |
| static std::vector< Real > | probabilityOfNEvents (std::vector< Real > &p) |
| static Real | probabilityOfNEvents (int n, std::vector< Real > &p) |
| static Real | probabilityOfAtLeastNEvents (int n, std::vector< Real > &p) |
Loss distribution with Monte Carlo simulation.
Loss distribution for varying volumes and probabilities of default via Monte Carlo simulation of independent default events.
Definition at line 193 of file lossdistribution.hpp.
| LossDistMonteCarlo | ( | Size | nBuckets, |
| Real | maximum, | ||
| Size | simulations, | ||
| long | seed = 42, |
||
| Real | epsilon = 1e-6 |
||
| ) |
Definition at line 195 of file lossdistribution.hpp.
|
overridevirtual |
Implements LossDist.
Definition at line 302 of file lossdistribution.cpp.
Here is the call graph for this function:
|
overridevirtual |
Implements LossDist.
Definition at line 201 of file lossdistribution.hpp.
|
overridevirtual |
Implements LossDist.
Definition at line 202 of file lossdistribution.hpp.
|
private |
Definition at line 205 of file lossdistribution.hpp.
|
private |
Definition at line 206 of file lossdistribution.hpp.
|
private |
Definition at line 207 of file lossdistribution.hpp.
|
private |
Definition at line 208 of file lossdistribution.hpp.
|
private |
Definition at line 209 of file lossdistribution.hpp.