(*********************************************************************) (* APOh *) (* A Mathematica code for practical use of businessman to gain *) (* the optimal exercise boundary of American put option without *) (* dividends. *) (* *) (* APO-48-10.txt contains the HAM-based analytic approximations *) (* given by the Mathematica code APO, which give accurate results *) (* of optimal exercise boundary in a few seconds. *) (* *) (* This version is for Mathematica 8.0 *) (* *) (* Dr. Shijun Liao *) (* Shanghai Jiao Tong University *) (* China *) (* April 9th, 2012 *) (*********************************************************************) (* Using the new command of Mathematica 8.0. *) Pade := PadeApproximant; (* input dimensionless results given by means of the HAM *) < {0.8*Bp, X}, PlotStyle ->{RGBColor[1, 0, 0], RGBColor[0, 1, 0], RGBColor[0, 0,1]}]; Print[" Order of homotopy-approximation : ",n]; 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 "]; ]; ];