|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
#include <distribution.hpp>
Collaboration diagram for Distribution:Public Member Functions | |
| Distribution (int nBuckets, Real xmin, Real xmax) | |
| Distribution ()=default | |
| void | add (Real value) |
| void | addDensity (int bucket, Real value) |
| void | addAverage (int bucket, Real value) |
| void | normalize () |
| Size | size () const |
| Real | x (Size k) |
| std::vector< Real > & | x () |
| Real | dx (Size k) |
| std::vector< Real > & | dx () |
| Real | dx (Real x) |
| Real | density (Size k) |
| Real | cumulative (Size k) |
| Real | excess (Size k) |
| Real | cumulativeExcess (Size k) |
| Real | average (Size k) |
| Real | confidenceLevel (Real quantil) |
| Real | cumulativeDensity (Real x) |
| Real | cumulativeExcessProbability (Real a, Real b) |
| Real | expectedValue () |
| Real | trancheExpectedValue (Real a, Real d) |
| template<class F > | |
| Real | expectedValue (F &f) |
| void | tranche (Real attachmentPoint, Real detachmentPoint) |
| int | locate (Real x) |
| Real | expectedShortfall (Real percValue) |
Private Attributes | |
| int | size_ |
| Real | xmin_ |
| Real | xmax_ |
| std::vector< int > | count_ |
| std::vector< Real > | x_ |
| std::vector< Real > | dx_ |
| std::vector< Real > | density_ |
| std::vector< Real > | cumulativeDensity_ |
| std::vector< Real > | excessProbability_ |
| std::vector< Real > | cumulativeExcessProbability_ |
| std::vector< Real > | average_ |
| int | overFlow_ |
| int | underFlow_ |
| bool | isNormalized_ |
Friends | |
| class | ManipulateDistribution |
Definition at line 37 of file distribution.hpp.
| Distribution | ( | int | nBuckets, |
| Real | xmin, | ||
| Real | xmax | ||
| ) |
Definition at line 33 of file distribution.cpp.
|
default |
| void add | ( | Real | value | ) |
| void addDensity | ( | int | bucket, |
| Real | value | ||
| ) |
| void addAverage | ( | int | bucket, |
| Real | value | ||
| ) |
| void normalize | ( | ) |
| Size size | ( | ) | const |
Definition at line 50 of file distribution.hpp.
| std::vector< Real > & x | ( | ) |
| std::vector< Real > & dx | ( | ) |
Definition at line 53 of file distribution.hpp.
Definition at line 56 of file distribution.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 72 of file distribution.hpp.
Definition at line 151 of file distribution.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 220 of file distribution.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 204 of file distribution.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Real expectedValue | ( | ) |
Definition at line 174 of file distribution.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Transform the loss distribution into the tranche loss distribution for losses L_T = min(L,D) - min(L,A). The effects are: 1) shift the distribution to the left by A, then 2) cut off at D-A, Pr(L_T > D-A) = 0 3) ensure Pr(L_T >= 0) = 1, i.e. a density spike at L_T = 0
Definition at line 236 of file distribution.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| int locate | ( | Real | x | ) |
Definition at line 55 of file distribution.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 328 of file distribution.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
friend |
Definition at line 39 of file distribution.hpp.
|
private |
Definition at line 110 of file distribution.hpp.
|
private |
Definition at line 111 of file distribution.hpp.
|
private |
Definition at line 111 of file distribution.hpp.
|
private |
Definition at line 112 of file distribution.hpp.
|
private |
Definition at line 115 of file distribution.hpp.
|
private |
Definition at line 115 of file distribution.hpp.
|
private |
Definition at line 120 of file distribution.hpp.
|
private |
Definition at line 120 of file distribution.hpp.
|
private |
Definition at line 121 of file distribution.hpp.
|
private |
Definition at line 121 of file distribution.hpp.
|
private |
Definition at line 123 of file distribution.hpp.
|
private |
Definition at line 125 of file distribution.hpp.
|
private |
Definition at line 125 of file distribution.hpp.
|
private |
Definition at line 126 of file distribution.hpp.