SetUnderlying - Maple Help

Finance

 SetUnderlying
 set the value of the underlying process at a node of a binomial/trinomial tree

 Calling Sequence SetUnderlying(T, i, j, v)

Parameters

 T - binomial or trinomial tree data structure i - positive integer; time step j - positive integer; node index v - real constant; new value of the underlying

Description

 • The SetUnderlying command sets the value of the underlying for node j at level i of the tree T. See Finance[GetDescendants] for more details about node indexing.

Examples

 > $\mathrm{with}\left(\mathrm{Finance}\right):$
 > $T≔\mathrm{TrinomialTree}\left(5,⟨1,2,3,4,5,6,7⟩\right)$
 ${T}{≔}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (1)
 > $\mathrm{TreePlot}\left(T,\mathrm{thickness}=3,\mathrm{gridlines}=\mathrm{true}\right)$
 > $\mathrm{GetUnderlying}\left(T,4,1\right)$
 ${1.}$ (2)
 > $\mathrm{SetUnderlying}\left(T,4,1,2\right)$
 > $\mathrm{GetUnderlying}\left(T,4,1\right)$
 ${2.}$ (3)
 > $\mathrm{SetUnderlying}\left(T,4,1,2\right)$
 > $\mathrm{SetUnderlying}\left(T,4,7,6\right)$
 > $\mathrm{TreePlot}\left(T,\mathrm{thickness}=3,\mathrm{gridlines}=\mathrm{true}\right)$

Compatibility

 • The Finance[SetUnderlying] command was introduced in Maple 15.