Skip to Main Content Skip to Search
Product Documentation

mktree - Create recombining binomial tree

Syntax

Tree = mktree(NumLevels, NumPos, NodeVal, IsPriceTree)

Arguments

NumLevels

Number of time levels of the tree.

NumPos

1-by-NUMLEVELS vector containing the length of the state vectors in each time level.

NodeVal

(Optional) Initial value at each node of the tree. Default = NaN.

IsPriceTree

(Optional) Boolean determining if a final horizontal branch is added to the tree. Default = 0.

Description

Tree = mktree(NumLevels, NumPos, NodeVal, IsPriceTree) creates a recombining tree Tree with initial values NodeVal at each node.

Examples

Create a recombining tree of four time levels with a vector of two elements in each node and each element initialized to NaN.

Tree = mktree(4, 2); 

See Also

treepath | treeshape

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS