I am trying to calculate the Mark-to-Market of a CDS, and I want to know if what I did is correct.
Let a CDS of maturity T, we suppose that the recovery RR, the discount rate r, and the hazard rate λ>0 are constant. The default time τ is defined such that P(τ>t) = e−λt. Let 0=T0<...<TN=T the contractual payment dates. We ignore the payment accrued.
I'm going to calculate the fair spread s*, this is the spread such that PVPremiumLeg=PVProtectionLeg. We can write the present value of the premium leg of an existing CDS contract as :
PVPremiumLeg=s∑N−1i=0(Ti+1−Ti)E[e−rTi1τ>Ti+1]=s∑N−1i=0(Ti+1−Ti)e−(r+λ)Ti+1. We also suppose that the premium payments are continuous. So :
PVPremiumLeg≃s∫T0e−(r+λ)udu=s1−e−(r+λ)Tr+λ
If we suppose that the protection leg is payed at the defaut time τ, we have, PVProtectionLeg=(1−RR)E[e−rτ1τ≤T]=(1−RR)∫T0λe−(r+λ)udu=(1−RR)λλ+r(1−e−(λ+r)T)
We deduce that the fair spread s* is s* =(1−RR)λ
Now we want to compute the Mark-to-Market (protection buyer point of view) of this CDS, at a time 0<t≤T.
We have MtM(t)=PVProtection(t)−PVPremiumLeg(t). But at this time t, we know that the market spread (the spread quoted in the market) st is the spread which makes the Mark-to-Market of a new CDS (of maturity T) starting at time t equal to 0, i.e PVProtectionLeg(t)−st1−e−(r+λ)Tr+λ=0.
So PVProtectionLeg(t)=st1−e−(r+λ)Tr+λ. And then we conclude that :
MtM(t)=(st−s0)1−e−(r+λ)Tr+λ with s0 the contractual spread.
I want to implement this MtM function in R. My question is how do you calibrate the λ ? Do we still have λ=s01−RR, or do we calibrate it at each time t, i.e λt=st1−RR ? Thank your for you answer and sorry for my poor english.
Adam.
No comments:
Post a Comment