I am investigating the effectiveness of Levy processes in finance, and am struggling with the CGMY model.
The characteristic function of a CGMY random variable looks as follows:
$$\phi_X(u; C,G,M,Y) = \exp\left(C \Gamma(-Y) \left[(M-iu)^Y - M^Y + (G+iu)^Y - G^Y\right] \right)$$
As far as I understand, to get the pdf (so that I can simulate data and use MLE for the parameters), I need to take the Inverse Fourier Transform of $\phi(u;C,G,M,Y)$ to get:
$$f_X(x;C,G,M,Y) = \frac{1}{2 \pi} \int_{\mathbb{R}}\exp \left(-iux + C \Gamma(-Y) \left[(M-iu)^Y - M^Y + (G+iu)^Y - G^Y\right] \right)du$$
I used numerical methods to evaluate the above integral (because my integration skills are lacking), but end up with $f_X(x)$ having a non-zero imaginary part. How do I deal with the imaginary part?