Main Content

bktree

Build Black-Karasinski interest-rate tree

Description

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

example

BKTree = bktree(___,Name,Value) adds additional name-value pair arguments.

example

Examples

collapse all

Using the data provided, create a BK volatility specification (using bkvolspec), rate specification (using intenvset), and tree time layout specification (using bktimespec). 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 = struct with fields:
      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 3 4 5 6]}
     FwdTree: {[1.0278]  [1.0361 1.0355 1.0349]  [1.0493 1.0484 1.0476 1.0467 1.0459]  [1.0620 1.0609 1.0598 1.0587 1.0577 1.0567 1.0557]}

Use treeviewer to observe the tree you have created.

treeviewer(BKTree)

Figure Tree Viewer contains 2 axes objects and other objects of type uicontrol. Axes object 1 contains 43 objects of type line. Axes object 2 is empty.

Input Arguments

collapse all

Volatility process specification, specified using the VolSpec output obtained from bdtvolspec.

Data Types: struct

Interest-rate specification for initial rate curve, specified by the RateSpec obtained from intenvset. For information on the interest-rate specification, see intenvset.

Data Types: struct

Time tree layout specification, specified using the TimeSpec output obtained from bdttimespec. The TimeSpec defines the observation dates of the BK tree and the Compounding rule for date to time mapping and price-yield formulas.

Data Types: struct

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: BKTree = bktree(BKVolSpec, RateSpec, BKTimeSpec,'Method','HW1996')

Hull-White method upon which the tree-node connectivity algorithm is based, specified as a character vector with a value of 'HW2000' or 'HW1996'.

bktree supports two tree-node connectivity algorithms. HW1996 is based on the original paper published in the Journal of Derivatives, and HW2000 is the general version of the algorithm, as specified in the paper published in August 2000.

Data Types: char

Output Arguments

collapse all

Time and interest-rate information of a recombining tree, returned as a structure.

References

[1] Hull, J., and A. White. "Using Hull-White Interest Rate Trees." Journal of Derivatives. 1996.

[2] Hull, J., and A. White. "The General Hull-White Model and Super Calibration." August 2000.

Version History

Introduced before R2006a