Re: SegFault with with impliedVolatility

Posted by Dirk Eddelbuettel on
URL: http://quantlib.414.s1.nabble.com/SegFault-with-with-impliedVolatility-tp3333p3337.html

Nando,

On Sun, Sep 19, 2004 at 09:55:02AM +0200, Ferdinando Ametrano wrote:
> Hi Dirk
>
> if it can be of help I'm willing to compile your RQuantLib source code
> using Visual C++ and see if the same problem arise.

Thanks, though AFAIK it only works with the Msys/Mingw variety of gcc as it
needs to link to R.

> Are you using impliedVolatility() with European or exotic options? Its
> usage with exotic options is uncovered in our test-suite and you might have
> found a genuine bug.

It blows up for American and European if and only if I call
impliedVolatility() as in

  if (value != 0.0) {
    vol->setValue(volguess*1.5); // shift guess somehow
    implVol = option->impliedVolatility(value, tolerance, maxEvaluations);
  }

If I assign implVol = 0.1234; or so it runs fine. The rest of the code is
from the test-suite, plus what I need to communicate with R.

Dirk

--
Those are my principles, and if you don't like them... well, I have others.
                                                -- Groucho Marx