bktree

Construct Black-Karasinski interest-rate tree

Syntax

BKTree = bktree(VolSpec, RateSpec, TimeSpec)
BKTree = bktree(VolSpec, RateSpec, TimeSpec, Name,Value)

Description

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

BKTree = bktree(VolSpec, RateSpec, TimeSpec, Name,Value) creates a structure containing time and interest-rate information on a recombining tree with additional options specified by one or more Name,Value pair arguments.

Input 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.

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

'Method'

String specifying the Hull-White method upon which the tree-node connectivity algorithm is based. Possible values are HW1996 and HW2000.

    Note:   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.

Default: HW1996

Output Arguments

BKTree

Structure containing time and interest rate information of a trinomial 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)

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

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];

HWVolSpec = hwvolspec(ValuationDate, VolDates, VolCurve,...  
AlphaDates, AlphaCurve);

RateSpec = intenvset('Compounding', Compounding,...
					 'ValuationDate', ValuationDate,...
					 'StartDates', ValuationDate,...
					 'EndDates', VolDates,...
					 'Rates', Rates);
 
HWTimeSpec = hwtimespec(ValuationDate, VolDates, Compounding);
HWTree = hwtree(HWVolSpec, RateSpec, HWTimeSpec)
HWTree = 

      FinObj: 'HWFwdTree'
     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(HWTree)

References

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

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

Was this topic helpful?