Posted by
Ferdinando M. Ametrano-3 on
Aug 28, 2012; 4:30pm
URL: http://quantlib.414.s1.nabble.com/What-is-the-behavior-of-the-function-qlBondAtmRateFromYieldTermStructure-tp8149p8151.html
Hi Cheng
> qlBondAtmRateFromYieldTermStructure seems based on the Qauntlib function
> CashFlows::atmRate.
yes it is
> As far as I know, this function works only for coupon cash flows.
No, it should work for whatever kind of bond, as it just looks for the
par fixed coupon that matches the npv of the actual bond's cashflow
stream
> Unfortunately for a bond there is a face amount payment at the expiry and this is totally
> ignored by the atmRate function.
the atmRate function just deals with cashflows, it is not aware about
them being redemptions or coupons
> 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.
you're right, this is not usual logic and it is not the expected
behavior, since CashFlows::atmRate is passed bond.cashflows() which
should include redemption(s).
I think you stumbled into a genuine bug, which I will investigate as
soon as I can
ciao -- Nando
------------------------------------------------------------------------------
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