Serving the Quantitative Finance Community

 
User avatar
gozzi84
Topic Author
Posts: 0
Joined: April 26th, 2008, 8:24 am

G2++ numerical implementation

December 17th, 2008, 10:56 am

I have the two mean reverting SDEs in the G2++ model in the form:where both and We have also a 2X2 covarince matix obtained through Cholesky.In Matlab we have:R = mvnrnd(zeros(2,1),covariance,nstep)X=zeros(length(R(:,1)+1,1)Y=zeros(length(R(:,1)+1,1)for j=1:length(R(:,1)) X(j+1)=X(j)*exp(-a*dt)+R(j,1) Y(j+1)=Y(j)*exp(-b*dt)+R(j,2)endIs that correct? The incrments of the 2 correlated Brownian motions already include the sigma*dt term we usually use in simulating SDE through MC?Thank you for yoor help.Regards
 
User avatar
Church
Posts: 0
Joined: September 4th, 2007, 10:27 am

G2++ numerical implementation

December 19th, 2008, 5:27 am

It contains the sigma. Whether it contains the dt-term depends on how you determined the covariances in the covariance matrix.When you explicitly calculate the covariance over a time period dt, then it's in, otherwise it is not. So my guess is that it is not in in your case.