Reply
Tue 27 Jul, 2004 06:42 am
Hi all,
I am trying to work out the value of S at different nodes in a binomial tree, using the following formula:
Table[S u^j d^(n - j) p^j q^(n - j), {j, 0, n}]
I would like to loop this in some way so that I don't have to assign new values to n all the time (S, d, p, q are given). I have tried For and Do, but when i print the result, Mathematica produces n lists that are equal to the final value of n, and not for n=0,1,..., n-1.
Anyone who could help me with this?
try doing it the old fasioined way... write your own program!