$$T=1, K=100, S_0=100, \sigma=0.05, r=0.15. $$

Define $\nu:=\frac{2r}{\sigma^2}-1$ and $$H(y,z)=\frac{z e^{\pi^2 /4y}}{\pi \sqrt{\pi y}}\int_0^{\infty} e^{-z \cosh(u) -u^2/(4y)} \sinh(u) \sin(\frac{\pi u}{2y})du$$ then next define $$ f(y,z)=\left( \frac{z}{S_0}\right)^{\nu/2}\frac{1}{4KT}\exp\left(-\frac{2(S0+z)}{KT\sigma^2}-\frac{\nu^2\sigma^2y}{8} \right) \times H(\frac{\sigma^2y}{8},\frac{4\sqrt{S_0 z}}{KT\sigma^2}) $$ and $$ g(y,z)=z\frac{e^{-ry}-e^{-rT}}{rT} $$ I would like to compute the following double integral $$ I=\int_0^{\infty}\left[\int_0^T g(y,z)f(y,z)dy\right]dz. $$

When I tried this with Maple, please see the picture below, enter image description here it ran out of memory.

I would like to ask whether there is a way to compute the above integral? What should I do to compute the integral?

  • $\begingroup$ I think the probable cause is the infinite oscillatory integral $H$, whose integrand decays exponentially with $z$, but $z$ starts at $0$, and so does $y$, making it decrease too slowly and oscillate too quickly for default schemes to converge quickly enough. Running out of memory is maybe not too relevant here, that's too implementation-specific. $\endgroup$
    – Kirill
    Aug 8 '15 at 23:06
  • $\begingroup$ The $e^{\pi^2/(4y)}$ term is not too helpful either near $y=0$, that is a very bad singularity. Is there some context to this? It doesn't look to me like the integral converges at $y=0$. Where does this integral come from, and what are you actually trying to compute? $\endgroup$
    – Kirill
    Aug 8 '15 at 23:17
  • $\begingroup$ Dear Kirill, I am trying to compute the value of an exotic option. I would like to ask : is there any way to remove the singularity at $y=0$ ? Thank you for your comments. $\endgroup$ Aug 9 '15 at 1:36
  • 1
    $\begingroup$ In this form it's difficult, I think it's better just to redo your calculations making sure not to introduce transformations that lead to ill-behaved terms like $e^{\pi^2/4y}\sin \frac{\pi u}{2y}$. At the very least you should prove that the integral converges at all before asking for its numerical value. But those are separate calculus questions, more suitable for math.SE. $\endgroup$
    – Kirill
    Aug 9 '15 at 2:00
  • $\begingroup$ Thanks Kirill, I have recalculated more than 10 times : (( and I believe this is what I got. It cannot be wrong. $\endgroup$ Aug 9 '15 at 2:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.