CS代写 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 √ I= √T σV+2σVT
dI μV +ln(V0/B) 1√ dσ=√2 +2T
which certainly satisfies dI/dσV > 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.80 0.15 0.05   0.80 0.15 0.05   0.655 0.225 0.120   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-off of the bond is
I{τ>T} + (1 − δ)I{τ≤T}
where the first term is the survival claim payoff and the second and third terms comprise the pay-off of the recovery. This simplifies to δI{τ >T } + (1 − δ) and hence the price of the bond is
p1(t,T) = EQ􏰀p0(t,T)􏰀δI{τ>T} +(1−δ)􏰁|Ht􏰁
= (1−δ)p0(t,T)+δEQ􏰀p0(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
p (t,T)=(1−δ)p (t,T)+δp (t,T)I e−􏰌T γQ(s)ds. 1 00{τ>t}t

The spread is
1 􏰄p1(t,T)􏰅 c(t,T) = −T−tln p0(t,T)
= − 1 ln􏰂1−δ+δe−􏰌T γQ(s)ds􏰃 t
When the hazard function under the risk-neutral measure Q is a constant
when τ > t.
γQ(t) = γ ̄Q we get
c(t,T)=− 1 ln􏰂1−δ+δe−γ ̄Q(T−t)􏰃. T−t
If γ ̄Q is small, note that we have
c(t,T)≈− 1 ln􏰀1−δγ ̄Q(T−t)􏰁≈δγ ̄Q
where we use the approximations exp(−x) ≈ 1 − x and ln(1 − x) ≈ −x for x
Under the RF recovery model the value of the survival claim is
e−􏰌T γQ(s)ds. t
E (1−δ)p0(t,τ)I{t<τ≤T} |Ht = (1−δ)I{τ>t} exp(−􏰌tγQ(s)ds)
To value the recovery we consider
EQ 􏰀I{t<τ≤T}p0(t,τ)􏰁 Therefore when τ > t we have
γQ(s) −􏰌s γQ(u)du 􏰅
T −t γQ(t) = γ ̄Q we get
􏰄 −􏰌T γQ(s)ds ln e t
􏰏T −γ ̄Q(s−t) 􏰇 e ds .
c(t,T)=− 1 ln e−γ ̄Q(T−t) +(1−δ)γ ̄Q T −t
In particular
􏰏 T e−γ ̄Q(s−t) 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}
􏰏T 􏰌sQ p0(t,s)γQ(s)e− t γ (u)duds.
When the hazard function under the risk-neutral measure Q is a constant
If we assume a constant interest rate some further simplification is possible.

9. See R script 10_CDS_calibration.R on qrmtutorial.org.
10. The result follows since
= x∗∆t 􏰍 e−(r+γ ̄Q)k∆t. k=1
e−(r+γ ̄Q)t dt =
= 􏰍 e−(r+γ ̄Q)(k−1)∆tδγ ̄Q k=1
δγ ̄Q 􏰍 e−(r+γ ̄Q)t dt
x∗∆t e−(r+γ ̄ )∆t = δγ ̄Q N
e−(r+γ ̄Q)t dt
e−(r+γ ̄ )t dt.
k=1 t=(k−1)∆t
e−(r+γ ̄ )(k−1)∆te−(r+γ ̄
where we have made the change of variables u = t − (k − 1)∆t. It follows from
e−(r+γ ̄Q)u du = 􏰍 e−(r+γ ̄Q)(k−1)∆tx∗∆t e−(r+γ ̄Q)∆t
Hence the same value of γ ̄Q can make the value of the premium and default legs equal for a CDS with any maturity, that is any value of N.
11. We need to compute moments of L = 􏰊mi=1 δiYi. We have m = 1000 and pi =p=0.01foralli.
a) δi = δ = 0.4 so L = δ􏰊mi=1Yi. Obviously E(L) = δmp and var(L) = δ2mp(1 − p). Numerical values are E(L) = 4 and sd(L) ≈ 1.26.
b)Westillhaveδi =δ=0.4andL=δ􏰊mi=1Yi. SoE(L)=δmpasbefore but
var(L)=δ2var 􏰍Yi =δ2􏰍var(Yi)+δ2􏰍cov(Yi,Yj)
i=1 i=1 i̸=j
= δ2mp(1 − p) + δ2m(m − 1) cov(Y1, Y2) .
Now cov(Y1, Y2) = ρ􏰑var(Y1) var(Y2) = ρp(1 − p), so
var(L) = δ2mp(1 − p) + δ2m(m − 1)ρp(1 − p)
=δ2mp(1−p)(1+(m−1)ρ) . Numerical value is sd(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:
var(L) = 􏰍 var(∆iYi) + 􏰍 cov(∆iYi, ∆j Yj )
= m 􏰀E(∆21Y1) − E(∆1Y1)2􏰁 + m(m − 1) (E(∆1Y1∆2Y2) − 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 + mδ2p(1 − p)(1 + (m − 1)ρ) .
The numerical value is sd(L) ≈ 3.10.
Note, how adding default dependence has profound effect. Adding independent stochastic LGDs has a minor effect. Relaxing the independence assumptions for LGDs would lead to a greater effect.
12. The within-group asset correlation (say for first group) is given by E(XiXj) = E(b1F1B1F1) = b21
The between-group asset calculation is
E(XiXj) = E(b1b2F1F2) = ρb1b2
P(Xi1 ≤di1,…,Xik ≤dik)=P(bi1F +􏰒1−b2i1Zi1 ≤di1,…,bikF +􏰒1−b2ikZik)
=E􏰂P􏰂bi1F+􏰒1−b2i1Zi1 ≤di1,…,|F􏰃􏰃  
di1 −bi1F =EPZi1 ≤ 􏰒 ,…,|F
1 − b 2i 1
k  di−biF 
=E PZij ≤ 􏰒 |F
j=1 1 − b2ij
􏰏∞k di −bix 􏰎jj
=  Φ􏰒1−b2 φ(x)dx −∞ j=1 ij
Note that this appears to be a mixture model with a standard normal factor:
P(Yi1 =1,…,Yik =1)= 
dij −bijx pij(x)=Φ􏰒1−b2  .
􏰏∞􏰆k 􏰇 􏰎pij(x) φ(x)dx
In an exchangeable default model we have di = d and bi = √ρ for all i. More- over we can simply notation and introduce πk for the joint default probability.
Thus we obtain
􏰏∞􏰄 􏰄d−√ρx􏰅􏰅k
√1−ρ φ(x)dx

and,sinceforanyiweknowP(Yi =1)=Φ(d)=π,weinfer
􏰏 ∞ 􏰄 􏰄Φ−1(π) − √ρx􏰅􏰅k
Φ √1−ρ φ(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 = √ρ 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) θ 􏰕 􏰔􏰓 􏰖 􏰕 􏰔􏰓 􏰖 k times m−k times = exp􏰂−􏰀k(−lnπ)θ􏰁1/θ􏰃 = exp 􏰀−k1/θ (− ln π)􏰁 = exp 􏰀k1/θ ln π􏰁 15. In this question we have L = 􏰊1000 Yi. Since L | Q = q ∼ B(1000,q) and where θ ≥ 1. Q ∼ Beta(a, b) we calculate that 􏰏 1 􏰄1000􏰅 k 1000−k 1 P(L=k)= k q (1−q) β(a,b)q 􏰄1000􏰅β(k + a, 1000 − k + b) = k β(a,b) Sincepi =E(Yi)=E(Q)= a =:πand a+b we have two equations in two unknowns which are easily solved to give a = a−1 b−1 (1−q) dq π(ρ−1 −1) and b = (1−π)(ρ−1 −1). When π = 0.01 and ρY = 0.005 we get , k=0,1,... . cov(Yi,Yj) P(Yi =1,Yj =1)−π2 E(Q2)−π2 1 π−π2 =a+b+1 a = 1.99 and b = 197.01. 16. The distribution function is FQ(q) = P(Q ≤ q) = P(Φ(μ + σZ) ≤ q) The density is 􏰄 Φ−1(q)−μ􏰅 =PZ≤σ 􏰄Φ−1(q) − μ􏰅 =Φσ. 􏰄Φ−1(q) − μ􏰅 dΦ−1(q) 1 fQ(q)=φ σ dqσ φ􏰂Φ−1(q)−μ􏰃 σ = φ(Φ−1(q))σ , where we have differentiated both sides of the equality Φ(Φ−1(q)) = q to obtain from which it follows that φ 􏰀Φ−1(q)􏰁 dΦ−1(q) = 1 dq dΦ−1(q) = 1 . dq φ (Φ−1(q)) Calculation of the mean follows in the solution of the next question. 17. 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) = E 􏰂(Φ(μ + σZ))k􏰃 􏰏∞ (Φ(μ + σx))k φ(x)dx . (1) Now in Exercise 13 we constructed an exchangeable one-factor Gaussian thresh- old model with 􏰏 ∞ 􏰄 􏰄Φ−1(π) − √ρx􏰅􏰅k √1−ρ φ(x)dx 􏰏 ∞ 􏰄 􏰄Φ−1(π) + √ρx􏰅􏰅k Φ √1−ρ φ(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 π=Φ(μ/√1+σ2)andρ=σ2/(1+σ2)−1. Theformermustbethemeanofa probit-normal distribution. which is obviously equivalent to 18. 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|Ψ=ψ)=1−P(Y ̃i =0|Ψ=ψ) = 1 − exp(−kiψ) .
Now, if Ψ ∼ Ga(α, 1), we can calculate that
P(Qi ≤q)=P(pi(Ψ)≤q)
= P(1 − exp(−kiΨ) ≤ q)
􏰄 −ln(1−q)􏰅 =PΨ≤k,
from which it follows that
fQi (q) = fΨ ki ki(1 − q) .
􏰄−ln(1−q)􏰅 1
Inserting the gamma density fΨ(ψ) = ψα−1 exp(−ψ)/Γ(α) we obtain
1 (−ln(1−q))α−1 􏰄ln(1−q)􏰅 1
fQi (q) = Γ(α) kα−1 exp ki ki(1 − q)
= i (− ln(1 − q))α−1 (1 − q)1/ki−1 . Γ(α)
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(α, k−1). i
19. 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 􏰄α+k−1􏰅 α k P(N=k)= k p(1−p), k=0,1,2,..., where 􏰀x􏰁 for x ∈ R and k ∈ N0 denotes an extended binomial coefficient. It k follows that the mgf is MN (t) = E(etN ) 􏰍∞ 􏰄 α + k − 1 􏰅 α 􏰀 t 􏰁 k = kpe(1−p) =􏰍∞ 􏰄α+k−1􏰅􏰀1−(1−p)et􏰁α􏰀et(1−p)􏰁k􏰄 k=0 p 􏰅α k 1−(1−p)et 􏰄 p 􏰅α = 1−(1−p)et where this is defined for t values such that (1 − p)et < 1. 7 The mgf of Z = 􏰊Ni=1 Xi is therefore MZ(t)=MN(lnMX(t))= 1−(1−p)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)) = E(X2)=M′′(0)= θ(θ+1)(1−t)−(θ+2)􏱚􏱚 =θ(θ+1). X t=0 etxe−xxθ−1/Γ(θ)dx e−(1−t)xxθ−1(1 − t)θ/Γ(θ)dx provided t < 1. Now the mean and variance of X are easily calculated from = (1 − t)−θ = (1 − t)−θ E(X) = MX′ (0) = θ(1 − t)−(θ+1)􏱚􏱚t=0 = θ MZ′ (t) = pαα(1 − p)(1 − (1 − p)MX (t))−(α+1)MX′ (t) E(Z)=MZ′ (0)= α(1−p)MX′ (0)= α(1−p)E(X)= θα(1−p) Similarly, from M′′(t) = pαα(1−p)2(1−(1−p)M (t))−(α+2)(M′ (t))2+pαα(1−p)(1−(1−p)M (t))−(α+1)M′′ (t) E(Z )=MZ(0)= p2 (MX(0)) + p MX(0) 2 ′′ α(α+1)(1−p)2 ′ 2 α(1−p) ′′ θ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 􏰄 pj 􏰅αj MZj(t)=MNj(lnMXj(t))= 1−(1−pj)MXj(t) n MXj(t)=E􏰀etXj􏰁=􏰍etxbqjb . b=1 Putting everything together the mgf of Z is p p􏰄 p 􏰅αj 􏰎􏰎j MZ(t)= MZj(t)= 1−(1−p )􏰊n etxbq j=1 j=1 j b=1 20. 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 􏰆1000 􏰇 M ̃j |Ψ=ψ∼Po 􏰍kiwijψj ∼Po 0.01ψ􏰍w j ij Now 􏰊1000 wi1 = 750 and 􏰊1000 wi2 = 250 so we have that 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 19, we have that E 􏰂 M ̃ 􏰃 = α j λ j = λ jβj var􏰂M ̃􏰃=αj(βj+λj)λj =σ2(σ−2+λ)λ j βj2 jjjj from which we conclude that E(L)=λ1 +λ2 =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 = √135. 21. 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(P(Y1 =0,...,Yk =0|Ψ=ψ)) 􏰆k􏰇 =E 􏰎P(Yi=0|Ψ=ψ) i=1 = E 􏰍 exp(−κψ) = E (exp(−kκψ)) . This integral can be evaluated to be 􏰏 ∞ exp(−kκψ)exp(−ψ)ψα−1 k times 􏰀 −1/α 􏰁−α Cl 􏰓 􏰖􏰕 􏰔 fact we have the formula πk = C1/α(π,...,π) where CˆCl denotes the so-called Clayton survival copula. For example, when = (1 + kκ) = (1 + kκ)−α −α 􏰏 ∞ exp(−(1 + kκ)ψ)ψα−1(1 + kκ)α Γ(α) dψ fromwhichitfollowsthatπ ̃=(1+κ)−α sothatκ=π ̃−1/α −1and π ̃k = kπ ̃ −k+1 =C1/α(π ̃,...,π ̃) CCl(u ,...,u )=(u−θ +···+u−θ −d+1)−1/θ . The interestimg question is how are the πk (usual definition) related to π? In k = 2 we can show that k times ˆCl 􏰓􏰖􏰕􏰔 π2 =P(Y1 =1,Y2 =1)=1−P(Y1 =0)−P(Y2 =0)+P(Y1 =0,Y2 =0) =π +π −1+CCl (1−π,1−π) 1 1 1/α 1 1 =CˆCl (π,π) 22. In the one-factor model we have Xi = biF+􏰒1−b2iεi Xi = −biΨ+􏰒1−b2iε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) + √βiψ􏰅 pi(ψ)=P(Yi =1|Ψ=ψ)=Φ √1−βi 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- li(ψ)=E(Li |Ψ=ψ)=0.6eiΦ √1−β 10 􏰄Φ−1(pi) + √βiψ􏰅 The total exposure when there are m obligors is am = (m/2)×5+(m/2)×1 = 3m. This gives an asymptotic loss operator ̄ 1 􏰍m l(ψ)= lim 􏰆Φ−1(0.01)+√0.8ψ􏰇 ×0.6×5×Φ +4 ×0.6×1×Φ √0.2 􏰆Φ−1(0.001) + √0.2ψ􏰇 +4 ×0.6×5×Φ m = 3 0.9Φ √0.2 √ 􏰆Φ−1(0.01) + √0.8ψ􏰇 √0.8 􏰆Φ−1(0.001) + √0.2ψ􏰇􏰇 + 4 ×0.6×1×Φ 1 􏰆 􏰆Φ−1(0.01) + √0.8ψ􏰇 􏰆Φ−1(0.001) + √0.2ψ􏰇􏰇 +0.9Φ √ 0.8 We can now compute that 􏰆10000 􏰇 VaR 􏰍 L ≈ 0.99 i i=1 30000 × ̄l 􏰀Φ−1(0.999)􏰁 ≈ 30000 × 31 × 0.77777 ≈ 7777 which compares with a total exposure of 5000 × 5 + 5000 × 1 = 30000, all figures in £M. = Φ(μi + σiψ) Conditional independence of Yi and Yj given Ψ follows from independence of Zi and Zj. The constants are μi = Φ−1(pi)/􏰑1 − b2i and σi = bi/􏰑1 − b2i . b) Imagine increasing the portfolio while retianing the structure. In a portfolio P ( Y i = 1 | Ψ = ψ ) = P ( b i F + 􏰒 1 − b 2i Z i ≤ d i | F = − ψ ) di +biψ = P (Zi ≤ 􏰑1 − b2 ) i of size m we have L(m) = 􏰊mi=1 Li where li(ψ)=E(Li |Ψ=ψ)=0.6eipi(ψ)=0.6eiΦ 􏰑1−b2 +􏰑1−b2ψ For 50% of exposures we have ei = 2, pi = 0.01 and bi = 0.6 giving li(ψ) = A(ψ)andfor50%ofexposureswehaveei =4,pi =0.05andbi =0.8 􏰆 Φ−1(p ) b 􏰇 ii giving li(ψ) = B(ψ). A and B are fully determined functions of ψ which are aproximately A(ψ) = 1.2Φ(−2.91 + 0.75ψ) and B(ψ) = 2.4Φ(−2.74 + 1.33ψ). Since am = 3m, the asymptotic loss operator would be given by ̄ 1􏰍m 1m m l(ψ) = lim li(ψ) = ( A(ψ) + B(ψ)) = (A(ψ) + B(ψ))/6 m→∞ 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(p ) b 􏰇 ii =eiΦ(0.5+ψ)Φ 􏰑1−b2 +􏰑1−b2ψ ii In this case the asymptotic loss operator is ̄l2(ψ) = 0.6−1Φ(0.5 + ψ) ̄l(ψ) where ̄l(ψ) is the loss operator in c). So VaR is scaled by 0.6−1Φ(0.5 + Φ−1(0.99)). We get approximately 14005. 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com