March 26th, 2004, 10:12 pm
the integration arrises from a complex fourier transform. its easier to find the option price by transforming everything into fourier space and then taking the inverse fourier transform, which is the integration you have.See chapter 2 of Alan Lewis's book which you can get off his website for a brief introduction.Actually the code isn't as bad as it seems as no matter which contour you take, the complex stuff will cancel out. try doing it in something like matlab first which has a function for the integration.