Tag Info

New answers tagged

1

I removed the fd[i_, j_], and replaced it with a pure function Piecewise[{{Max[s[[#1]] - strike1, 0], #2 == ts + 1}}] & Table[fd[i, j], {i, 1, as + 2}, {j, 1, ts + 1}] is equivament to Array[fd[#1,#2] &, {as + 2, ts + 1}] recursive[as_, ts_, ds_, strike1_] := With[{s = Table[i ds, {i, 0, as + 1}]}, Array[ Piecewise[{{Max[s[[#1]] - strike1, ...



Top 50 recent answers are included