cm.state: Computation of state space

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

cm.state computes a state space, this is at time t = 1 the credit positions of all companies for all migrations is calculated. This state space is needed for the later valuation for the credit positions of each scenario.

Usage

1
cm.state(M, lgd, ead, N, r)

Arguments

M

one year empirical migration matrix, where the last row gives the default class.

lgd

loss given default

ead

exposure at default

N

number of companies

r

riskless interest rate

Details

This function computes the value of the credits of each firm in one year, this is

V_t = EAD_t e^{-(r_t + CS_t) t}

where t = 1. Also the value for the default class is calculated, that is

V_t = EAD (1 - LGD)

Value

Return value is the matrix V for time t = 1 of each rating in the migration matrix including the credit values for all companies. The last column in the matrix V is the value for the default event of each company.

Author(s)

Andreas Wittmann andreas\_wittmann@gmx.de

References

Glasserman, Paul, Monte Carlo Methods in Financial Engineering, Springer 2004

See Also

cm.matrix, cm.cs, matrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
  N <- 3
  r <- 0.03
  ead <- c(4000000, 1000000, 10000000)
  lgd <- 0.45

  # one year empirical migration matrix from standard&poors website
  rc <- c("AAA", "AA", "A", "BBB", "BB", "B", "CCC", "D")
  M <- matrix(c(90.81,  8.33,  0.68,  0.06,  0.08,  0.02,  0.01,   0.01,
                 0.70, 90.65,  7.79,  0.64,  0.06,  0.13,  0.02,   0.01,
                 0.09,  2.27, 91.05,  5.52,  0.74,  0.26,  0.01,   0.06,
                 0.02,  0.33,  5.95, 85.93,  5.30,  1.17,  1.12,   0.18,
                 0.03,  0.14,  0.67,  7.73, 80.53,  8.84,  1.00,   1.06,
                 0.01,  0.11,  0.24,  0.43,  6.48, 83.46,  4.07,   5.20,
                 0.21,     0,  0.22,  1.30,  2.38, 11.24, 64.86,  19.79,
                    0,     0,     0,     0,     0,     0,     0, 100
              )/100, 8, 8, dimnames = list(rc, rc), byrow = TRUE)

  cm.state(M, lgd, ead, N, r)

Example output

          [,1]      [,2]      [,3]      [,4]      [,5]      [,6]      [,7]
[1,] 3881607.5 3881607.5 3880734.1 3878637.9 3863266.0 3790948.4 3536090.0
[2,]  970401.9  970401.9  970183.5  969659.5  965816.5  947737.1  884022.5
[3,] 9704018.6 9704018.6 9701835.1 9696594.7 9658165.1 9477371.1 8840225.1
        [,8]
[1,] 2200000
[2,]  550000
[3,] 5500000

CreditMetrics documentation built on May 2, 2019, 8:55 a.m.