Re: American options with discrete dividends - why it crashes?

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/american-options-via-trinomial-trees-tp6966p6971.html

On Tue, 2010-08-31 at 11:31 -0400, Jeff Yan wrote:
> I am trying to price American Options with discrete dividends in Java,
> through SWIG, JNI, to QuantLib (C++ version). Everything goes well
> until the last step: calling option.NPV() method crashes with JNI
> error.


> DividendVanillaOption americanOption = new DividendVanillaOption(payoff, americanExercise, divDates, divs);
>
> FDDividendAmericanEngine engine = new FDDividendAmericanEngine(process);
>
> americanOption.setPricingEngine(engine );

This is OK. If you call NPV here, you should get a price.


> // Binomial method
> int timeSteps = 801;
>
> americanOption.setPricingEngine(new BinomialVanillaEngine(process, "CoxRossRubinstein", timeSteps));

This can't work.  The BinomialVanillaEngine is not compatible with the
DividendVanillaOption.  You'll have to stick to FD.

Luigi


--

Every solution breeds new problems.
-- unknown



------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users