# ARestimate: Accuracy Ratio estimation In LDPD: Probability of Default Calibration

## Description

Estimate AR (Accuracy Ratio) and mean portfolio PD (probability of default) based on conditional PDs and portfolio unconditional distribution.

## Usage

 `1` ```ARestimate(pd.cond, portf.uncond, rating.type = "RATING") ```

## Arguments

 `pd.cond` Conditional PD distribution (should be sorted from the worst to the best credit quality). `portf.uncond` Unconditional portfolio distribution (should be sorted from lowest credit quality to higher one). `rating.type` In case 'RATING', each item in the portf.uncond should contain number of companies in each rating class. In case 'SCORE', each item in the portf.uncond is an exact score.

## Details

Approach to AR estimation is consistent with the algorithm proposed by D.Tasche in the paper: Estimating discriminatory power and PD curves when the number of defaults is small. Working paper, Lloyds Banking Group, 2009.
Mean portfolio PD (also known as Central Tendency of the portfolio) is estimated using unconditional portfolio distribution.

## Value

 `AR ` Estimated accuracy ratio `CT ` Mean PD in the portfolio

## Note

The algorithm is using conditional PDs as an input. In case one needs to estimate AR from actual default statistic (BAD/GOOD data), one can use, for example, `somers2`.

## 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.

`QMMRecalibrate` `somers2`
 ```1 2 3 4``` ```pd.cond <- c(0.1, 0.05, 0.025, 0.01, 0.001) # PD for given rating class portf.uncond <- c(10, 20, 30, 50, 10) # Number of borrowers in each rating class ARestimate(pd.cond, portf.uncond, rating.type = "RATING") ```