Determine spread of credit default swap

`[`

computes
the spread of the CDS.`Spread`

,`PaymentDates`

,`PaymentTimes`

,]
= cdsspread(`ZeroData`

,`ProbData`

,`Settle`

,`Maturity`

,)

`[`

adds
optional name-value pair arguments.`Spread`

,`PaymentDates`

,`PaymentTimes`

,]
= cdsspread(___,`Name,Value`

)

The premium leg is computed as the product of a spread *S* and
the risky present value of a basis point (`RPV01`

).
The `RPV01`

is given by:

$$RPV01={\displaystyle \sum _{j=1}^{N}Z(tj})\Delta (tj-1,tj,B)Q(tj)$$

when no accrued premiums are paid upon default, and it can be approximated by

$$RPV01\approx \frac{1}{2}{\displaystyle \sum _{j=1}^{N}Z(tj})\Delta (tj-1,tj,B)(Q(tj-1)+Q(tj))$$

when accrued premiums are paid upon default. Here, *t _{0}* =

`0`

is
the valuation date, and The protection leg of a CDS contract is given by the following formula:

$$ProtectionLeg={\displaystyle {\int}_{0}^{T}Z(\tau )(1-R)dPD(}\tau )$$

$$\approx (1-R){\displaystyle \sum _{i=1}^{M}Z(\tau i)(PD}(\tau i)-PD(\tau i-1))$$

$$=(1-R){\displaystyle \sum _{i=1}^{M}Z(\tau i)(Q}(\tau i-1)-Q(\tau i))$$

where the integral is approximated with a finite sum over the
discretization *τ _{0}* =

`0`

,A breakeven spread *S _{0}* makes
the value of the premium and protection legs equal. It follows that:

$$S0=\frac{ProtectionLeg}{RPV01}$$

[1] Beumee, J., D. Brigo, D. Schiemert, and G. Stoyle. *“Charting
a Course Through the CDS Big Bang.” * Fitch Solutions,
Quantitative Research, Global Special Report. April 7, 2009.

[2] Hull, J., and A. White. “Valuing Credit Default Swaps
I: No Counterparty Default Risk.” *Journal of Derivatives.* Vol.
8, pp. 29–40.

[3] O'Kane, D. and S. Turnbull. *“Valuation of
Credit Default Swaps.” * Lehman Brothers, Fixed
Income Quantitative Credit Research, April 2003.

`IRDataCurve`

| `cdsbootstrap`

| `cdsprice`

- Finding Breakeven Spread for New CDS Contract
- Valuing an Existing CDS Contract
- Converting from Running to Upfront
- First-to-Default Swaps (Financial Instruments Toolbox)
- Pricing a CDS Index Option (Financial Instruments Toolbox)
- Credit Default Swap (CDS)