# cdsbootstrap

Bootstrap default probability curve from credit default swap market quotes

## Syntax

[ProbData, HazData] = cdsbootstrap(ZeroData, MarketData,
Settle)
[ProbData, HazData] = cdsbootstrap(ZeroData, MarketData,
Settle, Name,Value)

## Description

[ProbData, HazData] = cdsbootstrap(ZeroData, MarketData,
Settle)
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, Name,Value)
bootstraps the default probability curve using CDS market quotes with additional options specified by one or more Name,Value pair arguments. 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.

## Input Arguments

 ZeroData M-by-2 vector of dates and zero rates or an IRDataCurve object of zero rates.
 MarketData N-by-2 matrix of dates and corresponding market spreads or N-by-3 matrix of dates, upfronts, and standard spreads of CDS contracts.
 Settle Settlement date is a serial date number or date character vector. This must be earlier than or equal to the dates in MarketData.

### Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

 Note:   Any optional input of size N-by-1 is also acceptable as an array of size 1-by-N, or as a single value applicable to all contracts. Single values are internally expanded to an array of size N-by-1.

'Basis'

N-by-1 vector of day-count basis of the CDS:

• 0 = actual/actual

• 1 = 30/360 (SIA)

• 2 = actual/360

• 3 = actual/365

• 4 = 30/360 (BMA)

• 5 = 30/360 (ISDA)

• 6 = 30/360 (European)

• 7 = actual/365 (Japanese)

• 8 = actual/actual (ICMA)

• 9 = actual/360 (ICMA)

• 10 = actual/365 (ICMA)

• 11 = 30/360E (ICMA)

• 12 = actual/365 (ISDA)

• 13 = BUS/252

Default: 2 (actual/360)

'BusDayConvention'

Business day conventions, specified by a character vector or N-by-1 cell array of character vectors of business day conventions. The selection for business day convention determines how non-business days are treated. Non-business days are defined as weekends plus any other date that businesses are not open (e.g. statutory holidays). Values are:

• actual — Non-business days are effectively ignored. Cash flows that fall on non-business days are assumed to be distributed on the actual date.

• follow — Cash flows that fall on a non-business day are assumed to be distributed on the following business day.

• modifiedfollow — Cash flows that fall on a non-business day are assumed to be distributed on the following business day. However if the following business day is in a different month, the previous business day is adopted instead.

• previous — Cash flows that fall on a non-business day are assumed to be distributed on the previous business day.

• modifiedprevious — Cash flows that fall on a non-business day are assumed to be distributed on the previous business day. However if the previous business day is in a different month, the following business day is adopted instead.

Default: actual

N-by-1 vector of Boolean flags, True (default), if accrued premiums are paid upon default, False otherwise.

Default: True

'Period'

N-by-1 vector of the number of premiums per year of the CDS. Allowed values are 1, 2, 3, 4, 6, and 12.

Default: 4

'ProbDates'

P-by-1 vector of dates for ProbData.

Default: Column of dates in MarketData

'RecoveryRate'

N-by-1 vector of recovery rates, expressed as a decimal from 0 to 1.

Default: 0.4

'TimeStep'

Positive integer indicating the number of days to take as time step for the numerical integration.

Default: 10 (days)

'ZeroBasis'

Basis of the zero curve. Choices are identical to Basis.

Default: 0 (actual/actual)

'ZeroCompounding'

Compounding frequency of the zero curve. Allowed values are:

• 1 — Annual compounding

• 2 — Semiannual compounding

• 3 — Compounding three times per year

• 4 — Quarterly compounding

• 6 — Bimonthly compounding

• 12 — Monthly compounding

• -1 — Continuous compounding

 Note:   When ZeroData is an IRDataCurve object, the arguments ZeroCompounding and ZeroBasis are implicit in ZeroData and are redundant inside this function. In that case, specify these optional arguments when constructing the IRDataCurve object before calling this function.

Default: 2 (Semiannual compounding)

## Output Arguments

ProbData

P-by-2 matrix with dates and corresponding cumulative default probability values. The dates match those in MarketData, unless the optional input parameter ProbDates is provided.

HazData

N-by-2 matrix with dates and corresponding hazard rate values for the standard survival probability model. The dates match those in MarketData.

 Note:   A warning is displayed when non-monotone default probabilities (that is, negative hazard rates) are found.

## Examples

collapse all

### Bootstrap Default Probability Curve from Credit Default Swap Market Quotes

This example shows how to use cdsbootstrap with market quotes for CDS contracts to generate ProbData and HazData values.

Settle = '17-Jul-2009'; % valuation date for the CDS
Spread_Time = [1 2 3 5 7]';
Spread = [140 175 210 265 310]';
Zero_Time = [.5 1 2 3 4 5]';
Zero_Rate = [1.35 1.43 1.9 2.47 2.936 3.311]'/100;
ZeroData = [Zero_Dates Zero_Rate];

format longg
[ProbData,HazData] = cdsbootstrap(ZeroData,MarketData,Settle)
ProbData =

734336        0.0233427858530509
734701        0.0575839967597608
735067         0.102139701668411
735797         0.206453998211311
736528         0.323411093986656

HazData =

734336        0.0232959886360797
734701          0.03520005122783
735067        0.0476383354493126
735797        0.0609055766425819
736528        0.0785241514697432

collapse all

### Algorithms

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\left(t\right)=P\left[\tau \le t\right]=1-P\left[\tau >t\right]=1-Q\left(t\right)$

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 0tt1

λ2, for t1 < tt2

λ3, for t2 <t

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

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

${}^{{e}^{-\lambda 1t-\lambda 2\left(t-t1\right)}}$, for t1 < tt2

${}^{{e}^{-\lambda 1t1-\lambda 2\left(t2-t1\right)-\lambda 3\left(t-t2\right)}}$, for t2 < t

Given n market dates t1,...,tn and corresponding market CDS spreads S1,...,Sn, cdsbootstrap calibrates the parameters λ1,...,λn and evaluates PD(t) on the market dates, or an optional user-defined set of dates.

## References

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.

Hull, J., and A. White, "Valuing Credit Default Swaps I: No Counterparty Default Risk," Journal of Derivatives 8, 29–40.

O'Kane, D. and S. Turnbull, "Valuation of Credit Default Swaps." Lehman Brothers, Fixed Income Quantitative Credit Research, April 2003.