Re: Re: Problem with impliedVolatility using DividendEngine

Posted by Joseph Wang-2 on
URL: http://quantlib.414.s1.nabble.com/Problem-with-impliedVolatility-using-DividendEngine-tp4479p4480.html

FYI, I just ran it against the version in CVS and it ran fine.  There were a
huge numbers of changes in the dividend engines recently so it may be that
there was a bug that has been fixed.  Luigi has already branched out 0.3.12
and it should be released shortly.  If you have a version older than 0.3.11
or want to test out CVS, you might try to see if this fixes things.

One other thing that would be useful is to set a break point where that error
happens and then e-mail me a stack trace.  

Something else to try is to calculate the NPV for the option and see if that
gives out any values.

The number that goes into the the constructor are actual amounts.  As far as
discounting, the 0.3.11 engine does not do discounting which gives answers
which are at variance with the standard reference texts.  The version in CVS
has two different engines that do discounting differently, and the default
does match the classic answers in Hull.

One other thing is that the answers may be (or may not be) wrong for American
options.  The trouble is that the engine shifts the price of the option only
when there is a dividend payout, and doesn't take into account the change in
the discount factor in between time steps.  This doesn't matter for European
options, but it might (or might not) matter for American options as it may
interact incorrectly with the step condition.  In any case, it would be a
very good idea to throw the engine against known good values before putting
any money on the answers.

At Thursday 16 February 2006 12:56,forourke wrote:
> Hey Joseph,
> For the dividend payment vector that's passed into the
> DividendVanillaOption() ctor, should those dividends be expressed
> as actual $amounts or are they as a % of the underlying price?
> Also, will the engine discount for present value of each amount
> or should I do that before putting them into the vector?