Login  Register

FDDividendEngineShiftScale class

Posted by Andrew Kolesnikov on Nov 12, 2008; 12:43pm
URL: http://quantlib.414.s1.nabble.com/FDDividendEngineShiftScale-class-tp12407.html


Hello everybody!
Currently, i try to implement FD Framework for american option valuation (on
stock with dividends), and then use it for single barrier option pricing. I
use FDDividendEngineShiftScale and unfortunately found that results are
absolutly unreliable. The main function, which is used for calculation, is
FDMultiPeriodEngine:: calculate() (it's the parent class). Have anybody
checked the correctness of this function?
For proper valuation i've changed the declaration of used class:
        class FDDividendEngineShiftScale : public DividendVanillaOption::engine,
FDDividendEngineBase
it's necessary for DividendVanillaOption.setPricingEngine initialization,
and added calculate() function description:
        void calculate() const {
                setupArguments(&arguments_);
                FDMultiPeriodEngine::calculate(&results_);
        }
Also i've changed condition engine to FDAmericanCondition and added another
constructor for AmericanExercise class (it's already documented):
  AmericanExercise::AmericanExercise(const Date& latestDate,
                                       bool payoffAtExpiry)
    : EarlyExercise(American, payoffAtExpiry) {
        dates_ = std::vector<Date>(1, latestDate);
    }

That's all. Maybe i should do some other steps to achieve correct results?
Thanks in advance.
Andrew.
P.S i work with QuantLib 0.9.0 version

--
View this message in context: http://www.nabble.com/FDDividendEngineShiftScale-class-tp20459579p20459579.html
Sent from the quantlib-dev mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev