Serving the Quantitative Finance Community

 
User avatar
wesnik
Topic Author
Posts: 0
Joined: March 14th, 2009, 3:54 pm

FFT gives negative call prices

March 14th, 2009, 5:16 pm

Hi,I am trying to use the FFT to calculate call prices in the Heston model according to Carr & Madan, but my code gives negative call prices for some strikes.I'm using the stable characteristic function suggested by e.g. Albrecher et al, but still get problems.However, it seems like the code works if I change the Simpson weighting to 1/3*(3 + ( -i )^j - delta) rather than the suggested 1/3*(3 + ( -1 )^j - delta).Would appreciate if anyone has any idea why this solves the problem or, maybe even better, why I get the problem in the first place.The code is provided below for reference.Thanks,Niklas function [c k] = HestonFFT(x,r)N = 4096; eta = 0.15; b = pi/eta;alpha = 0.75;u = (0:N-1) * eta;k = -b + (0:N-1) * 2*b/N;cf = HestonCF(alpha, u, x)% Simpson weightsS = 1/3 * (3 + (-1).^(1:N) - eye(1,N));f_FFT = exp(i*b*u) .* exp(-r*t) * cf .* S ./ (alpha^2 + alpha - u.^2 + i*(2*alpha+1)*u);FFT = fft(f_FFT);c = real(FFT .* exp(-alpha*k) / pi);end
 
User avatar
wesnik
Topic Author
Posts: 0
Joined: March 14th, 2009, 3:54 pm

FFT gives negative call prices

March 18th, 2009, 1:00 pm

Anyone...?
 
User avatar
miniwolfy
Posts: 2
Joined: August 30th, 2008, 10:31 am

FFT gives negative call prices

April 10th, 2010, 9:47 am

Indeed, even you use the unchanged weired Simpson's rule, you still get negative prices somewhere in the middle.
 
User avatar
Lapsilago
Posts: 5
Joined: October 15th, 2004, 7:36 am
Location: Germany

FFT gives negative call prices

April 10th, 2010, 4:09 pm

Try to use the logarithm of the characteristic function as much as you can and transform back at the end of your calculation.I have implemented the Carr Madan (first and refined) method. Indeed there are some traps (alpha - dampening, ...) but in principle it works.If you want to use a very stable method go for Fang/Osterlee Cosine method. That works fine and you can do Bermudans with that...Best, Lapsi
 
User avatar
sacevoy
Posts: 7
Joined: November 16th, 2006, 5:24 pm

FFT gives negative call prices

April 14th, 2010, 11:49 am

Code looks a little off to me.Similar but working code in python (using the lovely numpy/scipy libraries) - tested against some results by wim schoetens. have provided VG and BS characteristic functions but as it is modular and therefore is easy to add heston, heston with jumps etc.enjoy
Attachments
calib.zip
(1.64 KiB) Downloaded 105 times