# QMMRecalibrate: Probability of Default Calibration using Quasi Moment... In LDPD: Probability of Default Calibration

## Description

Calibrates conditional probabilities of default (PD) according to Quasi Moment Matching (QMM) algorithm.
Calibration is based on target accuracy ratio (AR) and mean portfolio PD (Central Tendency). For the information purposes, also AR standard deviation is estimated using bootstrap approach.

## Usage

 ```1 2``` ```QMMRecalibrate(pd.uncond.new, pd.cond.old, portf.uncond, portf.condND = NULL, AR.target = NULL, rating.type = "RATING", calib.curve = "robust.logit") ```

## Arguments

 `pd.uncond.new` Target Mean PD (Central Tendency) for the portfolio. `pd.cond.old` Conditional PD distribution. `portf.uncond` Unconditional portfolio distribution. `portf.condND` Conditional on non-default portfolio distribution. If portf.condND is NULL, portf.uncond will be used as a proxy. `AR.target` Target accuracy ratio(AR), in case is NULL - implied by pd.cond.old AR is used (`ARestimate` is called for AR estimation purposes). `rating.type` In case 'RATING', each item in the portf.uncond contains number of counterparts in a given rating class. In case 'SCORE', each item in the portf.uncond is treated as an exact score of counterparty. `calib.curve` In case 'logit', simple logit calibration curve is used (is applicable only for rating.type = 'SCORE'). In case 'robust.logit', robust logit function is used (see Tasche D. (2013) for details).

## Details

PD curve is fitted using robust logit function proposed by D. Tasche.
For the information purposes output of the function also contains PD fitted using target CT and AR plus/minus one standard deviation.

## Value

 `alpha ` Itercept parameter of the calibration curve. `beta ` Slope parameter of the calibration curve. `CT.ac ` Mean PD after calibration, e.g. target CT. `AR.ac ` AR after calibration, e.g. target AR. `CT.bc ` Mean PD before calibration, as implied by conditional PDs and portfolio unconditional distribution. `AR.bc ` AR before calibration estimated from conditional PDs. `AR.sdev ` AR standard deviation (based on sample data). `condPD.ac ` Conditional PDs after QMM calibration. `condPD.bc ` Conditional PDs before calibration. `condPD.ac.upper ` Conditional PDs given AR as initial AR plus one standard deviation and target CT. `condPD.ac.lower ` Conditional PDs given AR as initial AR minus one standard deviation and target CT. `portf.cumdist ` Cumulative portfolio distribution needed to estimate logit PDs (conditional on non-default portfolio distribution if such data is given). `portf.uncond ` Unconditional portfolio distribution from the worst to the best credit quality. `rating.type ` In case 'RATING', each item in the portf.uncond contains number of counterparts in a given rating class. In case 'SCORE', each item in the portf.uncond is treated as an exact score of counterparty.

## Note

Portfolio and default data should be sorted by rating classes from lowest credit quality to higher one.

## Author(s)

Denis Surzhko <densur@gmail.com>

## References

Tasche, D. (2009) Estimating discriminatory power and PD curves when the number of defaults is small. Working paper, Lloyds Banking Group.
Tasche, D. (2013) The art of probability-of-default curve calibration. Journal of Credit Risk, 9:63-103.

`QMMPlot`

## Examples

 ```1 2 3 4``` ```pd <- c(0.2, 0.1, 0.005, 0.001, 0.001) porfolio <- c(100, 200, 200, 200, 100) qmm <- QMMRecalibrate(0.05, pd, porfolio, rating.type = 'RATING') QMMPlot(qmm) ```

### Example output

```
```

LDPD documentation built on May 1, 2019, 7:56 p.m.