To check the sensitivity of YTM to accrued interest, I calculated yield for a bond of about six months to maturity, with settlement the day before or the day of the coupon payment. Here are the results:Kevin M wrote: ↑Sat Nov 12, 2022 4:24 pmI understand that accrued interest is included in the cash flows used to calculate IRR, and therefore YTM. The yield of 3.921 does not seem correct, but perhaps it's part of the explanation for the difference between 2.394 (or 2.660) and 3.521 (or 3.497). I'll check it out a bit more, unless #Cruncher gets to it first.acegolfer wrote: ↑Sat Nov 12, 2022 3:56 pmWhen calculating YTM, you may not enter the accrued interest in the calculator. Yes, you enter the clean price. But the calculator will use accrued interest to calculate yield. See https://support.microsoft.com/en-us/off ... 3c9727a4fe The mathematical formula clearly shows the accrued interest both in numerator and denominator. Let me know if you can't see the accrued interest in the formula.
If one doesn't account for accrued interest, the numerator increases and denominator decreases, which incorrectly results in a higher ytm. This is what I think happened in OP's 1st example.
Thanks,
Kevin
So, there is a slight sensitivity to accrued interest, but it's minor. I think that the key to understanding this is to note that accrued interest is small compared to price, so the factor (price + accr int) in #Cruncher's formula does not have a large impact on the result. Perhaps the effect is amplified at the shorter maturity we're discussing.
This formula works in my calculations when there is no coupon payment before maturity, but not if there is one.
Perhaps I am misunderstanding the formula.
Kevin