[SciPy-User] characteristic functions of probability distributions
nicky van foreest
vanforeest@gmail....
Mon Nov 2 14:51:06 CST 2009
Hi Josef,
2009/11/2 <josef.pktd@gmail.com>:
> The characteristic function is just the (continuous) fourier transform
> of the probability density function.
>
> I tried to use fft and ifft to convert between the characteristic
> function and the density function but I don't manage to get the units
> or discretization correctly. Does anyone have an example script for
> any distribution. Right now it's mostly a theoretical exercise, but
> there are some interesting applications in finance.
There is an inversion formula used to invert the characteristic
function to the distribution function (the density should follow
easily then), see e.g. Chung (or any other book on graduate
probability). I don't know about its numerical properties though. The
formula is used to prove the central limit theorem. I also recall that
Ward Whitt (see his homepage) used Fourier theory to invert Laplace
transforms. He was also concerned with numerical properties, so this
might be the best place to look for. He also uses the inversion
formula, and refers to Feller.
>
> Second related question, since I'm not good with complex numbers.
>
> scipy.integrate.quad of a complex function returns the absolute value.
> Is there a numerical integration function in scipy that returns the
> complex integral or do I have to integrate the real and imaginary
> parts separately?
You want to compute \int_w^z f(t) dt? When f is analytic (i.e.,
satisfies the Cauchy Riemann equations) this integral is path
independent. Otherwise the path from w to z is of importance. You
might like the book Visual Complex Analysis by Needham for intuition.
bye
Nicky
>
> Thanks,
>
> Josef
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
More information about the SciPy-User
mailing list