Documentation Center

  • Trial Software
  • Product Updates

trintreepath

Entries from node of recombining trinomial tree

Syntax

Values = trintreepath(TrinTree, BranchList)

Arguments

TrinTree

Recombining price or interest-rate trinomial tree.

BranchList

Number of paths (NUMPATHS) by path length (PATHLENGTH) matrix containing the sequence of branchings.

Description

Values = trintreepath(TrinTree, BranchList) extracts entries of a node of a recombining trinomial tree. The node path is described by the sequence of branchings taken, starting at the root. The top branch is number 1, the middle branch is 2, and the bottom branch is 3. Set the branch sequence to 0 to obtain the entries at the root node.

Values is a number of values (NUMVALS)-by-NUMPATHS matrix containing the retrieved entries of a recombining tree.

Examples

Create a Hull-White tree by loading the example file.

load deriv.mat; 

Then, for example

FwdRates = trintreepath(HWTree, [1 2 3]) 

returns the rates at the tree nodes located by starting at 0, taking the up branch at the first node, the middle branch at the second node, and finally the bottom branch at the third node.

FwdRates = 

    1.0279
    1.0528
    1.0652
    1.0591 

You can visualize this with the treeviewer function.

treeviewer(HWTree)

See Also

|

Was this topic helpful?