Hypermodels In Mathematical Finance: Modelling Via Infinitesimal Analysis

We give here examples of implementing some computations and formulas mentioned in this book. Although this is done in the language of MATHEMATICA, obviously it can be done in other similar computer algebra systems such as MAPLE, MATLAB, REDUCE, etc.
The codes in this Appendix are meant to be of practical use and they can be easily modified to suit other modelling methods. Note that, as numerical errors can be accumulated in any computer algebra systems, slight numerical discrepancy is expected and one should explore also various number of iteration steps.
In A.1, we include codes for the classical Black-Scholes formula and the explicit formula for the down-and-out European barrier call option.
In A.2, we implement the CRR matrix from 5.2 to price European call option, European put, American put, down-and-out European barrier call, up-and-out European barrier call, European double barrier call option and the digital option. Examples are shown and compared with those results from explicit calculations in A.1.
In A.3, we show how some of the computations done in this book can be carried out easily using MATHEMATICA. This is important in both efficiency and exploring new ideas.
We assume throughout that the version of MATHEMATICA is 4.0 or above.
For additional use of MATHEMATICA in mathematical finance, we refer the readers to [Shaw, 1998] as well as the website for this book.
We are going to...