Login  Register

Re: Fixed-rate bond pricing can yield different results compared to Excel's built-in functions

Posted by StephenWong on Oct 30, 2011; 6:07pm
URL: http://quantlib.414.s1.nabble.com/Fixed-rate-bond-pricing-can-yield-different-results-compared-to-Excel-s-built-in-functions-tp6340p6350.html


Gavin08 wrote
StephenWong wrote
I did not subtract anything in the formula because I did not see why I should subtract something that had never been included in the first place. The formula gives the discounted fraction of the coupon plus the principle that the holder of the bond will get. There is nothing to subtract. And I think this is what the quantlib function gives you. Agree?
I beg to differ. Your formula is for the dirty price. The clean price (which is what the QL function BondCleanPrice is about) is obtained by substracting the accrued interests from the dirty price. Accrued interests are the amount you need to pay the person selling you the bond to compensate her for missing on the next coupon payment, because you are trading at a mid-coupon date. In your example she deserves 1 or 2 months divided by 6 of the next coupon payment.
And as I pointed out in an earlier post, the accrued interests would be a much larger order of magnitude than the small differences with observe currently, i.e. 1 or 2 per cent instead of <0.01. There must be another source for that difference.
The formula that I wrote does not include the accrued interests that is why nothing needs to be subtracted. If you look again, it has more difference from the Excel formula than just the last term. In my opinion, I think the problem with the Excel formula is that it subtracted the undiscounted accrued interests which is way too much. I think it forgot the discount factor.