function y = vgcf(u, theta, nu, sigma, t, r) % Computes the characteristic function for the Variance Gamma model w = t*r + t/nu*log(1 - theta*nu - .5*nu*sigma^2) y0 = exp(i*w*u); y1 = (1 - i*theta*nu*u + .5*sigma^2*nu*(u.^2) ) .^ (-t/nu); y = y0 .* y1;