Saddle point portfolio credit default loss model. More...
#include <ql/experimental/credit/saddlepointlossmodel.hpp>
Public Member Functions | |
SaddlePointLossModel (const boost::shared_ptr< ConstantLossLatentmodel< CP > > &m) | |
Real | percentile (const Date &d, Probability percentile) const |
Probability | probOverLoss (const Date &d, Real trancheLossFract) const |
Disposable< std::map< Real, Probability > > | lossDistribution (const Date &d) const |
Full loss distribution. | |
Probability | probOverPortfLoss (const Date &d, Real loss) const |
Real | expectedTrancheLoss (const Date &d) const |
Probability | probDensity (const Date &d, Real loss) const |
Disposable< std::vector< Real > > | splitVaRLevel (const Date &date, Real loss) const |
Real | expectedShortfall (const Date &d, Probability percentile) const |
Expected shortfall given a default loss percentile. | |
![]() | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
void | notifyObservers () |
Protected Member Functions | |
Real | CumulantGeneratingCond (const std::vector< Real > &invUncondProbs, Real lossFraction, const std::vector< Real > &mktFactor) const |
Real | CumGen1stDerivativeCond (const std::vector< Real > &invUncondProbs, Real saddle, const std::vector< Real > &mktFactor) const |
Real | CumGen2ndDerivativeCond (const std::vector< Real > &invUncondProbs, Real saddle, const std::vector< Real > &mktFactor) const |
Real | CumGen3rdDerivativeCond (const std::vector< Real > &invUncondProbs, Real saddle, const std::vector< Real > &mktFactor) const |
Real | CumGen4thDerivativeCond (const std::vector< Real > &invUncondProbs, Real saddle, const std::vector< Real > &mktFactor) const |
boost::tuples::tuple< Real, Real, Real, Real > | CumGen0234DerivCond (const std::vector< Real > &invUncondProbs, Real saddle, const std::vector< Real > &mktFactor) const |
DISPOSABLE???? More... | |
boost::tuples::tuple< Real, Real > | CumGen02DerivCond (const std::vector< Real > &invUncondProbs, Real saddle, const std::vector< Real > &mktFactor) const |
DISPOSABLE???? | |
Real | CumulantGenerating (const Date &date, Real s) const |
Real | CumGen1stDerivative (const Date &date, Real s) const |
Real | CumGen2ndDerivative (const Date &date, Real s) const |
Real | CumGen3rdDerivative (const Date &date, Real s) const |
Real | CumGen4thDerivative (const Date &date, Real s) const |
Real | findSaddle (const std::vector< Real > &invUncondProbs, Real lossLevel, const std::vector< Real > &mktFactor, Real accuracy=1.0e-3, Natural maxEvaluations=50) const |
Probability | probOverLossCond (const std::vector< Real > &invUncondProbs, Real trancheLossFract, const std::vector< Real > &mktFactor) const |
Probability | probOverLossPortfCond1stOrder (const std::vector< Real > &invUncondProbs, Real loss, const std::vector< Real > &mktFactor) const |
Probability | probOverLossPortfCond (const std::vector< Real > &invUncondProbs, Real loss, const std::vector< Real > &mktFactor) const |
Probability | probDensityCond (const std::vector< Real > &invUncondProbs, Real loss, const std::vector< Real > &mktFactor) const |
Disposable< std::vector< Real > > | splitLossCond (const std::vector< Real > &invUncondProbs, Real loss, std::vector< Real > mktFactor) const |
Real | expectedShortfallFullPortfolioCond (const std::vector< Real > &invUncondProbs, Real lossPerc, const std::vector< Real > &mktFactor) const |
Real | expectedShortfallTrancheCond (const std::vector< Real > &invUncondProbs, Real lossPerc, Probability percentile, const std::vector< Real > &mktFactor) const |
Disposable< std::vector< Real > > | expectedShortfallSplitCond (const std::vector< Real > &invUncondProbs, Real lossPerc, const std::vector< Real > &mktFactor) const |
Real | conditionalExpectedLoss (const std::vector< Real > &invUncondProbs, const std::vector< Real > &mktFactor) const |
Real | conditionalExpectedTrancheLoss (const std::vector< Real > &invUncondProbs, const std::vector< Real > &mktFactor) const |
void | resetModel () |
Concrete models do now any updates/inits they need on basket reset. | |
![]() | |
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 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 Probability | probAtLeastNEvents (Size n, const Date &d) const |
virtual Real | expectedRecovery (const Date &, Size iName, const DefaultProbKey &) const |
Protected Attributes | |
const boost::shared_ptr< ConstantLossLatentmodel< CP > > | copula_ |
Size | remainingSize_ |
std::vector< Real > | remainingNotionals_ |
Real | remainingNotional_ |
Real | attachRatio_ |
Real | detachRatio_ |
![]() | |
RelinkableHandle< Basket > | basket_ |
Saddle point portfolio credit default loss model.
|
protected |
Returns the cumulant generating function (zero-th order expansion term) conditional to the mkt factor: \( K = \sum_j ln(1-p_j + p_j e^{N_j \times lgd_j \times s}) \)
|
protected |
Returns the first derivative of the cumulant generating function (first order expansion term) conditional to the mkt factor: \( K1 = \sum_j \frac{p_j \times N_j \times LGD_j \times e^{N_j \times LGD_j \times s}} \ {1-p_j + p_j e^{N_j \times LGD_j \times s}} \) One of its properties is that its value at zero is the portfolio expected loss (in fractional units). Its value at infinity is the max attainable portfolio loss. To be understood conditional to the market factor.
|
protected |
Returns the second derivative of the cumulant generating function (first order expansion term) conditional to the mkt factor: \( K2 = \sum_j \frac{p_j \times (N_j \times LGD_j)^2 \times e^{N_j \times LGD_j \times s}} {1-p_j + p_j e^{N_j \times LGD_j \times s}} - (\frac{p_j \times N_j \times LGD_j \times e^{N_j \times LGD_j \times s}} {1-p_j + p_j e^{N_j \times LGD_j \times s}})^2 \)
|
protected |
DISPOSABLE????
Returns the cumulant and second to fourth derivatives together. Included for optimization, most methods work on expansion of these terms. Alternatively use a local private buffer member?
Returns the cumulant generating function (zero-th order expansion term) weighting the conditional value by the prob density of the market factor, called by integrations
|
protected |
Calculates the mkt-fct-conditional saddle point for the loss level given and the probability passed. The date is implicitly given through the probability. Performance requires to pass the probabilities for that date. Otherwise once we integrate this over the market factor we would be computing the same probabilities over and over. While this works fine here some models of the recovery rate might require the date.
The passed lossLevel is in total portfolio loss fractional units.
|
virtual |
Returns the loss amount at the requested date for which the probability of lossing that amount or less is equal to the value passed.
Reimplemented from DefaultLossModel.
|
protected |
Conditional (on the mkt factor) prob of a loss fraction of the the tranched portfolio.
The trancheLossFract parameter is the fraction over the tranche notional and must be in [0,1].
|
virtual |
Probability of the tranche losing the same or more than the fractional amount given.
The passed lossFraction is a fraction of losses over the tranche notional (not the portfolio).
Reimplemented from DefaultLossModel.
|
protected |
Probability of having losses in the portfolio due to default events equal or larger than a given absolute loss value on a given date conditional to the latent model factor. The integral expression on the expansion is the first order integration as presented in several references, see for instance; equation 8 in R.Martin, K.Thompson, and C. Browne 's 'Taking to the Saddle', Risk Magazine, June 2001, page 91
The passed loss is in absolute value.
|
protected |
Probability density of having losses in the total portfolio (untranched) due to default events equal to a given value on a given date conditional to the latent model factor. Based on the integrals of the expected shortfall.
NOTICE THIS IS ON THE TOTAL PORTFOLIO -— UNTRANCHED Probability density of having losses in the portfolio due to default events equal to a given value on a given date conditional to the w latent model factor. Based on the integrals of the expected shortfall. See......refernce.
|
virtual |
Sensitivities of the individual names to a given portfolio loss value due to defaults. It returns ratios to the total structure notional, which aggregated add up to the requested loss value. Notice then that it refers to the total portfolio, not the tranched basket.
The passed loss is the loss amount level at which we want to request the sensitivity. Equivalent to a percentile.
Reimplemented from DefaultLossModel.