Bootstrap default probability curve from credit default swap market quotes

`[`

bootstraps
the default probability curve using credit default swap (CDS) market
quotes. The market quotes can be expressed as a list of maturity dates
and corresponding CDS market spreads, or as a list of maturities and
corresponding upfronts and standard spreads for standard CDS contracts.
The estimation uses the standard model of the survival probability.`ProbData`

,`HazData`

]
= cdsbootstrap(`ZeroData`

,`MarketData`

,`Settle`

)

`[`

adds
optional name-value pair arguments.`ProbData`

,`HazData`

]
= cdsbootstrap(___,`Name,Value`

)

If the time to default is denoted by *τ*,
the default probability curve, or function, *PD(t)*,
and its complement, the survival function *Q(t)*,
are given by:

$$PD(t)=P[\tau \le t]=1-P[\tau >t]=1-Q(t)$$

In the standard model, the survival probability is defined in
terms of a piecewise constant hazard rate *h(t)*.
For example, if *h(t)* =

*λ _{1}*, for

`0`

≤*λ _{2}*, for

*λ _{3}*, for

then the survival function is given by *Q(t)* =

$${e}^{-\lambda 1t}$$, for `0`

≤ *t* ≤ *t _{1}*

$${}^{{{\displaystyle e}}^{-\lambda 1t-\lambda 2(t-t1)}}$$, for *t _{1}* <

$${}^{{{\displaystyle e}}^{-\lambda 1t1-\lambda 2(t2-t1)-\lambda 3(t-t2)}}$$, for *t _{2}* <

Given *n* market dates *t _{1},...,t_{n}* and
corresponding market CDS spreads

`cdsbootstrap`

calibrates
the parameters [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`

| `cdsprice`

| `cdsrpv01`

| `cdsspread`