Posted by
Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/FdAmericanOption-problem-and-Tracing-tp3483p3494.html
On 01/06/05 06:31:46, Joseph Wang wrote:
>
> 1) Basically if you run FdAmericanOption with a fixed number of time
> steps and increase the number of space steps, the PDE calculation starts
> getting unstable.
> 2) There also seems to be some error if you have an even number of grid
> steps.
>
> As far as 1) and 2) my current opinion is that the problem is a deep
> issue and that the best way of dealing with it is to put in checks that
> stop the simulation if the number of space steps are too large or if
> there is an even number. The big problem with 1) and 2) is that the
> simulation behaves counter-inituitively. More grids usually gives a
> better result.
Hmm. As to evenness, it is easy enough to write
gridPoints += gridPoints % 2 + 1
so that the number is always odd. But as to space steps, how are we to
decide whether we have too many?
> Some of the projects I can think of are:
>
> 1) write unit tests that compare the output of FdAmericanOption with some
> known good results
This would be good, but it would only check that a given combination of
parameters is safe. It could help us define some range of parameters to be
rejected, but I doubt that it would make us confident that an algorithm
works for arbitrary parameters (maturity, volatility, time/asset steps...)
> 2) see how bad the problem is. I suspect that anything that calculates
> option prices via PDE will run into this problem.
I'm running a few tests as I write this mail. As to dividends, the code
currently in CVS runs Graham's test case safely up to 210 grid points and
then diverges. As to plain american options, let me compile and run it...
I see. FdAmericanOption went all the way to 5000 grid points without losing
a beat. It looks like it's something in the dividend option...
> 3) see if this sort of issue is in the literature.
Well, it just so happen that we have Daniel Duffy on the list. Daniel, do
you have any insight?
But all in all, I guess we should sit down and redesign the framework. The
existing one is ancient and it should be retrofitted to the current library
design anyway (engines and such.) It could be the right time to have a good
look at it.
Later,
Luigi