Documentation

This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

portfolioRisk

Generate portfolio-level risk measurements

Syntax

``````[riskMeasures,confidenceIntervals] = portfolioRisk(cdc)``````
``````[riskMeasures,confidenceIntervals] = portfolioRisk(cdc,Name,Value)``````

Description

example

``````[riskMeasures,confidenceIntervals] = portfolioRisk(cdc)``` returns tables of risk measurements for the portfolio losses. The `simulate` function must be run before `portfolioRisk` is used. For more information on using a `creditDefaultCopula` object, see `creditDefaultCopula`.```

example

``````[riskMeasures,confidenceIntervals] = portfolioRisk(cdc,Name,Value)``` adds an optional name-value pair argument for `ConfidenceIntervalLevel`. The `simulate` function must be run before `portfolioRisk` is used. ```

Examples

collapse all

```load CreditPortfolioData.mat; ```

Create a `creditDefaultCopula` object with a two-factor model.

```cdc = creditDefaultCopula(EAD,PD,LGD,Weights2F,'FactorCorrelation',FactorCorr2F) ```
```cdc = creditDefaultCopula with properties: Portfolio: [100x5 table] FactorCorrelation: [2x2 double] VaRLevel: 0.9500 PortfolioLosses: [] ```

Set the `VaRLevel` to 99%.

```cdc.VaRLevel = 0.99; ```

Use the `simulate` function before running `portfolioRisk`. Then use `portfolioRisk` with the `creditDefaultCopula` object to generate the `riskMeasure` and `ConfidenceIntervals` tables.

```cdc = simulate(cdc,1e5); [riskMeasure,confidenceIntervals] = portfolioRisk(cdc,'ConfidenceIntervalLevel',0.9) ```
```riskMeasure = 1x4 table EL Std VaR CVaR ______ ______ ______ ______ 24.774 23.693 101.57 120.22 confidenceIntervals = 1x4 table EL Std VaR CVaR _______________ ________________ ________________ ________________ 24.65 24.897 23.606 23.78 100.83 102.57 119.28 121.17 ```

Input Arguments

collapse all

`creditDefaultCopula` object obtained after running the `simulate` function.

For more information on `creditDefaultCopula` objects, see `creditDefaultCopula`.

Name-Value Pair Arguments

Specify optional comma-separated pairs of `Name,Value` arguments. `Name` is the argument name and `Value` is the corresponding value. `Name` must appear inside single quotes (`' '`). You can specify several name and value pair arguments in any order as `Name1,Value1,...,NameN,ValueN`.

Example: ```[riskMeasure,confidenceIntervals] = portfolioRisk(cdc,'ConfidenceIntervalLevel',0.9)```

collapse all

Confidence interval level, specified as the comma-separated pair consisting of `'ConfidenceIntervalLevel'` and a numeric between `0` and `1`. For example, if you specify `0.95`, a 95% confidence interval is reported in the output table (`riskMeasures`).

Data Types: `double`

Output Arguments

collapse all

Risk measures, returned as a table containing the following columns:

• `EL` — Expected loss, the mean of portfolio losses

• `Std` — Standard deviation of the losses

• `VaR` — Value at risk at the threshold specified by the `VaRLevel` property of the `creditDefaultCopula` object

• `CVaR` — Conditional VaR at the threshold specified by the `VaRLevel` property of the `creditDefaultCopula` object

Confidence intervals, returned as a table of confidence intervals corresponding to the portfolio risk measures reported in the `riskMeasures` table. Confidence intervals are reported at the level specified by the `ConfidenceIntervalLevel` parameter.

References

[1] Crouhy, M., Galai, D., and Mark, R. “A Comparative Analysis of Current Credit Risk Models.” Journal of Banking and Finance. Vol. 24, 2000, pp. 59–117.

[2] Gordy, M. “A Comparative Anatomy of Credit Risk Models.” Journal of Banking and Finance. Vol. 24, 2000, pp. 119–149.

[3] Gupton, G., Finger, C., and Bhatia, M. “CreditMetrics – Technical Document.” J. P. Morgan, New York, 1997.

[4] Jorion, P. Financial Risk Manager Handbook. 6th Edition. Wiley Finance, 2011.

[5] Löffler, G., and Posch, P. Credit Risk Modeling Using Excel and VBA. Wiley Finance, 2007.

[6] McNeil, A., Frey, R., and Embrechts, P. Quantitative Risk Management: Concepts, Techniques, and Tools. Princeton University Press, 2005.