I would like to unsubscribe from the list.
thanks, Richard ------ Original Message ------ Received: Fri, 09 Dec 2005 11:35:42 PM EST From: [hidden email] To: [hidden email] Subject: Quantlib-users digest, Vol 1 #873 - 4 msgs Send Quantlib-users mailing list submissions to [hidden email] To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/quantlib-users or, via email, send a message with subject or body 'help' to [hidden email] You can reach the person managing the list at [hidden email] When replying, please edit your Subject line so it is more specific than "Re: Contents of Quantlib-users digest..." Today's Topics: 1. Re: Re: accrualAmount() function within the bond class... (Joseph Wang) 2. Re: Re: accrualAmount() function within the bond class... (Toyin Akin) 3. RE: Re: Problem within the Bond YieldSolver class... (Toyin Akin) 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? 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 Hi, Maybe you could add an IsFlat() method to the YieldCurve class. (Internally testing to see if the array size is 1). Then you could switch between the two implementations (within the BOND's performCalculation() function) depending on the value of this IsFlat() function. Although one implementation regardless of how the yieldCurve is structured is obviously a good thing. Just an idea... Toy out. >From: Luigi Ballabio <[hidden email]> >To: Toyin Akin <[hidden email]> >CC: [hidden email] >Subject: [Quantlib-users] Re: Problem within the Bond YieldSolver class... >Date: Fri, 09 Dec 2005 13:34:50 +0000 > > >On 12/06/2005 07:27:50 PM, Toyin Akin wrote: >>Okay, after playing around a bit within the Bond classes, there can be >>situations where the implied Yield will not reprice the bond exactly >>(yield() function of the Bond class). This is because there is a minor >>difference between the implementation between the computation of the >>dirty price within the YieldSolver (dirtyPriceFromYield() function) and >>the performCalculation class of the Bond class. >> >>[...] >> >>In my local copy, I thought about changing the code within the >>performCalculation() function so that for the first accrual period, I >>compute a 'Time' variable instead of using the 'Date' variable and then >>passing this to the discount() function. > >Maybe, but this can give an incorrect discount when the yield term >structure is not constant (as you're basically passing a time >corresponding to a different date.) > >I'm not sure of how to go about this one. We might ask the term structure >for the rates over the coupon and compound them to get the discount... > >Luigi > > >---------------------------------------- > >Just remember what ol' Jack Burton does when the earth quakes, the >poison arrows fall from the sky, and the pillars of Heaven shake. Yeah, >Jack Burton just looks that big old storm right in the eye and says, >"Give me your best shot. I can take it." >-- Jack Burton, "Big trouble in Little China" > > > >------------------------------------------------------- >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 _______________________________________________ Quantlib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |