Main Content

bdttimespec

Specify time structure for Black-Derman-Toy interest-rate tree

Syntax

``TimeSpec = bdttimespec(ValuationDate,Maturity)``
``TimeSpec = bdttimespec(___,Compounding)``

Description

example

````TimeSpec = bdttimespec(ValuationDate,Maturity)` sets the number of levels and node times for a `bdttree` and determines the mapping between dates and time for rate quoting.```

example

````TimeSpec = bdttimespec(___,Compounding)` adds the optional argument `Compounding`.```

Examples

collapse all

This example shows how to specify a five-period tree with annual nodes and use annual compounding to report rates.

```Compounding = 1; ValuationDate = datetime(2000,1,1); Maturity = [datetime(2001,1,1) ; datetime(2002,1,1) ; datetime(2003,1,1) ; datetime(2004,1,1); datetime(2005,1,1)]; TimeSpec = bdttimespec(ValuationDate, Maturity, Compounding)```
```TimeSpec = struct with fields: FinObj: 'BDTTimeSpec' ValuationDate: 730486 Maturity: [5x1 double] Compounding: 1 Basis: 0 EndMonthRule: 1 ```

Input Arguments

collapse all

Pricing date and first observation in the tree, specified as a scalar datetime, string, or date character vector.

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

Dates marking the cash flow dates of the tree, specified as `NLEVELS`-by-`1` vector using a datetime array, string array, or date character vectors. Cash flows with these maturities fall on tree nodes. `Maturity` should be in increasing order.

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

(Optional) Rate at which the input zero rates were compounded when annualized, specified as a scalar integer value.

• If `Compounding` = `1`, `2`, `3`, `4`, `6`, `12`:

`Disc = (1 + Z/F)^(-T)`, where `F` is the compounding frequency, `Z` is the zero rate, and `T` is the time in periodic units; for example, ```T = F``` is one year.

• If `Compounding` = `365`:

`Disc = (1 + Z/F)^(-T)`, where `F` is the number of days in the basis year and `T` is a number of days elapsed computed by basis.

• If `Compounding` = `−1`:

`Disc = exp(-T*Z)`, where `T` is time in years.

Data Types: `double`

Output Arguments

collapse all

Specification for the time layout for `bdttree`, returned as a structure. The state observation dates are `[ValuationDate; Maturity(1:end-1)]`. Because a forward rate is stored at the last observation, the tree can value cash flows out to `Maturity`(`end`).

Version History

Introduced before R2006a

expand all