|
From: Andrew K. <an...@gm...> - 2008-12-08 09:54:10
|
Dear, all
In the Known Bugs list you could find bugs related to different FD Engines,
which essentially are the child classes of the FDDividendEngine. The main
feature of this class is an executeIntermediateStep(step) method, which
implement grid transformation during ex-div date (FDDividendEngineShiftScale
class) or grid scaling on every step (FDDividendEngineMerton73 class). The
main error hides in the call of
initializeInitialCondition();
function, cause it contains initial grid initialization, which is absolutly
unnecessary during intermidiate step. To correct the error you should
replace this line by
intrinsicValues_.sample(*payoff_);
so only payoff initialization will be executed. I use
FDDividendAmericanEngineShiftScale class for american option valuation, and
should say that it works perfectly, also with impliedVolatility() method.
I guess this bug could be corrected in the new QL version, also with one
useful addition in exercise.cpp file:
AmericanExercise::AmericanExercise(const Date& latestDate,
bool payoffAtExpiry)
: EarlyExercise(American, payoffAtExpiry) {
dates_ = std::vector<Date>(1, latestDate);
}
Such constructor is already documented, but isn't realised.
Best wishes.
--
View this message in context: http://www.nabble.com/FDDividendEngine-bug-correction-tp20892161p20892161.html
Sent from the quantlib-dev mailing list archive at Nabble.com.
|