Black-Scholes Model - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Black-Scholes Model

In this application, we compute the option price using three different methods. The first method is to derive the analytical solution to the option price based on the classical Black-Scholes model. Next, we compute the option price through Monte Carlo simulation based on the Black-Scholes model for stock price estimation.  Finally, we use the Black-Scholes differential equation model to estimate the option price.

Model Overview

Analytic Solution

Monte Carlo Simulation

Differential Equations

Overview of the Model

We consider the classical Black-Scholes model with single risky asset that follows a geometric Brownian motion:

 

dSt=rStdt+σStdWt,t0,

 

where (Wt,t0) is a standard Brownian motion, σ0 is the constant volatility, r0 is the constant risk-free rate and S00 is the initial asset price.

 

Under these conditions, for any t0, the stock price St is given by the following formula:

 

St=S0erσ22t+σWt

We consider a security with time to maturity T and the payoff function:

P:=S,K{1S>K0SK:

 

Payoff of the form PS={1S>K0SK corresponds to a digital call options with strike price, K.

We will consider several methods for computing the price of this security.

Parameters

r   =  

σ  =  

S0 =  

T  =  

K  =  

Analytic Solution

_EnvStatisticsRandomVariableNameΦ:

UStatistics:-RandomVariableLogNormalrσ22T, σT:

ST can be represented in the form:

STS0U:

where Φ is a lognormal random variable with parameters Trσ22 and σT.

 

The price of this option can be computed as the discounted expected payoff of the option:

 

ⅇrT𝔼(P(ST))

 

P_analyticPST , K

&lcub;1K<S0&Phi;0S0&Phi;K

(1)

V_analytic&ExponentialE;rTStatistics:-ExpectedValueP_analytic assuming r &gt; 0&comma; &sigma; &gt; 0&comma; S0&gt;0&comma; K&gt;0&comma; T&gt;0

&ExponentialE;rT12erf142&sigma;2T2rT&plus;2lnK2lnS0&sigma;T&plus;12

(2)

Analytic Price

 

We can use the analytic result to study the various market sensitivities. For example, we can symbolically compute the delta of our option.

&Delta;diffV_analytic&comma; S0

12&ExponentialE;rT&ExponentialE;18&sigma;2T2rT&plus;2lnK2lnS02&sigma;2T2&pi;S0&sigma;T

(3)

Here is a formula for the Gamma:

local Γ  factordiffΔ&comma; S0

14&ExponentialE;rT&ExponentialE;18&sigma;2T&plus;2rT&plus;2lnS02lnK2&sigma;2T2&sigma;2T&plus;2rT&plus;2lnS02lnK&pi;&sigma;3T3&sol;2S02

(4)

We can also use the symbolic formula to plot the option price as a function of the parameters.

Monte Carlo Simulation

Alternatively, we can estimate the expectation using Monte Carlo simulation to compute the option price.

 

The discrete-time version of the model is:

 

St+h&equals;St&Phi;

where h&equals;1N, and &Phi; is drawn from the lognormal distribution with parameters rs22h and σh.

 

We can use this expression to generate a sample path for the price of our risky asset.

 

Simulating Stock Prices

*please be patient, it may take a few seconds to generate a sample

Number of Replications

Number of Updates

 

 

 

Note: We know the distribution of the final stock price. To compute the option price, we need only to simulate the final stock price, and not the whole stock path.

 

We can verify the above analytic result using Monte Carlo simulation.

 

Monte Carlo Simulation

Number of Replications

Option Price

Standard Error

 

Differential Equations

Finally, we can use the Black-Scholes differential equations to compute the option price.

 

DEdiffVS&comma;t&comma;t&plus;rSdiffVS&comma;t&comma;S&plus;12&sigma;2S2diffVS&comma;t&comma;S&comma;S&equals;rVS&comma;t

tVS&comma;t&plus;rSSVS&comma;t&plus;12&sigma;2S22S2VS&comma;t&equals;rVS&comma;t

(5)

The key boundary condition is:

 

BC1VS&comma;T&equals;PS&comma;K

VS&comma;T&equals;&lcub;1K<S0SK

(6)

Another obvious condition:

 

BC2V0&comma;t&equals;0

V0&comma;t&equals;0

(7)

Finally, if StK for some t<T, then it holds with a high probability that STK. Our option will thus be exercised and produce cash flow P&lpar;STK&rpar;&approx;PST

BC3V2100&comma;t&equals;1

V200&comma;t&equals;1

(8)

Numeric PDE Solver

Space Step

Time Step

Option Price