Login  Register

Re: Calculating yield to maturity , incorrect answer ? why ?

Posted by johnacandy on Oct 18, 2010; 7:47pm
URL: http://quantlib.414.s1.nabble.com/Calculating-yield-to-maturity-incorrect-answer-why-tp8325p8331.html

Hi , just realized my mistake and then again i would really like to thank all of you guys in the mailing list
especially Luigi Ballabio , Harun Ozkan and offcourse Simon Ibotson. I really couldnt have managed without you guys. Thank You.

Luigi Ballabio wrote
On Oct 18, 2010, at 9:16 PM, johnacandy wrote:

>
> So i made the changes as I was told which were
> Settings::instance().evaluationDate()= bondDatedDate; //which is
> (15,June,2010)
> and made certain the Redemption was = 100.0
> and i got an output of 5.667 which unfortunately is still not  
> correct , its
> suppose to be 16.6

No, it's supposed to be 16.67% which is 0.1667.  You also want to set  
bondCoupon = 0.05.
Input and output rates are values in base 1, not percentages.

Luigi


------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users