bktree

Build Black-Karasinski interest-rate tree

Description

example

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.

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]  [1x5 double]  [1x7 double]}

Use treeviewer to observe the tree you have created.

treeviewer(BKTree)

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 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 quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

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.

Introduced before R2006a