Login  Register

Cashflows accrued methods

Posted by Peter Caspers-4 on Sep 17, 2012; 8:06pm
URL: http://quantlib.414.s1.nabble.com/Cashflows-accrued-methods-tp9122.html

Hi Luigi, Nando,

the methods Cashflows::accruedPeriod(), accruedDays() and
accruedAmount() default the settlementDate to Date(), which I guess
should mean to take the evaluation date as the settlement date. However
this does not work with the methods in Coupon invoked from here. As a
result 0.0 is returned always, when no settlement date is specified.

I think therefore that

if (settlementDate == Date())
        settlementDate = Settings::instance().evaluationDate();

should be added to the methods mentioned above. I observe this in 1.1.

Regards
Peter


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev