Heston and ExactVariance

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Heston and ExactVariance

Dimathematician
Hi All,

I appologize for the frequency of the initialized discussions, but I'm browsing through a lot of
QuantLib code and need to discuss the issues. I hope that nobody is annoyed and the
discussions add some value to the library.

I had a look at Heston and the exact variance method. There were some questions on Wilmott
about what the code does and some user requests. As far as I can see this is not the method
proposed by Broadie and Kaya in "Exact Simulation of stochastic volatility..." which is what
is commonly understood as the exact simulation approach. Which might be misleading. And
I didn't find out what is actually done and if there is some approximation happening. Can anyone
elaborate?

As a side note: I don't think it is good coding practice to pass normal random variables to "evolve"
and transform them to other variables within the code. What is often done is: take normal, take
cdf to get uniform, take inverse of other cdf to get a sample of the random number corresponding
to this cdf. Don't know how good the random variables are if generated in that way, also the interface
will be hard to understand. I think there should rather be a way to pass the random variables directly.

Best regards, Dima

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Heston and ExactVariance

Klaus Spanderen-2
Hi

your are right, exact variance is not the exact simulation alogrithm as proposed by Broadie and Kaya. "exact variance" here means that the variance part of the Heston process is sampled from the "correct" non-central chi square distribution.

May be we should change the name of the scheme. Do you have a better one?

best regards
 Klaus


----- original message --------

Subject: [Quantlib-dev] Heston and ExactVariance
Sent: Thu, 01 Oct 2009
From: Dima

Hi All,

I appologize for the frequency of the initialized discussions, but I'm browsing through a lot of
QuantLib code and need to discuss the issues. I hope that nobody is annoyed and the
discussions add some value to the library.

I had a look at Heston and the exact variance method. There were some questions on Wilmott
about what the code does and some user requests. As far as I can see this is not the method
proposed by Broadie and Kaya in "Exact Simulation of stochastic volatility..." which is what
is commonly understood as the exact simulation approach. Which might be misleading. And
I didn't find out what is actually done and if there is some approximation happening. Can anyone
elaborate?

As a side note: I don't think it is good coding practice to pass normal random variables to "evolve"
and transform them to other variables within the code. What is often done is: take normal, take
cdf to get uniform, take inverse of other cdf to get a sample of the random number corresponding
to this cdf. Don't know how good the random variables are if generated in that way, also the interface
will be hard to understand. I think there should rather be a way to pass the random variables directly.

Best regards, Dima


--- original message end ----



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Heston and ExactVariance

Dimathematician
A better name or a better scheme :)? The Broadie Kaya scheme could be added of course. As
far as I understand you're sampling from chi square as they do. But then you use this variance
in the next step for the asset. They do a full sampling of the variance from t to t+\Delta for the
asset. And then I get lost since you do multiply with rho/sigma... in the drift and subtract...
Do you have a source for your approach? Thanks



2009/10/1 Klaus Spanderen <[hidden email]>
Hi

your are right, exact variance is not the exact simulation alogrithm as proposed by Broadie and Kaya. "exact variance" here means that the variance part of the Heston process is sampled from the "correct" non-central chi square distribution.

May be we should change the name of the scheme. Do you have a better one?

best regards
 Klaus


----- original message --------

Subject: [Quantlib-dev] Heston and ExactVariance
Sent: Thu, 01 Oct 2009
From: Dima

Hi All,

I appologize for the frequency of the initialized discussions, but I'm browsing through a lot of
QuantLib code and need to discuss the issues. I hope that nobody is annoyed and the
discussions add some value to the library.

I had a look at Heston and the exact variance method. There were some questions on Wilmott
about what the code does and some user requests. As far as I can see this is not the method
proposed by Broadie and Kaya in "Exact Simulation of stochastic volatility..." which is what
is commonly understood as the exact simulation approach. Which might be misleading. And
I didn't find out what is actually done and if there is some approximation happening. Can anyone
elaborate?

As a side note: I don't think it is good coding practice to pass normal random variables to "evolve"
and transform them to other variables within the code. What is often done is: take normal, take
cdf to get uniform, take inverse of other cdf to get a sample of the random number corresponding
to this cdf. Don't know how good the random variables are if generated in that way, also the interface
will be hard to understand. I think there should rather be a way to pass the random variables directly.

Best regards, Dima


--- original message end ----




------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Heston and ExactVariance

Luigi Ballabio
On Fri, 2009-10-02 at 07:59 +0200, Dima wrote:
> A better name or a better scheme :)?
 
A better name, so that we make the old name available for the better
scheme :)

Luigi


--

Skinner's Constant (or Flannagan's Finagling Factor):
That quantity which, when multiplied by, divided by, added to,
or subtracted from the answer you got, gives you the answer you
should have gotten.



------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Heston and ExactVariance

Luigi Ballabio
In reply to this post by Klaus Spanderen-2
On Thu, 2009-10-01 at 13:22 +0200, Klaus Spanderen wrote:
> your are right, exact variance is not the exact simulation alogrithm
> as proposed by Broadie and Kaya. "exact variance" here means that the
> variance part of the Heston process is sampled from the "correct"
> non-central chi square distribution.
>
> May be we should change the name of the scheme. Do you have a better
> one?

Quick note: if the two of you are going to come up with a better name,
you better do it during next week. After that, I'm starting to package
the 0.9.9 release and I'm freezing the interfaces, so if it's still
called exact variance it stays that way.

Luigi


--

Anyone who says he can see through women is missing a lot.
-- Groucho Marx



------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Heston and ExactVariance

Dimathematician
Well, obviously we shouldn't change the name until we have the
alternative implementation for the "correct" type. Otherwise it will
not be backwards compatible. Users will call the new version in
their old code and will be sent to nirvana :) And the implementation
will probably not be finished within a week


2009/10/2 Luigi Ballabio <[hidden email]>
On Thu, 2009-10-01 at 13:22 +0200, Klaus Spanderen wrote:
> your are right, exact variance is not the exact simulation alogrithm
> as proposed by Broadie and Kaya. "exact variance" here means that the
> variance part of the Heston process is sampled from the "correct"
> non-central chi square distribution.
>
> May be we should change the name of the scheme. Do you have a better
> one?

Quick note: if the two of you are going to come up with a better name,
you better do it during next week. After that, I'm starting to package
the 0.9.9 release and I'm freezing the interfaces, so if it's still
called exact variance it stays that way.

Luigi


--

Anyone who says he can see through women is missing a lot.
-- Groucho Marx




------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Heston and ExactVariance

Luigi Ballabio
On Fri, 2009-10-02 at 17:46 +0200, Dima wrote:
> Well, obviously we shouldn't change the name until we have the
> alternative implementation for the "correct" type. Otherwise it will
> not be backwards compatible. Users will call the new version in
> their old code and will be sent to nirvana :)

I'm not sure that I want to surprise users, even in a good way.
I'd rather rename the existing implementation, leave the ExactVariance
missing, and add it in a later release.

Luigi


--

Ogden's Law:
The sooner you fall behind, the more time you have to catch up.



------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Heston and ExactVariance

Dimathematician
This will imply that users which run their old code with QL 0.9.9
will see an exception while the old version didn't throw one. Maybe,
Klaus can say something here


2009/10/5 Luigi Ballabio <[hidden email]>
On Fri, 2009-10-02 at 17:46 +0200, Dima wrote:
> Well, obviously we shouldn't change the name until we have the
> alternative implementation for the "correct" type. Otherwise it will
> not be backwards compatible. Users will call the new version in
> their old code and will be sent to nirvana :)

I'm not sure that I want to surprise users, even in a good way.
I'd rather rename the existing implementation, leave the ExactVariance
missing, and add it in a later release.

Luigi


--

Ogden's Law:
The sooner you fall behind, the more time you have to catch up.




------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Heston and ExactVariance

Luigi Ballabio
On Mon, 2009-10-05 at 12:37 +0200, Dima wrote:
> This will imply that users which run their old code with QL 0.9.9
> will see an exception while the old version didn't throw one.

No, it would imply that their old code won't compile (the ExactVariance
enum will no longer be there) and they'll have to use the new name.

> Maybe, Klaus can say something here

Absolutely.

Luigi


--

The First Rule of Optimization: Don't do it.
The Second Rule of Optimization (For experts only): Don't do it yet.
-- Michael Jackson



------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev