# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

# cdsrpv01

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

## Syntax

``RPV01 = cdsrpv01(ZeroData,ProbData,Settle,Maturity)``
``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)` adds optional name-value 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

collapse all

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; 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'; RPV01 = cdsrpv01(ZeroData,ProbData,Settle,Maturity)```
```RPV01 = 1.1651 ```

## Input Arguments

collapse all

Dates and zero rates, specified by an `M`-by-`2` vector of dates and zero rates or the object `IRDataCurve` for zero rates. For more information on an `IRDataCurve` object, see Creating an IRDataCurve Object (Financial Instruments Toolbox).

Data Types: `struct` | `double`

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

Data Types: `double`

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

Data Types: `char` | `cell` | `double`

CDS maturity date, specified by an `N`-by-`1` vector of serial date numbers or date character vectors 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`.

Example: ```RPV01 = cdsrpv01(ZeroData,ProbData,Settle,Maturity,'Period',1,'StartDate','20-Sep-2010','Basis',1, 'BusDayConvention',actual,'CleanRPV01',true,'PayAccruedPremium',true,'ZeroCompounding',1,'ZeroBasis',1)```

collapse all

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`

Dates when the CDS premium leg actually starts, specified by an `N`-by-`1` vector of serial date numbers or date character vectors. 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` | `char` | `cell`

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 (ICMA)

• 9 = actual/360 (ICMA)

• 10 = actual/365 (ICMA)

• 11 = 30/360E (ICMA)

• 12 = actual/365 (ISDA)

• 13 = BUS/252

Data Types: `double`

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.

Data Types: `char` | `cell`

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`

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`

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`

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 (ICMA)

• 9 = actual/360 (ICMA)

• 10 = actual/365 (ICMA)

• 11 = 30/360E (ICMA)

• 12 = actual/365 (ISDA)

• 13 = BUS/252

Data Types: `double`

## Output Arguments

collapse all

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

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

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

collapse 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 considering the default probability over time.

## References

[1] [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] [2] Hull, J., and A. White. “Valuing Credit Default Swaps I: No Counterparty Default Risk.” Journal of Derivatives. Vol. 8, pp. 29–40.

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

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