Simulation of the Black-Scholes Model
The following script simulates some trajectory of the Black-Scholes model given by the asset price $$ S_{1t} = S_{10} \exp\left( \left( \mu - \frac{\sigma^2}{2} \right) t + \sigma B_t \right), \qquad t \ge 0, $$ and the riskless bond $$ S_{0t} = \exp( r t), \qquad t \ge 0, $$ see page 242.
The parameters \( \mu \) and \( \sigma \) chosen for the simulation mimic real stock returns. Brownian motion is simulated by discretely sampling a partial sum process with \( n = 1000 \).
# the following function simulates a trajectory of Brownian motion at time instants tt
simbb = function( n, tt ) {
e = rnorm( n, 0, 1 )
x = c(0,cumsum( e )) / sqrt(n)
y = x[ 1+floor( n * tt ) ]
return( list( x = x, y = y ) )
}
# use arithmetic mean of daily returns of 0.0005146021
# use standard deviation of daily returns of 0.01322909
# assuming 250 business days, the corresponding volatility parameter
# is given by 0.01322909 / sqrt(delta) with delta = 1/250.
delta = 1/250
sigma = 0.01322909 / sqrt(delta)
mu = 0.0005146021
r = 0.05
tt = seq( 0, 1, len=1000 )
bb = simbb( 500, tt )$y
s1 = 100*exp( (mu - sigma^2/2)* tt + sigma * bb )
s0 = 100*exp( r*tt )
# add three trajectories of the stock
s2 = 100*exp( (mu - sigma^2/2)* tt + sigma * simbb(500,tt)$y )
s3 = 100*exp( (mu - sigma^2/2)* tt + sigma * simbb(500,tt)$y )
s4 = 100*exp( (mu - sigma^2/2)* tt + sigma * simbb(500,tt)$y )
plot( s1, type="l", ylim = c(60,160), xlab = "Time", ylab="" )
lines( s0 )
lines( s2 )
lines( s3 )