Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

treeshape

Shape of recombining binomial tree

Syntax

[NumLevels, NumPos, IsPriceTree] = treeshape(Tree)

Arguments

Tree

Recombining binomial tree.

Description

[NumLevels, NumPos, IsPriceTree] = treeshape(Tree) returns information on a recombining binomial tree's shape.

NumLevels is the number of time levels of the tree.

NumPos is a 1-by-NUMLEVELS vector containing the length of the state vectors in each level.

IsPriceTree is a Boolean determining if a final horizontal branch is present in the tree.

Examples

Create a BDT tree by loading the example file.

load deriv.mat; 

With treeviewer you can see the general shape of the BDT interest-rate tree.

treeviewer(BDTTree)

With this tree

[NumLevels, NumPos, IsPriceTree] = treeshape(BDTTree.FwdTree) 

returns

NumLevels  =   
     4

NumPos     =   
     1     1     1     1

IsPriceTree =
     0

Related Examples

See Also

|

Introduced before R2006a

Was this topic helpful?