bktree - Construct Black-Karasinski interest-rate tree

Syntax

BKTree = bktree(VolSpec, RateSpec, TimeSpec)

Arguments

VolSpec

Volatility process specification. See bkvolspec for information on the volatility process.

RateSpec

Interest-rate specification for the initial rate curve. See intenvset for information on declaring an interest-rate variable.

TimeSpec

Tree time layout specification. Defines the observation dates of the BK tree and the Compounding rule for date to time mapping and price-yield formulas. See bktimespec for information on the tree structure.

Description

BKTree = bktree(VolSpec, RateSpec, TimeSpec) creates a structure containing time and interest-rate information on a recombining tree.

Examples

Using the data provided, create a BK volatility specification (VolSpec), rate specification (RateSpec), and tree time layout specification (TimeSpec). Then use these specifications to create a BK tree using bktree.

Compounding = -1;
ValuationDate = '01-01-2004';
StartDate = ValuationDate;
VolDates = ['12-31-2004'; '12-31-2005'; '12-31-2006'; 
'12-31-2007'];
VolCurve = 0.01;
AlphaDates = '01-01-2008';
AlphaCurve = 0.1;
Rates = [0.0275; 0.0312; 0.0363; 0.0415];

BKVolSpec = bkvolspec(ValuationDate, VolDates, VolCurve,...  
AlphaDates, AlphaCurve);

RateSpec = intenvset('Compounding', Compounding,...
					 'ValuationDate', ValuationDate,...
					 'StartDates', ValuationDate,...
					 'EndDates', VolDates,...
					 'Rates', Rates);
 
BKTimeSpec = bktimespec(ValuationDate, VolDates, Compounding);

BKTree = bktree(BKVolSpec, RateSpec, BKTimeSpec)

BKTree = 

      FinObj: 'BKFwdTree'
     VolSpec: [1x1 struct]
    TimeSpec: [1x1 struct]
    RateSpec: [1x1 struct]
        tObs: [0 0.9973 1.9973 2.9973]
        dObs: [731947 732312 732677 733042]
      CFlowT: {[4x1 double]  [3x1 double]  [2x1 double]  [3.9973]}
       Probs: {[3x1 double]  [3x3 double]  [3x5 double]}
     Connect: {[2]  [2 3 4]  [2 2 3 4 4]}
     FwdTree: {1x4 cell}

Use treeviewer to observe the tree you have created.

treeviewer(BKTree)

See Also

bkprice, bktimespec, bkvolspec, intenvset

  


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