Friday, August 23, 2019

CDS Mark-to-Market


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=sN1i=0(Ti+1Ti)E[erTi1τ>Ti+1]=sN1i=0(Ti+1Ti)e(r+λ)Ti+1. We also suppose that the premium payments are continuous. So :


PVPremiumLegsT0e(r+λ)udu=s1e(r+λ)Tr+λ


If we suppose that the protection leg is payed at the defaut time τ, we have, PVProtectionLeg=(1RR)E[erτ1τT]=(1RR)T0λe(r+λ)udu=(1RR)λλ+r(1e(λ+r)T)


We deduce that the fair spread s* is s* =(1RR)λ


Now we want to compute the Mark-to-Market (protection buyer point of view) of this CDS, at a time 0<tT.


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)st1e(r+λ)Tr+λ=0.


So PVProtectionLeg(t)=st1e(r+λ)Tr+λ. And then we conclude that :


MtM(t)=(sts0)1e(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 λ=s01RR, or do we calibrate it at each time t, i.e λt=st1RR ? Thank your for you answer and sorry for my poor english.


Adam.





No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...