as an exercise, I am trying to simulate the BS model via Monte Carlo Simulation in R to price a normal European-style call option. However, the code will give me results that are way higher than the BS results even in case of 100,000 simulations. Here is my Code:
nSim=1000
T=5
N=T*360
K=7589.42
r=0.0219
Y0=7846.33
dt=T/N
drift=0.0
sigma=0.197
a=1
b=1
callOptionPrice=simulateCall()
callOptionPrice
simulateCall=function(){
C<-vector(mode="double",nSim)
for(a in 1:nSim){
V=newPath()
C[a]=max(V[N]-K,0)
a=a+1
}
call=1/nSim*sum(C)*exp(-r*T)
return(call)
}
newPath=function() {
Y<-vector(mode="double", length=N)
i=0
t=1
Y[1]=Y0
for(i in 0:N){
dW=sqrt(dt)*rnorm(1)
Y[t+1] = Y[t] + r*Y[t]*dt + sigma*Y[t]*dW
t=t+1
}
return(Y)
}
Could anybody help me to find the mistake here? The actual result according to BS should be 1864.1388, however my code always returns numbers >2400.
Thank you in advance!