Posted by
Toyin Akin on
URL: http://quantlib.414.s1.nabble.com/Problem-within-the-Bond-YieldSolver-class-tp4278p4291.html
##############################################"
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.
##############################################"
I'm playing devil's avocate here but...
If QL_TODAYS_PAYMENTS is defined, isn't there an inflow of the coupon also
that we recieve from the current BOND holder?
(Assuming that we are paying to the bond holder the full price
Clean+Accured. He can't keep the coupon payment he's about to recieve
because we have paid him it in the full price, thus he gives it to us)
Thus total cashflow is Clean+Accured - Accured = Clean.
If we are to PAY this dirtyprice than we have to recieve the coupon. Thus
ending up with the CleanPrice again, implying that the accured amount is
zero.
Does that work?!! Ahhhh... I knew BOND's were troublesome...!!
Toy out.
>From: Luigi Ballabio <
[hidden email]>
>To: Toyin Akin <
[hidden email]>
>CC:
[hidden email]
>Subject: [Quantlib-users] Re: accrualAmount() function within the bond
>class...
>Date: Fri, 09 Dec 2005 13:24:34 +0000
>
>
>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.
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: Splunk Inc. Do you grep through log
>files
>for problems? Stop! Download the new AJAX search engine that makes
>searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
><a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
>_______________________________________________
>Quantlib-users mailing list
>
[hidden email]
>
https://lists.sourceforge.net/lists/listinfo/quantlib-users