Skip to Main Content Skip to Search
Product Documentation

bktimespec - Specify time structure for Black-Karasinski tree

Syntax

TimeSpec = bktimespec(ValuationDate, Maturity, Compounding)

Arguments

ValuationDate

Scalar date marking the pricing date and first observation in the tree. Specify as a serial date number or date string.

Maturity

Number of levels (depth) of the tree. A number of levels (NLEVELS)-by-1 vector of dates marking the cash flow dates of the tree. Cash flows with these maturities fall on tree nodes. Maturity should be in increasing order.

Compounding

(Optional) Scalar value representing the rate at which the input zero rates were compounded when annualized. Default = -1 (continuous compounding). This argument determines the formula for the discount factors:

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 1 year.

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.

Compounding = -1

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

Description

TimeSpec = bktimespec(ValuationDate, Maturity, Compounding) sets the number of levels and node times for an BK tree and determines the mapping between dates and time for rate quoting.

TimeSpec is a structure specifying the time layout for bktree. The state observation dates are [Settle; Maturity(1:end-1)]. Because a forward rate is stored at the last observation, the tree can value cash flows out to Maturity.

Examples

Specify a four-period tree with annual nodes. Use annual compounding to report rates.

ValuationDate = 'Jan-1-2004';
Maturity = ['12-31-2004'; '12-31-2005'; '12-31-2006'; 
'12-31-2007'];
Compounding = 1;
TimeSpec = bktimespec(ValuationDate, Maturity, Compounding)

TimeSpec = 

           FinObj: 'BKTimeSpec'
    ValuationDate: 731947
         Maturity: [4x1 double]
      Compounding: 1
            Basis: 0
     EndMonthRule: 1

See Also

bktree | bkvolspec | hwtree

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS