 Pricing European Options Using the Finance Package - Maple Programming Help

Home : Support : Online Help : Applications and Example Worksheets : Finance : Finance/Examples/EuropeanOptions

Pricing European Options Using the Finance Package

Simulation

 >

We will consider a stochastic variable, which follows the standard Brownian motion with drift 0.055 and diffusion 0.3.

 >
 ${Y}{:=}{\mathrm{_X}}$ (1.1)
 > Here ae sample paths for ${ⅇ}^{Y\left(t\right)}$.

 > $\mathrm{PathPlot}\left({ⅇ}^{Y\left(t\right)},t=0..2,\mathrm{timesteps}=50,\mathrm{replications}=10,\mathrm{thickness}=3,\mathrm{color}=\mathrm{red}..\mathrm{blue},\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}=\mathrm{true},\mathrm{tickmarks}=\left(\left[10,10\right]\right)\right)$ You can compute the expected value of any expression involving $Y$.

 > $\mathrm{ExpectedValue}\left(\mathrm{max}\left({ⅇ}^{Y\left(3\right)}-0.5,0\right),\mathrm{replications}={10}^{5}\right)$
 $\left[{\mathrm{value}}{=}{0.5000000000}{,}{\mathrm{standarderror}}{=}{0.}\right]$ (1.2)

Consider another stochastic process.

 > $Z:=\mathrm{GeometricBrownianMotion}\left(1,0.1,0.3\right)$
 ${Z}{:=}{\mathrm{_X3}}$ (1.3)
 > $\frac{\mathrm{Drift}\left(Z\left(t\right)\right)}{Z\left(t\right)}=\frac{\mathrm{Drift}\left({ⅇ}^{Y\left(t\right)}\right)}{{ⅇ}^{Y\left(t\right)}}$
 ${0.1}{=}{0.1000000000}$ (1.4)
 > $\frac{\mathrm{Diffusion}\left(Z\left(t\right)\right)}{Z\left(t\right)}=\frac{\mathrm{Diffusion}\left(\mathrm{exp}\left(Y\left(t\right)\right)\right)}{\mathrm{exp}\left(Y\left(t\right)\right)}$
 ${0.3}{=}{0.3}$ (1.5)

So $Z\left(t\right)$ define the same stochastic process.

 > $\mathrm{ExpectedValue}\left(\mathrm{max}\left(Z\left(3\right)-1,0\right),\mathrm{replications}={10}^{5}\right)$
 $\left[{\mathrm{value}}{=}{0.4506814169}{,}{\mathrm{standarderror}}{=}{0.002083752433}\right]$ (1.6)

Note that the previous value is the expected payoff of a European call option with strike price 1 maturing in 3 years. In order to compute the current option price you have to discount this expected value at the risk-free rate (which is the drift parameter of $Z\left(t\right)$).

 > $\mathrm{DiscountFactor}\left(3,0.1\right)\mathrm{ExpectedValue}\left(\mathrm{max}\left(Z\left(3\right)-1,0\right),\mathrm{replications}={10}^{5},\mathrm{output}=\mathrm{value}\right)$
 ${0.3354146746}$ (1.7)

Compare this with the analytic price obtained using the Black-Scholes formula.

 >
 ${0.3360448376}$ (1.8)

Try to compute some market sensitivities of the option price.

 > $W:=t→\frac{\mathrm{ln}\left(Z\left(t\right)\right)-0.055t}{0.3}$
 ${W}{:=}{t}{→}\frac{{\mathrm{ln}}{}\left({Z}{}\left({t}\right)\right){+}\left({-}{1}\right){\cdot }{0.055}{}{t}}{{0.3}}$ (1.9)
 > $\mathrm{Drift}\left(W\left(t\right)\right);$
 ${0.}$ (1.10)
 > $\mathrm{Diffusion}\left(W\left(t\right)\right);$
 ${0.9999999999}$ (1.11)

So is the standard Wiener process. Using tools from the Malliavin Calculus you can show that for any payoff function  $f\left(t\right)$

 > ${ⅇ}^{-0.1\cdot 3}\mathrm{ExpectedValue}\left(\frac{\mathrm{max}\left(Z\left(3\right)-1,0\right)W\left(3\right)}{0.3\cdot 3},\mathrm{replications}={10}^{6},\mathrm{output}=\mathrm{value}\right)$
 ${0.8034185612}$ (1.12)
 > $\mathrm{BlackScholesDelta}\left(1,1,3,0.3,0.1\right);$
 ${0.7987480882}$ (1.13)

Here are multiple stocks.

 > ${W}_{1}:=\mathrm{WienerProcess}\left(\right)$
 ${{W}}_{{1}}{:=}{\mathrm{_W}}$ (1.14)
 > ${S}_{1}:=t→100{ⅇ}^{0.055t+0.3{W}_{1}\left(t\right)}$
 ${{S}}_{{1}}{:=}{t}{→}{100}{}{{ⅇ}}^{{0.055}{}{t}{+}{0.3}{}{{W}}_{{1}}{}\left({t}\right)}$ (1.15)
 > ${W}_{2}:=\mathrm{WienerProcess}\left(\right)$
 ${{W}}_{{2}}{:=}{\mathrm{_W0}}$ (1.16)
 > ${S}_{2}:=t→100{ⅇ}^{0.055t+0.3{W}_{2}\left(t\right)}$
 ${{S}}_{{2}}{:=}{t}{→}{100}{}{{ⅇ}}^{{0.055}{}{t}{+}{0.3}{}{{W}}_{{2}}{}\left({t}\right)}$ (1.17)
 > ${ⅇ}^{-0.1\cdot 1}\mathrm{ExpectedValue}\left(\mathrm{max}\left({S}_{1}\left(1\right)-{S}_{2}\left(1\right),0\right),\mathrm{timesteps}=100,\mathrm{replications}={10}^{4},\mathrm{output}=\mathrm{value}\right)$
 ${16.87358420}$ (1.18)
 > ${ⅇ}^{-0.1\cdot 1}\mathrm{ExpectedValue}\left(\mathrm{max}\left({S}_{2}\left(1\right)-{S}_{1}\left(1\right),0\right),\mathrm{timesteps}=100,\mathrm{replications}={10}^{4},\mathrm{output}=\mathrm{value}\right)$
 ${16.94221984}$ (1.19)

This is the correlation structure.

 > ${W}_{3}:=\mathrm{WienerProcess}\left(\right)$
 ${{W}}_{{3}}{:=}{\mathrm{_W1}}$ (1.20)
 > ${S}_{1}:=t→100{ⅇ}^{0.055t+0.3\left(0.00001{W}_{1}\left(t\right)+{W}_{3}\left(t\right)\right)}$
 ${{S}}_{{1}}{:=}{t}{→}{100}{}{{ⅇ}}^{{0.055}{}{t}{+}{0.3}{}\left({0.00001}{}{{W}}_{{1}}{}\left({t}\right){+}{{W}}_{{3}}{}\left({t}\right)\right)}$ (1.21)
 > ${S}_{2}:=t→100{ⅇ}^{0.055t+0.3\left(0.000001{W}_{2}\left(t\right)+{W}_{3}\left(t\right)\right)}$
 ${{S}}_{{2}}{:=}{t}{→}{100}{}{{ⅇ}}^{{0.055}{}{t}{+}{0.3}{}\left({0.000001}{}{{W}}_{{2}}{}\left({t}\right){+}{{W}}_{{3}}{}\left({t}\right)\right)}$ (1.22)
 > ${ⅇ}^{-0.1\cdot 1}\mathrm{ExpectedValue}\left(\mathrm{max}\left({S}_{2}\left(1\right)-{S}_{1}\left(1\right),0\right),\mathrm{timesteps}=100,\mathrm{replications}={10}^{4},\mathrm{output}=\mathrm{value}\right)$
 ${0.0001198987355}$ (1.23)