|
From: a.p. <an...@gm...> - 2008-11-12 12:43:42
|
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.
|