Posted by
Toyin Akin on
URL: http://quantlib.414.s1.nabble.com/Problem-within-the-Bond-YieldSolver-class-tp4278p4289.html
Hi,
I agree about making the QL_TODAYS_DATE parameter settable, however
practically every pricing file will need to be touched as this define is
used a lot.
Anyway, (concerning BONDS only) QuantLib will not handle the recieving of
this Coupon payment on a payment date (even within the NPV() function) and
thus you have to manage this yourself (Regardless of the setting of
QL_TODAYS_DATE ).
Toy out.
>From: Joseph Wang <
[hidden email]>
>To:
[hidden email]
>Subject: Re: [Quantlib-users] Re: accrualAmount() function within the bond
>class...
>Date: Fri, 09 Dec 2005 14:15:39 -0600
>
>A few questions:
>
>1) Would anyone object if I went into the code and did some refactoring to
>make the logic more obvious? I was thinking in particular of creating a
>private method - bool couponIssued(int i)
>
>2) Any thoughts on making QL_TODAYS_DATE a parameter which is settable. I
>was thinking that this would make unit tests easier to write since you can
>then run the bond class under both conditions.
>
>3) Anyone have a test case coded up to put into the unit test framework?
>
>
>
>
>-------------------------------------------------------
>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!
>
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click>_______________________________________________
>Quantlib-users mailing list
>
[hidden email]
>
https://lists.sourceforge.net/lists/listinfo/quantlib-users