* Integrals
@ 2005-01-06 17:35 Przemyslaw Sliwa
2005-01-06 17:49 ` Integrals Axel Hutt
2005-01-06 17:52 ` Integrals Jerome BENOIT
0 siblings, 2 replies; 10+ messages in thread
From: Przemyslaw Sliwa @ 2005-01-06 17:35 UTC (permalink / raw)
To: gsl-discuss
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
--
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Integrals
2005-01-06 17:35 Integrals Przemyslaw Sliwa
@ 2005-01-06 17:49 ` Axel Hutt
2005-01-06 17:52 ` Integrals Jerome BENOIT
1 sibling, 0 replies; 10+ messages in thread
From: Axel Hutt @ 2005-01-06 17:49 UTC (permalink / raw)
To: Przemyslaw Sliwa; +Cc: gsl-discuss
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Integrals
2005-01-06 17:35 Integrals Przemyslaw Sliwa
2005-01-06 17:49 ` Integrals Axel Hutt
@ 2005-01-06 17:52 ` Jerome BENOIT
1 sibling, 0 replies; 10+ messages in thread
From: Jerome BENOIT @ 2005-01-06 17:52 UTC (permalink / raw)
Cc: gsl-discuss
Hello,
in this case, the general idea is to split your domain in three parts:
SUM(-infinity,+infinity)=SUM(-infinity,a)+SUM(a,b)+SUM(b,+infinity),
with -infinity < a < b < +infinity .
Then, by figuring out an appropriate changement of variable,
you may be able to reduce your three integrals into three finite integrals
to which you can easily apply the function exposed in the Chapter "Numerical Integration".
hth,
Jerome
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
>
>
> --
>
> 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.
>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Integrals
2005-01-07 18:00 Integrals Przemyslaw Sliwa
2005-01-09 14:47 ` Integrals Axel Vogt
2005-01-10 10:00 ` Integrals Axel Hutt
@ 2005-01-10 19:02 ` Brian Gough
2 siblings, 0 replies; 10+ messages in thread
From: Brian Gough @ 2005-01-10 19:02 UTC (permalink / raw)
To: gsl-discuss
Przemyslaw Sliwa writes:
> One additional question would be how to calculate the integral of a real part of a function:
Just a reminder for the new year,
This list isn't the right place to ask "homework" questions which
don't have any connection to GSL.
Thanks
--
Brian Gough
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Integrals
[not found] <OFA3B681E9.F1B060D2-ON80256F82.00655D62-00256F82.00656B63@db.com>
@ 2005-01-10 10:00 ` Axel Hutt
0 siblings, 0 replies; 10+ messages in thread
From: Axel Hutt @ 2005-01-10 10:00 UTC (permalink / raw)
To: Przemyslaw Sliwa; +Cc: gsl-discuss
Przemyslaw Sliwa wrote:
>Can you tell me how you got this?
>
>I have not worked with complex valued functions. Thanks
>
>Przemyslaw
>
>
>
oh, maybe I was wrong, since I have interpreted the 1 as an i. If the
exponent is real, means
\phi, k and f are real functions, then the expression is purely
imaginary and the real part is zero.
Maybe you pass some more information about these functions.
Axel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Integrals
2005-01-07 18:00 Integrals Przemyslaw Sliwa
2005-01-09 14:47 ` Integrals Axel Vogt
@ 2005-01-10 10:00 ` Axel Hutt
2005-01-10 19:02 ` Integrals Brian Gough
2 siblings, 0 replies; 10+ messages in thread
From: Axel Hutt @ 2005-01-10 10:00 UTC (permalink / raw)
To: Przemyslaw Sliwa; +Cc: gsl-discuss
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?
>
>
well, the real part would be
-sin(\phi \ln(k) f(x))/\phi
and this might be solvable by the mentioned function. Did you try it
with *gsl_integration_qagi ?
*Axel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Integrals
2005-01-07 18:00 Integrals Przemyslaw Sliwa
@ 2005-01-09 14:47 ` Axel Vogt
2005-01-10 10:00 ` Integrals Axel Hutt
2005-01-10 19:02 ` Integrals Brian Gough
2 siblings, 0 replies; 10+ messages in thread
From: Axel Vogt @ 2005-01-09 14:47 UTC (permalink / raw)
To: Przemyslaw Sliwa; +Cc: gsl-discuss
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Integrals
@ 2005-01-07 18:00 Przemyslaw Sliwa
2005-01-09 14:47 ` Integrals Axel Vogt
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Przemyslaw Sliwa @ 2005-01-07 18:00 UTC (permalink / raw)
To: Axel Hutt <Axel.Hutt; +Cc: gsl-discuss
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Integrals
2005-01-06 17:37 Integrals Przemyslaw Sliwa
@ 2005-01-06 17:49 ` Stewart V. Wright
0 siblings, 0 replies; 10+ messages in thread
From: Stewart V. Wright @ 2005-01-06 17:49 UTC (permalink / raw)
To: gsl-discuss
G'day Przemyslaw,
* Przemyslaw Sliwa <przemyslaw.sliwa@db.com> [050106 11:37]:
> Sorry,
>
> I see that it has been formatted a bit different than expected. I mean the integral from -INF to INF over f(x)dx.
>
RTFM [1]. Look for "Numerical Integration". Read a bit further.
Find the section "QAGI adaptive integration on infinite intervals".
Does this help?
Cheers,
S.
[1] http://www.gnu.org/software/gsl/manual/gsl-ref_16.html#SEC248
^ permalink raw reply [flat|nested] 10+ messages in thread
* Integrals
@ 2005-01-06 17:37 Przemyslaw Sliwa
2005-01-06 17:49 ` Integrals Stewart V. Wright
0 siblings, 1 reply; 10+ messages in thread
From: Przemyslaw Sliwa @ 2005-01-06 17:37 UTC (permalink / raw)
To: gsl-discuss
Sorry,
I see that it has been formatted a bit different than expected. I mean the integral from -INF to INF over f(x)dx.
Thanks
--------------------------------------------------
Deutsche Bank AG
Risk Controlling
Credit Risk Engineering & Implementation
/ Daily Credit Risk
Tel.: (+44 20) 754 59676 London
Fax: (+44 20) 754 71060 London
----------------------------------------------------
--
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-01-10 19:02 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-06 17:35 Integrals Przemyslaw Sliwa
2005-01-06 17:49 ` Integrals Axel Hutt
2005-01-06 17:52 ` Integrals Jerome BENOIT
2005-01-06 17:37 Integrals Przemyslaw Sliwa
2005-01-06 17:49 ` Integrals Stewart V. Wright
2005-01-07 18:00 Integrals Przemyslaw Sliwa
2005-01-09 14:47 ` Integrals Axel Vogt
2005-01-10 10:00 ` Integrals Axel Hutt
2005-01-10 19:02 ` Integrals Brian Gough
[not found] <OFA3B681E9.F1B060D2-ON80256F82.00655D62-00256F82.00656B63@db.com>
2005-01-10 10:00 ` Integrals Axel Hutt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).