Serving the Quantitative Finance Community

 
User avatar
babyboy
Topic Author
Posts: 1
Joined: March 6th, 2004, 12:58 pm

Integration in Heston

March 26th, 2004, 8:02 pm

Hi,i'm trying to implie Heston model on VBA, but i have a problem: in fact Numerical integration of the real valued is not trivial.If someone know how i could do on VBA, it would be very nice.thanks
 
User avatar
asd
Posts: 17
Joined: August 15th, 2002, 9:50 pm

Integration in Heston

March 26th, 2004, 8:17 pm

I remember, Avt et al had excellent code posted in software forum to do Heston in VBA. Try search on "Free code for Heston"Hope it helps
 
User avatar
babyboy
Topic Author
Posts: 1
Joined: March 6th, 2004, 12:58 pm

Integration in Heston

March 26th, 2004, 9:35 pm

thanks a lot asd ; but i've read them and i don't understand what they 've done.So if someone can explain me how to resolve the integration ; thanks
 
User avatar
monkeyA
Posts: 9
Joined: December 4th, 2002, 10:25 am

Integration in Heston

March 26th, 2004, 10:12 pm

the integration arrises from a complex fourier transform. its easier to find the option price by transforming everything into fourier space and then taking the inverse fourier transform, which is the integration you have.See chapter 2 of Alan Lewis's book which you can get off his website for a brief introduction.Actually the code isn't as bad as it seems as no matter which contour you take, the complex stuff will cancel out. try doing it in something like matlab first which has a function for the integration.
 
User avatar
madmax
Posts: 0
Joined: October 31st, 2003, 9:56 am

Integration in Heston

March 26th, 2004, 11:52 pm

you can also have a look at Ales cerny's (Imperial College) book.Here is a paper by him fast fourier transform
 
User avatar
babyboy
Topic Author
Posts: 1
Joined: March 6th, 2004, 12:58 pm

Integration in Heston

March 26th, 2004, 11:55 pm

great thanks!but i've just founf a VBA code; and i ve tried to implie but there is a problem. So if someone understand where is the problem; thanks a lot
 
User avatar
monkeyA
Posts: 9
Joined: December 4th, 2002, 10:25 am

Integration in Heston

March 27th, 2004, 10:32 am

nope can't open a .zip.rar.sit file!
 
User avatar
dS
Posts: 2
Joined: June 10th, 2003, 11:23 am

Integration in Heston

March 30th, 2004, 6:35 am

If you can read C code, "Numerical Recipes in C" (www.nr.com) has integration routines in that you could translate into VBA. I think there may even be a "Numerical Recipes in Basic". Be warned that these routines can produce oscillations in the tails of the pdf...although Monte Carlo also has its own problems...Seach for avt and heston on these forums - he's posted a few spreadsheets along these kind of lines.regards,dS
 
User avatar
caroe
Posts: 2
Joined: July 14th, 2002, 3:00 am

Integration in Heston

March 30th, 2004, 6:58 am

Rumour has it that the integration done in the original Heston paper is flawed and/or is numerically unstable, so if you are trying to implement the Heston model from the original paper this might explain your problems. Go for the description in Alan Lewis' book instead.
 
User avatar
monkeyA
Posts: 9
Joined: December 4th, 2002, 10:25 am

Integration in Heston

April 1st, 2004, 4:01 pm

i found it a little unstable ... it needed a lot of tolerance on the integration
 
User avatar
Sofiane
Posts: 1
Joined: July 2nd, 2002, 9:39 am

Integration in Heston

April 3rd, 2004, 2:21 pm

"integration done in the original Heston paper is flawed and/or is numerically unstable"Overall if you try it over infinity...yoiu would have to wait until 2010 christmas.