Tag Info

Hot answers tagged

3

The error is, you are not storing the random numbers for the same path at the end: xbefore = x + c*tau + sigma*sqrt(tau)*randn() A = muA + sigmaA*randn(); xafter = xbefore + A; But then at end you set a different path here by creating a new random number: xT = log(S0)+(c+muA*lambda)*T+sqrt((sigma^2+(muA^2+sigmaA^2)*lambda)*T)*randn(); randn() ...



Only top voted, non community-wiki answers of a minimum length are eligible