 Finance - Maple Programming Help

Home : Support : Online Help : Mathematics : Finance : Lattice Methods : Finance/SetProbabilities

Finance

 SetProbabilities
 set transition probabilities of a tree node

 Calling Sequence SetProbabilities(T, i, j, p)

Parameters

 T - binomial or trinomial tree data structure i - positive integer; time step j - positive integer; node index p - list of probabilities

Description

 • The SetProbabilities command sets the transition probabilities for node j at level i of the tree T. The probabilities in p should correspond to the descendants of the node (i, j); see Finance[GetDescendants] and Finance[GetProbabilities] for more details.

Examples

 > with(Finance):
 > T := TrinomialTree(5, <1, 2, 3, 4, 5, 6, 7>);
 ${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)
 > GetProbabilities(T, 3, 3);
 $\left[{0.3333333333}{,}{0.3333333334}{,}{0.3333333333}\right]$ (2)
 > SetProbabilities(T, 3, 3, [.3, .5, .2]);
 > GetProbabilities(T, 3, 3);
 $\left[{0.3000000000}{,}{0.5000000000}{,}{0.2000000000}\right]$ (3)

Compatibility

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