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,⁢t≥0,
where (Wt,⁢t≥0) is a standard Brownian motion, σ≥0 is the constant volatility, r≥0 is the constant risk-free rate and S0≥0 is the initial asset price.
Under these conditions, for any t≥0, the stock price St is given by the following formula:
St=S0e⁡r−σ22t+σWt
We consider a security with time to maturity T and the payoff function:
P⁢:=⁢S,⁢K⁢→⁢{1S⁢>⁢K0S⁢≤⁢K:
Payoff of the form P⁡S⁢=⁢{1S⁢>⁢K0S⁢≤⁢K 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 =
_EnvStatisticsRandomVariableName≔Φ:
U≔Statistics:-RandomVariableLogNormalr−σ22⋅T, σ⋅T:
ST can be represented in the form:
ST≔S0⋅U:
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:
ⅇ−r⁢T⁢𝔼(P(ST))
P_analytic≔PST , K
{1K<S0⁢Φ0S0⁢Φ≤K
V_analytic≔ⅇ−r⋅T⋅Statistics:-ExpectedValueP_analytic assuming r > 0, σ > 0, S0>0, K>0, T>0
ⅇ−r⁢T⁢−12⁢erf⁡14⁢2⁢σ2⁢T−2⁢r⁢T+2⁢ln⁡K−2⁢ln⁡S0σ⁢T+12
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.
Δ≔diffV_analytic, S0
12⁢ⅇ−r⁢T⁢ⅇ−18⁢σ2⁢T−2⁢r⁢T+2⁢ln⁡K−2⁢ln⁡S02σ2⁢T⁢2π⁢S0⁢σ⁢T
Here is a formula for the Gamma:
local Γ ≔ factordiffΔ, S0
−14⁢ⅇ−r⁢T⁢ⅇ−18⁢−σ2⁢T+2⁢r⁢T+2⁢ln⁡S0−2⁢ln⁡K2σ2⁢T⁢2⁢σ2⁢T+2⁢r⁢T+2⁢ln⁡S0−2⁢ln⁡Kπ⁢σ3⁢T3/2⁢S02
We can also use the symbolic formula to plot the option price as a function of the parameters.
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⁢=⁢St⋅Φ
where h=1N, and Φ is drawn from the lognormal distribution with parameters ⁡r−s22h 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.
Option Price
Standard Error
Finally, we can use the Black-Scholes differential equations to compute the option price.
DE≔diffVS,t,t+r⋅S⋅diffVS,t,S+12⋅σ2⋅S2⋅diffVS,t,S,S=r⋅VS,t
∂∂t⁢V⁡S,t+r⁢S⁢∂∂S⁢V⁡S,t+12⁢σ2⁢S2⁢∂2∂S2⁢V⁡S,t=r⁢V⁡S,t
The key boundary condition is:
BC1≔VS,T=PS,K
V⁡S,T={1K<S0S≤K
Another obvious condition:
BC2≔V0,t=0
V⁡0,t=0
Finally, if St≫K for some t<T, then it holds with a high probability that ST≫K. Our option will thus be exercised and produce cash flow P⁡(ST−K)≈P⁡ST
BC3≔V2⋅100,t=1
V⁡200,t=1
Numeric PDE Solver
Space Step
Time Step
Download Help Document