Sunday, August 23, 2015

monte carlo - How to simulate a jump-diffusion process?



I would like to price Asian and Digital options under Merton's jump-diffusion model. To that end, I will have to simulate from a jump diffusion process.


In general, the stock price process is given by S(t)=S(0)e(rqω)t+X(t),

where ω is the drift term that makes the discounted stock price process a martingale and where X(t)=σW(t)+N(t)i=1Yi is a jump-diffusion process. The process N(t) is a Poisson process with intensity λ and the jump sizes Yi are iid Normally distributed YiN(μ,δ2).


So, the issue here is the simulation of X(t). I would like to simulate X(t) as follows: first, I construct a grid [0,T] with grid step size Δt=1/252 (number of trading days in one year). I now want to compute X on this grid stepwise. Therefore: XnΔt=X(n1)Δt+σΔtϵn+pn,

where ϵn are standard normal random variables (easy to simulate in Matlab) and where pn are Compound Poisson random variables independent of ϵn. The question is, how to simulate from these pn?


I was thinking to write a compound Poisson generator myself:


function [p] = CPoissonGenerator(mu,delta,lambda,dt,rows,columns)
N = poissrnd((1/lambda)*dt,rows,columns);
Y = normrnd(mu,delta,1,N);
cP = cumsum([0,Y]);
p = cP(end);
end


However, I do not know how to generate a matrix of Poisson random variables without using a loop in the above code? This can be very time consuming. Furthermore, I'm not sure if the program is correct. Is there a better way to do this?




No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...