cdsspread - Determine spread of credit default swap (2024)

Table of Contents
Syntax Description Examples Determine the Spread of a Credit Default Swap Input Arguments ZeroData — Zero rate data vector | IRDataCurve object ProbData — Default probability values matrix Settle — Settlement date datetime scalar | string scalar | date character vector Maturity — Maturity date datetime array | string array | date character vector Name-Value Arguments RecoveryRate — Recovery rate 0.4 (default) | decimal Period — Premium payment frequency 4 (default) | numeric with values 1, 2, 3, 4, 6 or 12 Basis — Day-count basis of contract 2 (actual/360) (default) | positive integers of the set [1...13] | vector of positive integers of the set [1...13] BusinessDayConvention — Business day conventions actual (default) | character vector PayAccruedPremium — Flag for accrued premiums paid upon default true (default) | integer with value 1 or 0 TimeStep — Number of days as time step for numerical integration 10 (days) (default) | nonnegative integer ZeroCompounding — Compounding frequency of the zero curve 2 (semiannual) (default) | integer with value of 1,2,3,4,6,12,or –1 ZeroBasis — Basis of the zero curve 0 (actual/actual) (default) | integer with value of 0 to 13 Output Arguments Spread — Spreads (in basis points) vector PaymentDates — Payment dates matrix PaymentTimes — Payment times matrix More About CDS Spread Algorithms References Version History R2022b: Serial date numbers not recommended See Also Topics MATLAB Command Americas Europe Asia Pacific

Determine spread of credit default swap

collapse all in page

Syntax

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

[Spread,PaymentDates,PaymentTimes,]= cdsspread(___,Name,Value)

Description

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

example

[Spread,PaymentDates,PaymentTimes,]= cdsspread(___,Name,Value) addsoptional name-value pair arguments.

example

Examples

collapse all

Determine the Spread of a Credit Default Swap

Open Live Script

This example shows how to use cdsspread to compute the spread (in basis points) for a CDS contract with the following data.

Settle = '17-Jul-2009'; % valuation date for the CDSZero_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 = datetime(2010,9,20);Spread = cdsspread(ZeroData,ProbData,Settle,Maturity)
Spread = 148.2705

Input Arguments

collapse all

ZeroDataZero rate data
vector | IRDataCurve object

Zero rate data, specified as a M-by-2 vector of dates, using a serial date number format, and zero rates or an IRDataCurve object of zero rates.

When ZeroData is an IRDataCurve object, ZeroCompounding and ZeroBasis areimplicit in ZeroData and are redundant inside thisfunction. In this case, specify these optional parameters when constructingthe IRDataCurve object before using the cdsspread function.

For more information on an IRDataCurve (Financial Instruments Toolbox) object,see Creating an IRDataCurve Object (Financial Instruments Toolbox).

Data Types: double | object

ProbDataDefault probability values
matrix

Default probability values, specified as a P-by-2 matrix with dates, using a serial date number format, and corresponding cumulative default probability values.

Data Types: double

SettleSettlement date
datetime scalar | string scalar | date character vector

Settlement date, specified as a scalar datetime, string, or date character vector. The Settle date must be earlier than or equal to the dates in Maturity.

To support existing code, cdsspread also accepts serial date numbers as inputs, but they are not recommended.

Data Types: char | string | datetime

MaturityMaturity date
datetime array | string array | date character vector

Maturity date, specified as a N-by-1 vector using a datetime array, string array, or date character vectors.

To support existing code, cdsspread also accepts serial date numbers as inputs, but they are not recommended.

Data Types: char | string | datetime

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: Spread = cdsspread(ZeroData,ProbData,Settle,Maturity,'Basis',7,'BusinessDayConvention','previous')

Note

Any optional input of size N-by-1 isalso acceptable as an array of size 1-by-N,or as a single value applicable to all contracts. Single values areinternally expanded to an array of size N-by-1.

RecoveryRateRecovery rate
0.4 (default) | decimal

Recovery rate, specified as the comma-separated pair consisting of 'RecoveryRate' and a N-by-1 vector of recovery rates, specified as a decimal from 0 to 1.

Data Types: double

PeriodPremium payment frequency
4 (default) | numeric with values 1, 2, 3, 4, 6 or 12

Premium payment frequency, specified as the comma-separated pair consisting of 'Period' and a N-by-1 vector with values of 1, 2, 3, 4, 6, or 12.

Data Types: double

BasisDay-count basis of contract
2 (actual/360) (default) | positive integers of the set [1...13] | vector of positive integers of the set [1...13]

Day-count basis of the contract, specified as the comma-separated pair consisting of 'Basis' and a positive integer using a NINST-by-1 vector.

  • 0=actual/actual

  • 1=30/360 (SIA)

  • 2=actual/360

  • 3=actual/365

  • 4=30/360(PSA)

  • 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

For more information, see Basis.

Data Types: double

BusinessDayConventionBusiness day conventions
actual (default) | character vector

Business day conventions, specified as the comma-separated pair consisting of 'BusinessDayConvention' and a character vector. 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 (for example, 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.

Data Types: char

PayAccruedPremiumFlag for accrued premiums paid upon default
true (default) | integer with value 1 or 0

Flag for accrued premiums paid upon default, specified as the comma-separated pair consisting of 'PayAccruedPremium' and a N-by-1 vector of Boolean flags that is true (default) if accrued premiums are paid upon default, false otherwise.

Data Types: logical

TimeStepNumber of days as time step for numerical integration
10 (days) (default) | nonnegative integer

Number of days to take as time step for the numerical integration, specified as the comma-separated pair consisting of 'TimeStep' and a nonnegative integer.

Data Types: double

ZeroCompoundingCompounding frequency of the zero curve
2 (semiannual) (default) | integer with value of 1,2,3,4,6,12,or –1

Compounding frequency of the zero curve, specified as the comma-separated pair consisting of 'ZeroCompounding' and an integer with values:

  • 1 — Annual compounding

  • 2 — Semiannual compounding

  • 3 — Compounding three times per year

  • 4 — Quarterly compounding

  • 6 — Bimonthly compounding

  • 12 — Monthly compounding

  • −1 — Continuous compounding

Data Types: double

ZeroBasisBasis of the zero curve
0 (actual/actual) (default) | integer with value of 0 to 13

Basis of the zero curve, specified as the comma-separated pair consisting of 'ZeroBasis' and a positive integer with values that are identical to Basis.

Data Types: double

Output Arguments

collapse all

Spread — Spreads (in basis points)
vector

Spreads (in basis points), returned as a N-by-1 vector.

PaymentDates — Payment dates
matrix

Payment dates, returned as a N-by-numCF matrix.

PaymentTimes — Payment times
matrix

Payment times, returned as a N-by-numCF matrixof accrual fractions.

More About

collapse all

CDS Spread

The market, or breakeven, spread value of aCDS.

The CDS spread can be computed by equating the value of theprotection 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, andthis has been decomposed as the product of the market or breakevenspread times the RPV01 or 'risky present valueof a basis point' of the contract. The latter is the present valueof the premium payments, considering the default probability. The MarketSpread can be computed as the ratio of the value of theprotection leg, to the RPV01 of the contract. cdsspread returnsthe resulting spread in basis points.

Algorithms

The premium leg is computed as the product of a spread S andthe risky present value of a basis point (RPV01).The RPV01 is given by:

RPV01=j=1NZ(tj)Δ(tj1,tj,B)Q(tj)

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

RPV0112j=1NZ(tj)Δ(tj1,tj,B)(Q(tj1)+Q(tj))

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

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

ProtectionLeg=0TZ(τ)(1R)dPD(τ)

(1R)i=1MZ(τi)(PD(τi)PD(τi1))

=(1R)i=1MZ(τi)(Q(τi1)Q(τi))

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

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

S0=ProtectionLegRPV01

References

[1] Beumee, J., D. Brigo, D. Schiemert, and G. Stoyle. “Chartinga 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 SwapsI: No Counterparty Default Risk.” Journal of Derivatives. Vol.8, pp. 29–40.

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

Version History

Introduced in R2010b

expand all

See Also

cdsbootstrap | cdsprice | IRDataCurve (Financial Instruments Toolbox)

Topics

  • 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)

MATLAB Command

You clicked a link that corresponds to this MATLAB command:

 

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

cdsspread - Determine spread of credit default swap (1)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
  • 日本 (日本語)
  • 한국 (한국어)

Contact your local office

cdsspread - Determine spread of credit default swap (2024)
Top Articles
7 Steps of Financial Planning
How to predict price direction with orderbook data
Calvert Er Wait Time
Danatar Gym
Arkansas Gazette Sudoku
FFXIV Immortal Flames Hunting Log Guide
Kraziithegreat
Vaya Timeclock
Koordinaten w43/b14 mit Umrechner in alle Koordinatensysteme
Localfedex.com
Directions To 401 East Chestnut Street Louisville Kentucky
Samsung 9C8
Walgreens Alma School And Dynamite
Xrarse
Imbigswoo
Baseball-Reference Com
Catsweb Tx State
Mawal Gameroom Download
Craigslist Pets Longview Tx
Oro probablemente a duna Playa e nomber Oranjestad un 200 aña pasa, pero Playa su historia ta bay hopi mas aña atras
Void Touched Curio
Everything We Know About Gladiator 2
Pay Boot Barn Credit Card
Kashchey Vodka
Tyrone Unblocked Games Bitlife
Kcwi Tv Schedule
Contracts for May 28, 2020
Rapv Springfield Ma
Craigslist Dubuque Iowa Pets
Maine Racer Swap And Sell
Harrison 911 Cad Log
What are the 7 Types of Communication with Examples
Kstate Qualtrics
Dreammarriage.com Login
Zero Sievert Coop
دانلود سریال خاندان اژدها دیجی موویز
Toth Boer Goats
Check From Po Box 1111 Charlotte Nc 28201
Gateway Bible Passage Lookup
Dogs Craiglist
Achieving and Maintaining 10% Body Fat
Atu Bookstore Ozark
412Doctors
Jammiah Broomfield Ig
Movie Hax
Rick And Morty Soap2Day
Used Sawmill For Sale - Craigslist Near Tennessee
Mail2World Sign Up
Gear Bicycle Sales Butler Pa
Charlotte North Carolina Craigslist Pets
How To Find Reliable Health Information Online
Room For Easels And Canvas Crossword Clue
Latest Posts
Article information

Author: Rueben Jacobs

Last Updated:

Views: 6161

Rating: 4.7 / 5 (77 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Rueben Jacobs

Birthday: 1999-03-14

Address: 951 Caterina Walk, Schambergerside, CA 67667-0896

Phone: +6881806848632

Job: Internal Education Planner

Hobby: Candle making, Cabaret, Poi, Gambling, Rock climbing, Wood carving, Computer programming

Introduction: My name is Rueben Jacobs, I am a cooperative, beautiful, kind, comfortable, glamorous, open, magnificent person who loves writing and wants to share my knowledge and understanding with you.