Re: Bonds sample

Posted by Guowen Han on
URL: http://quantlib.414.s1.nabble.com/Bonds-sample-tp12365p12371.html


This frequency will be used for discount factor.



N_Lassesen <[hidden email]>

10/22/2008 10:52 AM

To
[hidden email]
cc
Subject
Re: [Quantlib-dev] Bonds sample






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