Re: accrualAmount() function within the bond class...

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Problem-within-the-Bond-YieldSolver-class-tp4278p4290.html

On 12/07/2005 12:04:27 PM, Toyin Akin wrote:
>
> Within the accuralAmount() function of the Bond class, if one has a  
> Bond where the settlement date passed in is equal to a coupon payment  
> date and the QL_TODAYS_PAYMENTS flag is enabled within the config  
> file, I think the function should return zero.

No, it shouldn't. It must return zero if QL_TODAYS_PAYMENTS is not  
defined, since in that case the coupon is gone. If enabled, the coupon  
is still part of the bond and the accrued amount is returned  
accordingly.

Luigi

----------------------------------------

Steinbach's Guideline for Systems Programming:
        Never test for an error condition you don't know how to handle.