In AccountingEngine::SinglePathValues, generated cash flows of
MultiProductComposite product components with different evolution times, are not
purged and still cumulated also during evolution times not in their subset.
I have this problem when using a MarketModel generated through a
FwdPeriodAdapter and use it to price a BermudanSwaption as in the test-suite
marketmodel example. The period adapted market model still has evolution times
coming from small rates grid, while the product to price runs on the evolution
time grid of big rates. When evolving at times not in the big grid, cash flows
are still cumulated.
I suggest to add the following:
std::fill(numberCashFlowsThisStep_.begin(),
numberCashFlowsThisStep_.end(),0);
before the call to product-> nextTimeStep() in AccountingEngine
done = product_->nextTimeStep(evolver_->currentState(),
numberCashFlowsThisStep_,
cashFlowsGenerated_);
Regards,
Luca Ferraro
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users