Hi all,
I rewrote the bond sample I sent a few weeks ago in order to include a treasury curve built on some fixed bonds. The shape & value of the curves look fine. There's only a small adjustment I'll add a little bit later, which consists in adding a corporate curve to price the floating bond. Do not hesitate to give me the suggestions you may have to improve that sample. I don't promiss I'll be able to do the changes quickly, but I can tell that I'll look at them one day or another :) Thanks, Florent ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
On Wed, 2008-10-08 at 12:16 +0200, Florent Grenier wrote:
> I rewrote the bond sample I sent a few weeks ago in order to include a > treasury curve built on some fixed bonds. The shape & value of the > curves look fine. Ok, I've added it to the repository. Thanks, Luigi -- All generalizations are false, including this one. -- Mark Twain ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Regarding the quantlib bond classes, what is the reasoning behind the fact that one has to create a schedule (for coupons) and provide it to the bond constructor, instead of providing the necessary information to the bond constructor and then have it construct the needed schedule?
Furthermore when you need the bond yield, the way to get it is (assuming an existing fixedRateBond object with semiannual coupon payments): Real price = 73.27; Rate yld = fixedRateBond.yield(price,Thirty360(Thirty360::EurobondBasis),Compounded,Semiannual); where especially the need to provide the Frequency parameter troubles me, because that frequency was allready provided when the coupon schedule was created. The need to provide this frequency here also is, in my opinion, quite confusing. /Nicolai |
This frequency will be used for discount factor.
Regarding the quantlib bond classes, what is the reasoning behind the fact that one has to create a schedule (for coupons) and provide it to the bond constructor, instead of providing the necessary information to the bond constructor and then have it construct the needed schedule? Furthermore when you need the bond yield, the way to get it is (assuming an existing fixedRateBond object with semiannual coupon payments): Real price = 73.27; Rate yld = fixedRateBond.yield(price,Thirty360(Thirty360::EurobondBasis),Compounded,Semiannual); where especially the need to provide the Frequency parameter troubles me, because that frequency was allready provided when the coupon schedule was created. The need to provide this frequency here also is, in my opinion, quite confusing. /Nicolai -- View this message in context: http://www.nabble.com/Bonds-sample-tp19876099p20112443.html Sent from the quantlib-dev mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev ________________________________________________________ DTCC DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify us immediately and delete the email and any attachments from your system. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
In reply to this post by N_Lassesen
Hi Nicolai
> what is the reasoning behind the fact > that one has to create a schedule (for coupons) and provide it to the bond > constructor, instead of providing the necessary information to the bond > constructor and then have it construct the needed schedule? I would reverse the question and ask what would be the reason to have multiple input parameters used for Schedule construction instead of just passing a Schedule, that is a single parameter. Besides it is not rare the case in which the schedule used for the bond might have been originated from a swap, or viceversa > Furthermore when you need the bond yield [...] the need to provide the > Frequency parameter troubles me, because that frequency was allready > provided when the coupon schedule was created. I don't have access to the code right now, but if I remember right the input frequency is used in order to calculate the actual coupon payment from the coupon rate, and it might be different from the frequency used to calculate the yield, e.g. when you want to compare the yield of 2 bonds with different coupon rate frequency and/or schedule hope it helps ciao -- Nando ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
In reply to this post by Florent Grenier
Nicolai, >> what is the reasoning
behind the fact >> that one has to create a schedule (for coupons) and provide it to the bond >> constructor, instead of providing the necessary information to the bond >> constructor and then have it construct the needed schedule? It is more generic and make easy to implement non regular
cashflows. I could use it in a securitization product we had in my last job,
for example. > input frequency is used in order to calculate the actual coupon > payment from the coupon rate, and it might be different from the > frequency used to calculate the yield, This is the case for Brazil. We have the NTN-F public
bond quoted at Annual Business/252 but whose coupon generation follows Annual
30/360. Regards,
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Nando and Piter,
Thank you very much for your replies. Fortunately in my job I have yet to come accross such a bond :-). However, I do suggest that someone puts a note about this in the documentation for the bond::yield function. /Nicolai |
Free forum by Nabble | Edit this page |