Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

riskContribution

Generate risk contributions for each counterparty in portfolio

Syntax

Contributions = riskContribution(cdc)

Description

example

Contributions = riskContribution(cdc) returns a table of risk contributions for each counterparty in the portfolio. The risk Contributions table allocates the full portfolio risk measures to each counterparty, such that the counterparty risk contributions sum to the portfolio risks reported by portfolioRisk.

The simulate function must be run before riskContribution is used. For more information on using a creditDefaultCopula object, see creditDefaultCopula.

Examples

collapse all

Load saved portfolio data.

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 riskContribution. Then use riskContribution with the creditDefaultCopula object to generate the risk Contributions table.

cdc = simulate(cdc,1e5);
Contributions = riskContribution(cdc);
Contributions(1:10,:)
ans =

  10x3 table

    ID        EL           CVaR   
    __    __________    __________

     1      0.038604       0.12868
     2      0.067068       0.24527
     3        1.2527        2.3103
     4     0.0023253     0.0026274
     5       0.11766       0.26223
     6       0.12437       0.47915
     7       0.82913        1.6516
     8    0.00085629    0.00089197
     9       0.91406         4.009
    10       0.24352        2.2781

Input Arguments

collapse all

creditDefaultCopula object obtained after running the simulate function.

For more information on creditDefaultCopula objects, see creditDefaultCopula.

Output Arguments

collapse all

Risk contributions, returned as a table containing the following risk contributions for each counterparty:

  • EL — Expected loss for the particular counterparty over the scenarios

  • CVaR — Conditional value at risk for the particular counterparty over the scenarios

The risk Contributions table allocates the full portfolio risk measures to each counterparty, such that the counterparty risk contributions sum to the portfolio risks reported by portfolioRisk.

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] Glasserman, P. “Measuring Marginal Risk Contributions in Credit Portfolios.” Journal of Computational Finance. Vol. 9, No. 2, Winter 2005/2006.

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

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

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

[6] Kalkbrener, M., Lotter, H., and Overbeck, L. “Sensible and Efficient Capital Allocation for Credit Portfolios.” Risk. 17, 2004, pp. S19–S24.

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

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

Introduced in R2017a

Was this topic helpful?