Pricing European Options Using the Finance Package
Simulation
restart; withFinance:
We will consider a stochastic variable, which follows the standard Brownian motion with drift 0.055 and diffusion 0.3.
Y:=BrownianMotion⁡0, 0.055,0.3
Y:=_X
PathPlotYt,t=0..2,timesteps=50,replications=10, thickness =3, color = red..blue, axes = BOXED, gridlines = true, tickmarks = 10, 10
Here ae sample paths for ⅇY⁡t.
PathPlot⁡ⅇY⁡t,t=0..2,timesteps=50,replications=10,thickness=3,color=red..blue,axes=BOXED,gridlines=true,tickmarks=10,10
You can compute the expected value of any expression involving Y.
ExpectedValuemax⁡ⅇY⁡3−0.5,0,replications=105
value=0.5000000000,standarderror=0.
Consider another stochastic process.
Z:=GeometricBrownianMotion⁡1,0.1,0.3
Z:=_X3
Drift⁡Z⁡tZ⁡t=Drift⁡ⅇY⁡tⅇY⁡t
0.1=0.1000000000
DiffusionZtZt=DiffusionexpYtexpYt
0.3=0.3
So eYt and Zt define the same stochastic process.
ExpectedValuemaxZ⁡3−1,0,replications=105
value=0.4506814169,standarderror=0.002083752433
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 Zt).
DiscountFactor⁡3,0.1⁢ExpectedValue⁡max⁡Z⁡3−1,0,replications=105,output=value
0.3354146746
Compare this with the analytic price obtained using the Black-Scholes formula.
BlackScholesPrice1,1,3,0.3, 0.1
0.3360448376
Try to compute some market sensitivities of the option price.
W:=t→ln⁡Z⁡t−0.055⁢t0.3
W:=t→ln⁡Z⁡t+−1⋅0.055⁢t0.3
Drift⁡W⁡t;
0.
Diffusion⁡W⁡t;
0.9999999999
So Wt is the standard Wiener process. Using tools from the Malliavin Calculus you can show that for any payoff function ft
Δ = ∂∂ S0 Ee−r⋅T⋅fST=e−r⋅T⋅EfST⋅WTS0⋅σ⋅T
ⅇ−0.1⋅3⁢ExpectedValue⁡max⁡Z⁡3−1,0⁢W⁡30.3⋅3,replications=106,output=value
0.8034185612
BlackScholesDelta1,1,3,0.3,0.1;
0.7987480882
Here are multiple stocks.
W1:=WienerProcess⁡
W1:=_W
S1:=t→100⁢ⅇ0.055⁢t+0.3⁢W1⁡t
W2:=WienerProcess⁡
W2:=_W0
S2:=t→100⁢ⅇ0.055⁢t+0.3⁢W2⁡t
ⅇ−0.1⋅1⁢ExpectedValue⁡max⁡S1⁡1−S2⁡1,0,timesteps=100,replications=104,output=value
16.87358420
ⅇ−0.1⋅1⁢ExpectedValue⁡max⁡S2⁡1−S1⁡1,0,timesteps=100,replications=104,output=value
16.94221984
This is the correlation structure.
W3:=WienerProcess⁡
W3:=_W1
S1:=t→100⁢ⅇ0.055⁢t+0.3⁢0.00001⁢W1⁡t+W3⁡t
S2:=t→100⁢ⅇ0.055⁢t+0.3⁢0.000001⁢W2⁡t+W3⁡t
0.0001198987355
Download Help Document