Skip to Main Content Skip to Search
Product Documentation

cdsspread - Determine spread of credit default swap

Syntax

[Spread, PaymentDates, PaymentTimes] = cdsspread(ZeroData,
ProbData, Settle, Maturity)
[Spread, PaymentDates, PaymentTimes] = cdsspread(ZeroData,
ProbData, Settle, Maturity, Name,Value)

Description

[Spread, PaymentDates, PaymentTimes] = cdsspread(ZeroData, ProbData, Settle, Maturity) computes the spread of the CDS.

[Spread, PaymentDates, PaymentTimes] = cdsspread(ZeroData, ProbData, Settle, Maturity, Name,Value) computes the spread of the CDS with additional options specified by one or more Name,Value pair arguments.

Input Arguments

ZeroData

M-by-2 vector of dates and zero rates or IRCurve of zero rates.

ProbData

P-by-2 array of dates and default probabilities.

Settle

Settlement date is a serial date number or date string. This must be earlier than or equal to the dates in MarketData.

Maturity

N-by-1 vector of serial date numbers or date strings containing the maturity dates.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments, where 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.

'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/actual (ISDA)

  • 13 = BUS/252

For more information, see basis.

Default: 2 (actual/360)

'BusDayConvention'

String or N-by-1 cell array of strings of business day conventions. Values are:

  • actual

  • follow

  • modifiedfollow

  • previous

  • modifiedprevious

Default: actual

'PayAccruedPremium'

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

Default: True

'Period'

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

Default: 4

'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, where the 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 IRCurve 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 IRCurve object before calling this function.

Default: 2 (semiannual compounding )

Output Arguments

Spread

N-by-1 vector of spreads (in basis points).

PaymentDates

N-by-numCF matrix of payment dates.

PaymentTimes

N-by-numCF matrix of accrual fractions.

Definitions

CDS Spread

The market, or breakeven, spread value of a CDS can be computed by equating the value of the protection leg with the value of the premium leg:

Market Spread * RPV01 = Value of Protection Leg

The left side corresponds to the value of the premium leg, and this has been decomposed as the product of the market or breakeven spread times the RPV01 or 'risky present value of a basis point' of the contract. The latter is the present value of the premium payments, taking into consideration the default probability. The Market Spread can be computed as the ratio of the value of the protection leg, to the RPV01 of the contract. cdsspread returns the resulting spread in basis points.

Examples

Use cdsspread to compute the clean price for a CDS contract:

Settle = '17-Jul-2009';
Zero_Time = [.5 1 2 3 4 5]';
Zero_Rate = [1.35 1.43 1.9 2.47 2.936 3.311]'/100;
Zero_Dates = daysadd(Settle,360*Zero_Time,1);
ZeroData = [Zero_Dates Zero_Rate];
ProbData = [daysadd(datenum(Settle),360,1), 0.0247];
Maturity = '20-Sep-2010';
 
Spread = cdsspread(ZeroData,ProbData,Settle,Maturity)

Spread =

  148.2485

Algorithms

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:

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

when accrued premiums are paid upon default. Here, t0 = 0 is the valuation date, and t1,...,tn = T are the premium payment dates over the life of the contract,T is the maturity of the contract, Z(t) is the discount factor for a payment received at time t, and Δ(tj-1, tj, B) is a day count between dates tj-1 and tj corresponding to a basis B.

The protection leg of a CDS contract is given by the following formula:

where the integral is approximated with a finite sum over the discretization τ0 = 0,τ1,...,τM = T.

A breakeven spread S0 makes the value of the premium and protection legs equal. It follows that:

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.

See Also

cdsbootstrap | cdsprice

Tutorials

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS