代写代考 Credit Risk Modelling M.A. Fahrenwaldt Solutions to exercises

Credit Risk Modelling M.A. Fahrenwaldt Solutions to exercises
1. See handwritten solution
2. See handwritten solution
3. Default probability given by p = (I) where

Copyright By PowCoder代写 加微信 powcoder

ln B ln V0 μV 1 1 p I= pT V+2VT
dI μV +ln(V0/B) 1p d=p2 +2T
which certainly satisfies dI/dV > 0 if V0 B (initial assets greater than face
value of debt) which would generally be the case.
4. This is a very simple question. By row, the missing numbers are 0.05, 0.7, 0, 0, 1. Squaring the matrix we get
0@ 0.80 0.15 0.05 1A 0@ 0.80 0.15 0.05 1A 0@ 0.655 0.225 0.120 1A 0.10 0.70 0.20 ⇥ 0.10 0.70 0.20 = 0.150 0.505 0.345 001 001 001
and two-year default probabilities can be read from the final column.
5. See R script 10_Merton_implied_credit_spreads.R on qrmtutorial.org
6. See R script 10_Rating_embedding.R on qrmtutorial.org.
7. See handwritten solution
8. Under RT the pay-o↵ of the bond is
I{⌧>T} + (1 )I{⌧T}
where the first term is the survival claim payo↵ and the second and third terms comprise the pay-o↵ of the recovery. This simplifies to I{⌧ >T } + (1 ) and
hence the price of the bond is priceofdefaultfreebond
p1(t,T) = EQp0(t,T)I{⌧>T} +(1)|Ht
= (1)p0(t,T)+EQp0(t,T)I{⌧>T} |Ht
where the second term is the value of a survival claim at time t, which is given in the notes. We thus obtain
p1(t,T) = (1)p0(t,T)+p0(t,T)I{⌧>t}eRtT Q(s)ds. 1

The spread is
c(t,T) = 1 ln✓p1(t,T)◆ onlyMined fat Tt ⇣p0(t,T) ⌘
= 1 ln 1+eRtTQ(s)ds Tt
when ⌧ > t.
When the hazard function under the risk-neutral measure Q is a constant
Q(t) = ̄Q we get
c(t,T)= 1 ln⇣1+e ̄Q(Tt)⌘.
If ̄Q is small, note that we have e IT tiii n
c(t,T)⇡ 1 ln1 ̄Q(T t)⇡ ̄Q STSIHT.tl T t
p0(t,T)I{⌧>t}eRtT Q(s)ds. Īyafn
where we use the approximations exp(x) ⇡ 1 x and ln(1 x) ⇡ x for x
small. c 灬 SE
Under the RF recovery model the value of the survival claim is
frombondprices
To value the recovery we consider
Q EZ I{t<⌧T}p0(t,⌧) E (1)p0(t,⌧)I{t<⌧T} |Ht = (1)I{⌧>t} exp(R0tQ(s)ds)
When the hazard function under the risk-neutral measure Q is a constant Q(t) = ̄Q we get
1 ̄ Q ( T t ) Q Z T e ̄ Q ( s t ) ! c(t,T)=Ttln e +(1) ̄ p(s,T)ds .
If we assume a constant interest rate some further simplification is possible.
In particular
Z T e ̄Q(st) e ̄QterT ⇣ ( ̄Q+r)t ( ̄Q+r)T ⌘ t p0(s,T)ds= ̄Q+r e e .
See script HazardRateModelSpreads.R as well. 2
= (1)I{⌧>t}
c(t,T)= 1 ln✓eRtTQ(s)ds+(1)ZT Q(s)eRtsQ(u)duds◆.
Therefore when ⌧ > t we have
T t t p0(s,T)
TR p0(t,s)Q(s)e t (u)duds.

二点ē 9. See R script 10_CDS_calibration.R on qrmtutorial.org.
̄Q transom into
ZNZ Nt kt
as claimed heequalityholdsFORForALLN
0 t=(k1)t
matingsfrom
e(r+ ̄Q)(k1)te(r+ ̄Q)u du
e(r+ ̄Q)t dt = ̄Q e(r+ ̄Q)t dt ēlrttktyi
10. The result follows since
k=1 n_n心比北 XZ灶
where we have made the change of variableZs u = t (k 1)t. It follows from
x⇤t e(r+ ̄ )t = ̄Q e(r+ ̄ )t dt. e wecanset nil tofinda 0
elatiosnhipbetween that tand I_
e(r+ ̄ )(k1)t ̄Q e(r+ ̄ u=0
e(r+ ̄Q)(k1)tx⇤t e(r+ ̄Q)t
e ( r + ̄ Q ) k t .
legs equal for a CDS with any maturity, that is any value of N.
11. We need to compute moments of L = Pmi=1 iYi. We have m = 1000 and pi =p=0.01foralli. P
a)i ==0.4soL= mi=1Yi. ObviouslyE(L)=mpandvar(L)= 2mp(1 p). Numerical values are E(L) =P4 and sd(L) ⇡ 1.26.
b)Westillhavei ==0.4andL= mi=1Yi. SoE(L)=mpasbefore but !
var(L) = 2 var Yi = 2 var(Yi) + 2 cov(Yi, Yj )
i=1 i=1 i6=j
= 2mp(1 p) + 2m(m 1) cov(Y1, Y2) .
Now cov(Y1, Y2) = ⇢pvar(Y1) var(Y2) = ⇢p(1 p), so
var(L) = 2mp(1 p) + 2m(m 1)⇢p(1 p)
=2mp(1p)(1+(m1)⇢) . Numerical value is sdP(L) ⇡ 3.08.
c) In this case L = mi=1 iYi, where E(i) = = 0.4 for all i. Therefore E(L) = mp as before. For the variance:
Hence the same value of ̄Q can make the value of the premium and default
var(L) = var(iYi) + cov(iYi, j Yj )
= m E(21Y1) E(1Y1)2 + m(m 1) (E(1Y12Y2) E(1Y1)E(2Y2)) . 3

Now the independence assumptions come into play:
var(L) = m E(21)E(Y1) E(1)2E(Y1)2 + m(m 1)E(1)E(2) cov(Y1, Y2) = m var(1)E(Y1) + mE(1)2 var(Y1) + m(m 1)E(1)E(2) cov(Y1, Y2) = m var(1)p + m2p(1 p)(1 + (m 1)⇢) .
The numerical value is sd(L) ⇡ 3.10.
Note, how adding default dependence has profound e↵ect. Adding independent
stochastic LGDs has a minor e↵ect. Relaxing the independence assumptions
for LGDs would lead to a greater e↵ect. NeedlEiXiXj7fa
12. The within-group asset correlation (say for first group) is given by i.j inthesamegroup
二日 11 E l x i x i E l 后到
E(XiXj) = E(b1F1B1F1) = b21 forexamplegroupI
The between-group asset calculation is
E(XiXj) = E(b1b2F1F2) = ⇢b1b2
十 Elbnttfzzihb.FI厢
q 2 q 2 bit lbno P(Xi1 di1,…,Xik dik)=P(bi1F + 1bi1Zi1 di1,…,bikF + 1bikZik)
⇣ ⇣ q ⌘⌘ ElFiFz l =E P bi1F + 1b2 Zi1 di1,…,|F b.bz
= E PY Z  q , . . . , | F o f i1 1 b depends p
i于 inthedifferentgroup
二时小 00 11pmbz 1有2i npxi i1
systematic idiomatic @ @ di1 bi1F AA dependencestructure prfol
F zi areidNoD RewriteaGaussianthresholdmodel以mixturemodel
0 0 i1 11 Notethatxi.no foralli
conditiononF
Defaultindicators Z @ @
IEIY.in as YewEIon YFIsYnDdispYiviki
=E PZijq 2i|F
d b F j j
二 FDtoweriaw IEIEIYi.tn
@ ij ij AA
1 b 2i j expectationourF Z 1 k
1ElPlYiiYiillFD 1ElPlxi.Edi xiidiklFD
1 IEIPlxije.gFl D conditionindependence 1
d b x q
Note that this appears to be a mixture model with a standard normal factor:
di_bigF EIPlz.joalibi
z i j s E1悲 It
K I d i 的下 侣莉01 2 dad
densityofFurioD
speciael xchangecase
a d.io 后 nern pcyi.si
1 oldtiyndu 三心 w i t ht e a 颷
P(Y = 1,…,Y = 1) = p (x) (x)dx iii
bijx1A p(x)= q .
minutes In an exchangeable default model we have di = d and bi = p⇢ for all i. More-
inda 心不生心 over we can simply notation and introduce ⇡k for the joint default probability.
E1年1颷 Thusweobtain t o u s s i n g l ce o m p a n y
Z ✓ ✓ p ◆◆ 1 d ⇢ x k
Pinwithx d们k1⇢
⇡= p (x)dx
etcorrelation on啊 bing.oem 1 4 ooiomtnotbotn.wouatiornpixnxjms.cm_

and,sinceforanyiweknowP(Yi =1)=(d)=⇡,weinfer
Z 1 ✓ ✓1(⇡) p⇢x◆◆k
p1⇢ (x)dx
Asset correlation in the general one-factor model is given by ⇢ij = ⇢(Xi,Xj) = bibj and this can be negative if one of bi or bj is negative, but not both. In the equicorrelation model (where bi = p⇢ for all i) this is not possible.
Negative default correlation is also obtained when ⇢ij < 0. Observe that cov(Yi, Yj ) = E(YiYj ) E(Yi)E(Yj ) =P(Yi =1,Yj =1)P(Yi =1)P(Yj =1) =P(Xi di,Xj dj)P(Xi di)P(Yj dj)<0 14. Suppose that X1, . . . , Xm is distributed according to the Gumbel copula. and consider the threshold model (Xi, d)1im where 0 < d < 1. Clearly⇡=P(Xi d)=dand ⇡k = P(X1  d,...,Xk  d) = P(X1  ⇡,...,Xk  ⇡) = CGu(⇡,...,⇡, 1,...,1) ✓ | {z } | {z } ⇣ ktimes mktimes⌘ = exp k( ln ⇡)✓ 1/✓ = exp k1/✓ ( ln ⇡) = exp k1/✓ ln ⇡ where ✓ 1. Pm 15. Let Y1, . . . , Ym be exchangeable Bernoulli variables and let M = point of this exercise is that, for 1  k  m, the two probabilities P(M = k) and ⇡k = p(Y1 = 1,...,Yk = 1) are di↵erent. We can compute P(M = k) = ✓mk◆P(Y1 = 1,...,Yk = 1,Yk+1 = 0,...,Ym = 0) ✓m◆✓X ✓mk◆ ✓mk◆ = k ⇡k 1 ⇡k+1 + 2 ⇡k+2 ···+(1) ✓m◆ mk ✓m k◆ = (1)j ⇡k+j (1)j (1)j m ! ( m k ) ! k!(m k)! j!(m k j)! i=1 Yi. The m! k!j!(m k j)! 16. In this question we have L = P1000 Yi. Since L | Q = q ⇠ B(1000,q) and i=1 Q ⇠ Beta(a, b) we calculate that P(L = k) = Z 1 ✓1000◆qk(1 q)1000k 1 0 k (a,b) qa1(1 q)b1dq k=0,1,... . =✓1000◆(k+a,1000k+b), k (a,b) Sincepi =E(Yi)=E(Q)= a =:⇡and a+b cov(Yi,Yj) P(Yi =1,Yj =1)⇡2 E(Q2)⇡2 1 we have two equations in two unknowns which are easily solved to give a = a = 1.99 and b = 197.01. 17. The distribution function is = ⇡⇡2 = ⇡⇡2 =a+b+1 ⇡(⇢1 1) and b = (1⇡)(⇢1 1). When ⇡ = 0.01 and ⇢Y = 0.005 we get FQ(q) = P(Q  q) = P((μ + Z)  q) = P ✓Z  1(q) μ◆ ✓ ◆ = 1(q)μ . The density is fQ(q) = ✓1(q) μ◆ d1(q) 1 ⇣⌘ dq (1(q)) where we have di↵erentiated both sides of the equality (1(q)) = q to obtain 1(q) d1(q) = 1 dq d1(q) = 1 . dq (1(q)) 1(q)μ =, from which it follows that Calculation of the mean follows in the solution of the next question. 18. We consider the model where Y1, . . . , Ym are conditionally independent given Q and all satisfy Yi | Q = q ⇠ Be(q). The mixing variable can be represented as Q = (μ + Z) where Z is standard normal. In such a model ⇡k = P(Y1 = 1,...,Yk = 1) = E(Qk) 1 ((μ + x))k (x)dx . (1) hich is obviously equivalent to = E ((μ + Z)) Now in Exercise 13 we constructed an exchangeable one-factor Gaussian thresh- old model with Z 1 ✓ ✓1(⇡) p⇢x◆◆k p1⇢ (x)dx Z 1 ✓ ✓1(⇡) + p⇢x◆◆k p ⇡k = p1⇢ (x)dx. (2) The formulas for ⇡k coincide if μ = 1(⇡)/ 1⇢ and = ⇢/(1⇢), which would imply that the models are equivalent. Solving for ⇡ and ⇢ gives ⇡=(μ/p1+2)and⇢=2/(1+2)1. Theformermustbethemeanofa probit-normal distribution. 19. Given = we assume the Y ̃i are conditionally independent Poisson: Y ̃i ⇠ Po(ki ). Define the default indicator Yi = 1{Y ̃i>0}. Then
pi( )=P(Yi =1| = )=1P(Y ̃i =0| = ) =1exp(ki ).
⇠ Ga(↵, 1), we can calculate that
from which it follows that
fQi(q)=f ✓ln(1q)◆ 1 .
ki ki(1 q)
Inserting the gamma density f ( ) = ↵1 exp( )/(↵) we obtain
1 (ln(1q))↵1 ✓ln(1q)◆ 1
fQi (q) = (↵) k↵1 exp ki ki(1 q)
P(Qi q)=P(pi( )q) =P(1exp(ki )q)
=P✓ ln(1q)◆, ki
= i ( ln(1 q))↵1 (1 q)1/ki1 . (↵)
Now for q small we have the approximation ln(1 q) ⇡ q from which it
follows that the density of Qi is closely approximated by a beta distribution
Be(↵, k1). i

20. Recall that the random variable N has a negative binomial distribution with parameters ↵ > 0 and 0 < p < 1, written X ⇠ NB(↵,p), if its probability functions is P(N=k)=✓↵+k1◆p↵(1p)k, k=0,1,2,..., k where xk for x 2 R and k 2 N0 denotes an extended binomial coecient. It follows that the mgf is p ◆↵ 1(1p)et MN (t) = E(etN ) = 1 ↵+k1 p↵et(1p)k k=0 k = 1 ✓↵+k1◆1(1p)et↵ et(1p)k ✓ k=0 k =✓ p ◆↵ 1(1p)et where this is defiPned for t values such that (1 p)et < 1. The mgf of Z = Ni=1 Xi is therefore MZ(t) = MN(lnMX(t)) = ✓ p 1(1p)MX(t) To compute the moments of Z we will first compute the mgf and moments of X. We have MX (t) = E(exp(tX)) = Z 1 etxexx✓1/(✓)dx = (1 t)✓ e(1t)xx✓1(1 t)✓/(✓)dx = (1 t)✓ provided t < 1. Now the mean and variance of X are easily calculated from 0 ( ✓ + 1 ) E ( X ) = M X ( 0 ) = ✓ ( 1 t ) t = 0 = ✓ E(X2)=M00(0)= ✓(✓+1)(1t)(✓+2) =✓(✓+1). X t=0 MZ0 (t) = p↵↵(1 p)(1 (1 p)MX (t))(↵+1)MX0 (t) E(Z)=MZ0 (0)= ↵(1p)MX0 (0)= ↵(1p)E(X)= ✓↵(1p) Similarly, from M00(t) = p↵↵(1p)2(1(1p)M (t))(↵+2)(M0 (t))2+p↵↵(1p)(1(1p)M (t))(↵+1)M00 (t) E(Z )=MZ(0)= p2 (MX(0)) + p MX(0) 2 00 ↵(↵+1)(1p)2 0 2 ↵(1p) 00 ✓2↵2(1 p)2 ✓2↵(1 p)2 ✓2↵(1 p) ✓↵(1 p) = p2 + p2 + p + p ✓2↵2(1 p)2 ✓2↵(1 p) ✓↵(1 p) = p2 + p2 + p from which it follows that var(Z) = ✓2↵(1 p) + ✓↵(1 p) p2 p whichisanexampleofvar(Z)=var(N)E(X)2 +E(N)var(X). Let Xj be a generic variable with the df of Xji. The mgf of Zj in terms of the mgf of Xj is MZj (t) = MNj (ln MXj (t)) = ✓ pj ◆↵j 1(1pj)MXj(t) Xn MXj(t)=E etXj = etxbqjb . b=1 Putting everything together the mgf of Z is MZ(t)= MZj(t)= 1(1p )Pn etxbq . j=1 j=1 j b=1 jb 21. The loss distribution takes the form L = M ̃ =d M ̃ 1 + M ̃ 2 where M ̃1 and M ̃2 are two independent negative binomial variables. For j = 1, 2 we know that ̃ X1000 ! Mj|=⇠Po kiwijj! ⇠Po 0.01 j wij i=1 Now P1000 wi1 = 750 and P1000 wi2 = 250 so we have that i=1 i=1 M ̃ j | = ⇠ P o ( j j ) where 1 = 7.5 and 2 = 2.5. Now j j ⇠ Ga(↵j,j/j) from which it follows that M ̃j ⇠ NB(↵j,j/(j + j)). Recalling the moments of negative binomial, which were computed in Exercise ??, we have that E⇣M ̃j⌘=↵jj =j j v a r ⇣ M ̃ j ⌘ = ↵ j ( j + j ) j = j2 ( 2 + j ) j j2 j from which we conclude that E(L)=q+ =10 sd(L) = 2(2 + 7.5) · 7.5 + 2(2 + 2.5) · 2.5 11 22 Plugging in the values j2 = 2 gives UL = p135. 22. This question shows that we can sometimes start with a mixture model and find a latent variable model that is equivalent. With ⇡ ̃k as defined we calculate ⇡ ̃k =E(PY(Y1 =0,...,Yk =0|! = )) k This integral can be evaluated to be =E P(Yi=0|!= ) i=1 exp( ) =E(exp(k )) . Z 1 exp(k )exp( ) ↵1 ⇡ ̃ k = ( ↵ ) 0 Z 1 exp((1+k) ) ↵1(1+k)↵ = (1 + k)↵ = (1 + k)↵ d fromwhichitfollowsthat⇡ ̃=(1+)↵ sothat=⇡ ̃1/↵ 1and ⇡ ̃k = k⇡ ̃ k+1 =C1/↵(⇡ ̃,...,⇡ ̃) CCl(u ,...,u )=(u✓ +···+u✓ d+1)1/✓ . k times 1/↵ ↵ Cl z }| { The interestimg question is how are the ⇡k (usual definition) related to ⇡? In fact we have the formula k times ˆCl z}|{ ⇡k = C1/↵(⇡,...,⇡) where CˆCl denotes the so-called Clayton survival copula. For example, when k = 2 we can show that ⇡2 =P(Y1 =1,Y2 =1)=1P(Y1 =0)P(Y2 =0)+P(Y1 =0,Y2 =0) =⇡ +⇡ 1+CCl (1⇡,1⇡) = Cˆ C l ( ⇡ , ⇡ ) 1/↵ 1 1 1 1 1/↵ 1 1 23. In the one-factor model we have Xi =biF+qq1b2i✏i Xi = bi + 1b2i✏i where , ✏1, ✏2, . . . are iid standard normal. The variance of the systematic part is i = b2i . Standard manipulations allow us to write the conditional default probability as ✓1(pi) + pi ◆ pi( )=P(Yi =1| = )= p1i where pi is the unconditional default probability and we note that pi( ) is an increasing function in . The loss coming from the ith obligor is Li = 0.6eiYi with conditional expecta- The total exposure when there are m obligors is am = (m/2)⇥5+(m/2)⇥1 = ✓1(pi) + pi ◆ li()=E(Li| =)=0.6ei p1 3m. This gives an asymptotic loss operator mp! X 1! ̄ 1 1 m (0.01)+ 0.8 l( )= lim li( ) = ⇥0.6⇥5⇥ p m!1ami=1 3m 4 0.2 m 1(0.01) + p0.8 +4 ⇥0.6⇥1⇥ p0.2 ! m 1(0.001) + p0.2 +4 ⇥0.6⇥5⇥ p0.8 !! m 1(0.001) + p0.2 +4⇥0.6⇥1⇥ p! 0.8 = 3 0.9 p0.2 !! 1 1(0.01) + p0.8 1(0.001) + p0.2 +0.9 p0.8 1X0000! ̄1 We can now compute that VaR0.99 Li ⇡ 30000 ⇥ l (0.999) ⇡ 30000 ⇥ 13 ⇥ 0.77777 ⇡ 7777 which compares with a total exposure of 5000 ⇥ 5 + 5000 ⇥ 1 = 30000, all figures in £M. P(Yi=1| = )=P(biF+q1b2iZidi|F= ) di + bi = P (Zi  p1 b2 ) i =(μi+i ) Conditional independence of Yi and Yj given follows from independence of Zi and Zj. The constants are μi = 1(pi)/p1 b2i and i = bi/p1 b2i . b) Imagine increasing the pPortfolio while retianing the structure. In a portfolio of size m we have L(m) = mi=1 Li where li( )=E(Li | = )=0.6eipi( )=0.6ei p1b2 +p1b2 For50%ofexposureswehaveei =2,pi =0.01andbi =0.6givingli( )= A( )andfor50%ofexposureswehaveei =4,pi =0.05andbi =0.8 giving li( ) = B( ). A and B are fully determined functions of which are aproximatelyA( )=1.2(2.91+0.75 )andB( )=2.4(2.74+1.33 ). Since am = 3m, the asymptotic loss operator would be given by 1(pi) bi ! ii ̄ 1Xm 1m m l( )= lim li( )= ( A( )+ B( ))=(A( )+B( ))/6 m!1 am i=1 3m 2 2 and the VaR could be approximated by VaR0.99(L(10000)) ⇡ a10000 ̄l(1(0.99)) = 30000 ̄l(1(0.99)). In our case this evaluates to approximately 8423. c) In this case we have li( )=E(Li | = )=eiE(i | = )pi( ) 1 (pi ) bi =ei(0.5+ ) p1b2 +p1b2 In this case the asymptotic loss operator is ̄l2( ) = 0.61(0.5 + ) ̄l( ) where ̄l( ) is the loss operator in c). So VaR is scaled by 0.61(0.5 + 1(0.99)). We get approximately 14005. 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com