Login  Register

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

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


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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users