I am currently trying to derive the cumulative probability of default from a CDS spread where the LGD is 30% and there are quarterly premiums including the accrued premium.
Maturity 1Y, 3Y, 5Y, 7Y, 10Y
CDS spread 140bps, 160 bps, 180bps, 200bps, 225bps
The risk-free interest rate term structure equals 2% continuously compounding.
I am aware that there are many different CDS pricing formulas, but the formula we are using in school to price the CDS is as follows: (see image)
To derive the survival probability and consequently the hazard rates, I need to solve for the parts in the boxes. The first part of the formula represents the premium paid. Thus, $P(0,T_i)$ is the discounted value, which is calculated by the $\mathrm{notional} \times \exp\{-\textrm{risk-free rate} \times \textrm{time period}\}$. $(T_i – T_{i-1})$ represents the time period in which the premium is paid and the part in the box is the survival probability.
The second part of the formula is the accrued premium. This is the integral of the following components: $P(0,u)$ is the discounted value at the time of default. $(u – Ty(u))$ represents the difference between the default time and the last Ti prior to default. The part in the box denotes the probability density function of the default time \$tau$.
The last part of the formula is the protection leg. This is the LGD * the integral of the discounted value at default * the probability density function. However, I do not understand how you can know when the bond has defaulted between two periods and how you quantify this (the default could happen anywhere between two periods, so how does the probability density function help with this?).
I do not simply want the answers of the probability of default and hazard rates, but I want to understand the thought behind this formula. If someone could explain this clearly (like you would explain to a 5-year old) it would be very much appreciated.