Login  Register

Re: What is the behavior of the function qlBondAtmRateFromYieldTermStructure?

Posted by cheng li on Aug 18, 2012; 3:51am
URL: http://quantlib.414.s1.nabble.com/What-is-the-behavior-of-the-function-qlBondAtmRateFromYieldTermStructure-tp8149p8150.html

After diving into the Quantlib source codes, I think I have found some reason why such behaviour occurs.   qlBondAtmRateFromYieldTermStructure seems based on the Qauntlib function CashFlows::atmRate. As far as I know, this function works only for coupon cash flows. Unfortunately for a bond there is a face amount payment at the expiry and this is totally ignored by the atmRate function. So that the implied ATM rate that the function returning is the level at which all the NPV of the coupon cash flows will be equal to the target clean price. This is not the usual logic from which we define the par rate. To get the expected par rate, I have to subtract the NPV of the final face amount payment from the target clean price and plug the adjusted clean price to the function    qlBondAtmRateFromYieldTermStructure .

2012/8/17 Cheng Li <[hidden email]>

Hi All,

 

After using Quantlibxl to build the yield curve successfully, I am now planning to use the curve to price different bonds. Firstly I want to calculate the par coupon for an existing bond or a dummy bond, so that I can have a review on the par yield curve in current market. After scanning in the Quantlibxl doc, I found the function qlBondAtmRateFromYieldTermStructure may meet my purpose. The description of the function says it return “ATM rate implied by the given YieldTermStructure” which in my opinion is just the par coupon. However the actual returned value is very strange, the number can’t be the par coupon. I can’t guess what the returned value means. It is hard to describeit in the mail, so I attach a sample sheet which shows my problem.

 

In the sample sheet, firstly I set up a dummy curve with flat forward rates as 0.05. Then I built several bonds with different maturities starting just today. After that, by using qlBondAtmRateFromYieldTermStructure , I expected to get the par coupon with each bond( in this case, the number should be around 0.05). Unfortunately, the returned number doesn’t seem to be consistent with my assumption. Finally I rebuilt these bonds with the returned value and re-priced these bonds with the flat curve. The value is not equal to 100 as expected…

 

Does anyone have faced the same issue?

 

Regards,

Cheng



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users