RE: FdDividendAmericanOption doesn't like zero t ime to dividend

Posted by Marco Marchioro-2 on
URL: http://quantlib.414.s1.nabble.com/RE-FdDividendAmericanOption-doesn-t-like-zero-t-ime-to-dividend-tp2179p2180.html

Hi,
On a second thought you should be able to have 0 as a dividend date.
I did not have a chance to try the C++ code you provided but the following,
equivalent, python code prints 5.35988679227 as the option value
and does not raise any exception.

     import QuantLib
     opt = QuantLib.FdDividendAmericanOption("Call",40.25,
35,0.0,0.05,0.1,0.25,
                                             [0.125],[0],20,20)
     print opt.value()

anybody else has an opinion on this?

Marco



At 11:55 AM 9/11/02 -0500, you wrote:
 > Hi Vadim,
 >          note that the vector dividendTimeA should contain
 > the ex-dividend
 > dates.
 > If the dividend will be paid today the ex-dividend date is tomorrow,
 > hence cannot be 0.0(should be a positive small number).