Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

# cdsrpv01

Compute risky present value of a basis point for credit default swap

## Syntax

• RPV01 = cdsrpv01(ZeroData,ProbData,Settle,
Maturity)
example
• RPV01 = cdsrpv01(___,Name,Value)
• [RPV01,PaymentDates,PaymentTimes] = cdsrpv01(ZeroData,ProbData,Settle,
Maturity)
• [RPV01,PaymentDates,PaymentTimes] = cdsrpv01(___,Name,Value)

## Description

example

RPV01 = cdsrpv01(ZeroData,ProbData,Settle,
Maturity)
computes the risky present value of a basis point (RPV01) for a credit default swap (CDS).

RPV01 = cdsrpv01(___,Name,Value) computes the risky present value of a basis point (RPV01) for a credit default swap (CDS) using optional name-value pair arguments.

[RPV01,PaymentDates,PaymentTimes] = cdsrpv01(ZeroData,ProbData,Settle,
Maturity)
computes the risky present value of a basis point (RPV01), PaymentDates, and PaymentTimes for a credit default swap (CDS).

[RPV01,PaymentDates,PaymentTimes] = cdsrpv01(___,Name,Value) computes the risky present value of a basis point (RPV01), PaymentDates, and PaymentTimes for a credit default swap (CDS) using optional name-value pair arguments.

## Examples

expand all

### Calculate the RPV01 Value for a CDS

Calculate the RPV01 value, given the following specification for a CDS.

```Settle = '17-Jul-2009'; % valuation date for the CDS
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];
Maturity = '20-Sep-2010';

RPV01 = cdsrpv01(ZeroData,ProbData,Settle,Maturity)
```
```RPV01 =

1.1651

```

## Input Arguments

expand all

### ZeroData — Dates and zero ratesobject from IRDataCurve or vector of dates and zero rates

Dates and zero rates, specified by an M-by-2 vector of dates and zero rates or the object IRDataCurve for zero rates.

Data Types: struct | double

### ProbData — Dates and default probabilitiesvector of dates and default probabilities

Dates and default probabilities, specified by a P-by-2 array.

Data Types: double

### Settle — Settlement datestring or cell array of dates or numeric dates

Settlement date, specified by a serial date number or date string. This must be earlier than or equal to the dates in Maturity.

Data Types: char | cell | double

### Maturity — CDS maturity datestring or cell array of dates or numeric dates

CDS maturity date, specified by an N-by-1 vector of serial date numbers or date strings containing the maturity dates. The CDS premium payment dates occur at regular intervals, and the last payment occurs on these maturity dates.

Data Types: char | cell | double

### 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.

### 'Period' — Number of premium payments per year4 (default) | positive integer from the set [1,2,3,4,6,12] | vector of positive integers from the set [1,2,3,4,6,12]

Number of premium payments per year, specified by an N-by-1 vector. Values are 1, 2, 3, 4, 6, and 12.

Data Types: double

### 'StartDate' — Dates the CDS premium leg startsSettle date (default) | string | cell array

Dates when the CDS premium leg actually starts, specified by an N-by-1 vector of serial date numbers or date strings. Must be on or between the Settle and Maturity dates. For a forward-starting CDS, specify this date as a future date after Settle.

Data Types: double

### 'Basis' — Day-count basis of contract2 (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 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 (ISMA)

• 9 = actual/360 (ISMA)

• 10 = actual/365 (ISMA)

• 11 = 30/360E (ISMA)

• 12 = actual/365 (ISDA)

• 13 = BUS/252

Data Types: double

### 'BusDayConvention' — Business day conventionsactual (default) | string | cell array

Business day conventions, specified by a string or N-by-1 cell array of strings of business day conventions. Values are:

• actual

• follow

• modifiedfollow

• previous

• modifiedprevious

Data Types: char | cell

### 'CleanRPV01' — Flag for premium accrualtrue (default) | boolean flag with value true or false

Flag for premium accrual, specified as an N-by-1 vector of Boolean flags, which is true if the premium accrued at StartDate is excluded in the RPV01, and false otherwise.

Data Types: logical

### 'PayAccruedPremium' — Flag for accrued premium paymenttrue (default) | boolean flag with value true or false

Flag for accrued premium payment, specified as a N-by-1 vector of Boolean flags, true if accrued premiums are paid upon default, false otherwise.

Data Types: logical

### 'ZeroCompounding' — Compounding frequency of zero curve2 semiannual compounding (default) | integer with acceptable value [1,2,3,4,6,12, –1]

Compounding frequency of the zero curve, specified with integer 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

 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.

Data Types: double

### 'ZeroBasis' — Basis of zero curve0 (actual/actual) (default) | positive integers of the set [1...13] | vector of positive integers of the set [1...13]

Basis of the zero curve, specified as 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 (ISMA)

• 9 = actual/360 (ISMA)

• 10 = actual/365 (ISMA)

• 11 = 30/360E (ISMA)

• 12 = actual/365 (ISDA)

• 13 = BUS/252

Data Types: double

## Output Arguments

expand all

### RPV01 — RPV01 valuescalar | vector

RPV01 value, returned as an N-by-1 vector.

### PaymentDates — Payment datesscalar | vector

Payment dates, returned as an N-by-numCF matrix of dates.

### PaymentTimes — Payment timesscalar | vector

Payment times, returned as an N-by-numCF matrix of accrual fractions.

expand all

### RPV01

RPV01, associated with a CDS, is the value of a stream of 1-basis-point premiums according to the payment structure of the CDS contract, and taking into consideration the default probability over time.

## References

[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 8, 29–40.

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

[4] O'Kane, D., Modelling Single-name and Multi-name Credit Derivatives, Wiley Finance, 2008.