This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Integrals


As nobody takes it ... just take the real part using GSL_REAL.

I guess phi is your integration variable and looking at your
adress/signature some thoughts: this is for option pricing by
applying Fourier inversion for characteristic functions f, no?

In this case the integration is over the whole positive reals
with oscillating integrand, may be non-constant periodics and
sometimes weird damping, the singularity in 0 is removable.
If you want to cover extreme sitautions as well you wish to
be very careful, even with adaptive schemes

If you not need extremly exact values you can use FFT (fast
Fourier transform) with interpolation on the grid. This has
the advantage that for (v,T fixed) you get all values for
your strike k within 1 FFT (but a notational orgy and worth
only for repeated use).

But that's just a thought ... and if i guessed wrong then
just take it as comment that you Q is somewhat vague.

Axel

Przemyslaw Sliwa wrote:
> 
> Thanks for this,
> 
> One additional question would be how to calculate the integral of a real part of a function:
> 
> exp(- 1 \phi \ln(k) f(x, v, T; \phi))
> ---------------------------------------------
>                  i\phi
> 
> I used the LaTeX notation. Can anyone help me with this?
> 
> Thanks
> 
> Przemyslaw
> 
> 
>                       Axel Hutt
>                       <Axel.Hutt@physik.hu        To:       Przemyslaw Sliwa/DMGCON/DMG UK/DeuBa@DMG UK
>                       -berlin.de>                 cc:       gsl-discuss@sources.redhat.com
>                                                   Subject:  Re: Integrals
>                       01/06/2005 05:37 PM
> 
> 
> 
> Przemyslaw Sliwa wrote:
> 
> >All,
> >                                                INF
> >                                                 /
> >I would like to know if it is possible to calculate the integral of type  I f(x)dx using gsl. If yes can someone explain me how it is done?
> >                                                /
> >                                                       -INF
> >
> >Thank you for help,
> >
> >Pshemek
> >
> >
> >
> you may take a look at
> 
> http://sources.redhat.com/gsl/ref/gsl-ref_16.html#SEC254
> 
> Hope that helps.
> 
> Axel
> 
> --
> 
> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]