Accelerating the pace of engineering and science

# cdsoptprice

Price payer and receiver credit default swap options

## Syntax

[Payer, Receiver] = cdsoptprice(ZeroData, ProbData, Settle,
[Payer, Receiver] = cdsoptprice(ZeroData, ProbData, Settle,
Name,Value)

## Description

[Payer, Receiver] = cdsoptprice(ZeroData, ProbData, Settle,
computes the price of payer and receiver credit default swap options.

[Payer, Receiver] = cdsoptprice(ZeroData, ProbData, Settle,
Name,Value)
computes the price of payer and receiver credit default swap options 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 an IRDataCurve object of zero rates.
 ProbData P-by-2 array of dates and default probabilities. Settle Settlement date is a serial date number or date string. Settle must be earlier than the maturity date. OptionMaturity N-by-1 vector of serial date numbers or date strings containing the option maturity dates. CDSMaturity N-by-1 vector of serial date numbers or date strings containing the CDS maturity dates. Strike N-by-1 vector of option strikes expressed in basis points. SpreadVol N-by-1 vector of annualized credit spread volatilities expressed as a positive decimal number.

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

N-by-1 vector of adjusted forward spreads (in basis points) to be used when pricing CDS index options.

'Basis'

N-by-1 vector of contract day-count basis:

• 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

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

'Knockout'

N-by-1 vector of Boolean flags. If the credit default swaptions is a knockout, the flag is True, otherwise it is False.

Default: False

N-by-1 vector of Boolean flags. If accrued premiums are paid upon default, the flag is True, otherwise it is False.

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

'RecoveryRate'

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

Default: 0.4

'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

 Payer N-by-1 vector of prices for payer swap options in Basis points. Receiver N-by-1 vector of prices for receiver swap options in Basis points.

## Examples

expand all

### Obtain Payer and Receiver Values for a Credit Default Swap Option

Use cdsoptprice to generate Payer and Receiver values for a credit default swap option.

```Settle = datenum('12-Jun-2012');
OptionMaturity = datenum('20-Sep-2012');
CDSMaturity = datenum('20-Sep-2017');
OptionStrike = 200;

Zero_Time = [.5 1 2 3 4 5]';
Zero_Rate = [.5 .75 1.5 1.7 1.9 2.2]'/100;
ZeroData = [Zero_Dates Zero_Rate];

Market_Time = [1 2 3 5 7 10]';
Market_Rate = [100 120 145 220 245 270]';
MarketData = [Market_Dates Market_Rate];

ProbData = cdsbootstrap(ZeroData, MarketData, Settle);

```
```Payer =

223.5780

22.7460

```

expand all

### Credit Default Swap Option

A credit default swap (CDS) option, or credit default swaption, is a contract that provides the option holder with the right, but not the obligation, to enter into a credit default swap in the future. CDS options can either be payer swaptions or receiver swaptions. In a payer swaption, the option holder has the right to enter into a CDS in which they are paying premiums and in a receiver swaptions, the option holder is receiving premiums.

### Algorithms

The payer and receiver credit default swap options are computed using the Black's model as described in O'Kane [1]:

${V}_{Pay\left(Knockout\right)}=RPV01\left(t,{t}_{E},T\right)\left(F\Phi \left({d}_{1}\right)-K\Phi \left({d}_{2}\right)\right)$

${V}_{Rec\left(Knockout\right)}=RPV01\left(t,{t}_{E},T\right)\left(K\Phi \left(-{d}_{2}\right)-F\Phi \left(-{d}_{1}\right)\right)$

${d}_{1}=\frac{\mathrm{ln}\left(\frac{F}{K}\right)+\frac{1}{2}{\sigma }^{2}\left({t}_{E}-t\right)}{\sigma \sqrt{{t}_{E}-t}}$

${d}_{2}={d}_{1}-\sigma \sqrt{{t}_{E}-t}$

${V}_{Pay\left(Non-Knockout\right)}={V}_{Pay\left(Knockout\right)}+FEP$

${V}_{Pay\left(Non-Knockout\right)}={V}_{Rec\left(Knockout\right)}$

where

RPV01 is the risky present value of a basis point (see cdsrpv01).

Φ is the normal cumulative distribution function.

t is the valuation date.

tE is the option expiry date.

T is the CDS maturity date.

F is the forward spread (from option expiry to CDS maturity).