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.

oasbybk

Syntax

``````[OAS,OAD,OAC] = oasbybk(BKTree,Price,CouponRate,Settle,Maturity,OptSpec,Strike,ExerciseDates)``````
``````[OAS,OAD,OAC] = oasbybk(___,Name,Value)``````

Description

example

``````[OAS,OAD,OAC] = oasbybk(BKTree,Price,CouponRate,Settle,Maturity,OptSpec,Strike,ExerciseDates)``` calculates option adjusted spread using a Black-Karasinski model.```

example

``````[OAS,OAD,OAC] = oasbybk(___,Name,Value)``` adds optional name-value pair arguments.```

Examples

collapse all

This example shows how to compute OAS and OAD using the Black-Karasinski (BK) model using the following data.

```ValuationDate = 'Aug-2-2010'; Rates = [0.0355; 0.0382; 0.0427; 0.0489]; StartDates = ValuationDate; EndDates = datemnth(ValuationDate, 12:12:48)'; Compounding = 1; % define RateSpec RateSpec = intenvset('ValuationDate', ValuationDate,... 'StartDates', StartDates,'EndDates', EndDates, ... 'Rates', Rates,'Compounding', Compounding); % specify VolSpec and TimeSpec Sigma = 0.10; Alpha = 0.01; VS = bkvolspec(ValuationDate, EndDates, Sigma*ones(size(EndDates)),... EndDates, Alpha*ones(size(EndDates))); TS = bktimespec(ValuationDate, EndDates, Compounding); % build the BK tree BKTree = bktree(VS, RateSpec, TS); % instrument information CouponRate = 0.045; Settle = ValuationDate; Maturity = '02-Aug-2014'; OptSpec = 'put'; Strike = 100; ExerciseDates ='02-Aug-2013'; Period = 1; AmericanOpt = 1; Price = 101; % compute OAS and OAD [OAS, OAD] = oasbybk(BKTree, Price, CouponRate, Settle, Maturity,... OptSpec, Strike, ExerciseDates, 'Period', Period, 'AmericanOpt', AmericanOpt)```
```OAS = 21.8655 ```
```OAD = 1.8654 ```

Input Arguments

collapse all

Interest-rate tree structure, specified by using `bktree`.

Data Types: `struct`

Market prices of bonds with embedded options, specified as an `NINST`-by-`1` vector.

Data Types: `double`

Bond coupon rate, specified as an `NINST`-by-`1` decimal annual rate.

Data Types: `double`

Settlement date for the bond option, specified as a `NINST`-by-`1` vector of serial date numbers or date character vectors.

Note

The `Settle` date for every bond with an embedded option is set to the `ValuationDate` of the BK tree. The bond argument `Settle` is ignored.

Data Types: `double` | `char`

Maturity date, specified as an `NINST`-by-`1` vector of serial date numbers or date character vectors.

Data Types: `double` | `char`

Definition of option, specified as a `NINST`-by-`1` cell array of character vectors.

Data Types: `char` | `cell`

Option strike price value, specified as a `NINST`-by-`1` or `NINST`-by-`NSTRIKES` depending on the type of option:

• European option — `NINST`-by-`1` vector of strike price values.

• Bermuda option — `NINST` by number of strikes (`NSTRIKES`) matrix of strike price values. Each row is the schedule for one option. If an option has fewer than `NSTRIKES` exercise opportunities, the end of the row is padded with `NaN`s.

• American option — `NINST`-by-`1` vector of strike price values for each option.

Data Types: `double`

Option exercise dates, specified as a `NINST`-by-`1`, `NINST`-by-`2`, or `NINST`-by-`NSTRIKES` using serial date numbers or date character vectors, depending on the type of option:

• For a European option, use a `NINST`-by-`1` vector of dates. For a European option, there is only one `ExerciseDates` on the option expiry date.

• For a Bermuda option, use a `NINST`-by-`NSTRIKES` vector of dates. Each row is the schedule for one option.

• For an American option, use a `NINST`-by-`2` vector of exercise date boundaries. The option can be exercised on any date between or including the pair of dates on that row. If only one non-`NaN` date is listed, or if `ExerciseDates` is a `NINST`-by-`1` vector, the option is exercised between the underlying bond `Settle` date and the single listed exercise date.

Data Types: `double` | `char`

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: `OAS = oasbybk(BDTTree,Price,CouponRate,Settle,Maturity,OptSpec,Strike,ExerciseDates,'Period',4)`

collapse all

Option type, specified as `NINST`-by-`1` positive integer flags with values:

• `0` — European/Bermuda

• `1` — American

Data Types: `double`

Coupons per year, specified as an `NINST`-by-`1` vector.

Data Types: `double`

Day-count basis, specified as a `NINST`-by-`1` vector of integers.

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

End-of-month rule flag is specified as a nonnegative integer using a `NINST`-by-`1` vector. This rule applies only when `Maturity` is an end-of-month date for a month having 30 or fewer days.

• `0` = Ignore rule, meaning that a bond coupon payment date is always the same numerical day of the month.

• `1` = Set rule on, meaning that a bond coupon payment date is always the last actual day of the month.

Data Types: `double`

Bond issue date, specified as an `NINST`-by-`1` vector using serial date numbers or date character vectors.

Data Types: `double` | `char`

Irregular first coupon date, specified as an `NINST`-by-`1` vector using serial date numbers date or date character vectors.

When `FirstCouponDate` and `LastCouponDate` are both specified, `FirstCouponDate` takes precedence in determining the coupon payment structure. If you do not specify a `FirstCouponDate`, the cash flow payment dates are determined from other inputs.

Data Types: `double` | `char`

Irregular last coupon date, specified as a `NINST`-by-`1` vector using serial date numbers or date character vectors.

In the absence of a specified `FirstCouponDate`, a specified `LastCouponDate` determines the coupon structure of the bond. The coupon structure of a bond is truncated at the `LastCouponDate`, regardless of where it falls, and is followed only by the bond's maturity cash flow date. If you do not specify a `LastCouponDate`, the cash flow payment dates are determined from other inputs.

Data Types: `char` | `double`

Forward starting date of payments (the date from which a bond cash flow is considered), specified as a `NINST`-by-`1` vector using serial date numbers or date character vectors.

If you do not specify `StartDate`, the effective start date is the `Settle` date.

Data Types: `char` | `double`

Face or par value, specified as an`NINST`-by-`1` vector.

Data Types: `double`

Derivatives pricing options, specified as structure that is created with `derivset`.

Data Types: `struct`

Output Arguments

collapse all

Option adjusted spread, returned as a `NINST`-by-`1` vector.

Option adjusted duration, returned as a `NINST`-by-`1` vector.

Option adjusted convexity, returned as a `NINST`-by-`1` vector.

collapse all

Bond with Embedded Options

A bond with embedded option allows the issuer to buy back (callable) or redeem (puttable) the bond at a predetermined price at specified future dates.

Financial Instruments Toolbox™ software supports American, European, and Bermuda callable and puttable bonds. The pricing for a bond with embedded options is as follows:

• Callable bond — The holder bought a bond and sold a call option to the issuer. For example, if interest rates go down by the time of the call date, the issuer is able to refinance its debt at a cheaper level and can call the bond. The price of a callable bond is:

`Price callable bond` = ```Price Option free bond````Price call option`

• Puttable bond — The holder bought a bond and a put option. For example, if interest rates rise, the future value of coupon payments becomes less valuable. Therefore, the investor can sell the bond back to the issuer and then lend proceeds elsewhere at a higher rate. The price of a puttable bond is:

`Price puttable bond` = ```Price Option free bond``` + `Price put option`

References

[1] Fabozzi, F. Handbook of Fixed Income Securities. 7th Edition. McGraw-Hill, , 2005.

[2] Windas, T. Introduction to Option-Adjusted Spread Analysis. 3rd Edition. Bloomberg Press, 2007.