I am pretty new to Mathematica. I have version 6 and wish to try a code listed in http://numericaltank.sjtu.edu.cn/2ndBook/APO/APO.txt about Homotopy Analysis Method for American Put Option. However, as I run the code, I have this note:
And I do not get the plot I should have. The only plot command in the code is
If[NumberQ[gamma] && NumberQ[sigma] && NumberQ[X],
Plot[{Bp,B[m1],Bpade[m1]},{t,0,1.25*T},
PlotRange -> {0.8*Bp,X}, PlotStyle ->
{RGBColor[1,0,0],RGBColor[0,1,0],RGBColor[0,0,1]}];
Print[" Order of homotopy-approximation : ",m1];
Print[" Green line : optimal exercise boundary B
in polynomial "];
Print[" Blue line : optimal exercise boundary B
by Pade method "];
Print[" Red line : perpetual optimal exercise price "];
];
Any idea what should I do to get the plot? Thanks!
Plot[...]
command in aPrint[...]
. community.wolfram.com/groups/-/m/t/430019?p_p_auth=C9N2m9PO $\endgroup$