Yield to Maturity and Callable Bond Yield Measures
Summary
The note explains that a standard QuantLib bond yield calculation returns yield to maturity based on the bond reaching its stated maturity, even when it has callable dates. It shows a basic fixed-rate bond example that calculates yield from price and then derives clean price, dirty price, and accrued interest from that yield.
For yield-to-call, yield-to-worst, or yield to the next call, the cited guidance says there is no straightforward built-in approach described here. One suggested workaround is to create a separate bond whose maturity matches a call date and calculate its yield. This is a limited practical suggestion rather than a complete callable-bond valuation method; it does not model whether the issuer will exercise a call or compare call scenarios systematically.
Key ideas
- A standard bond yield calculation gives yield to maturity, assuming the bond runs to its stated maturity.
- Clean and dirty prices can be calculated from yield, with their difference representing accrued interest in the example.
- A separate bond ending on a call date is suggested as a workaround for estimating yield to call.
- The note does not provide a built-in method for yield to worst or a full call exercise analysis.
Tags
Full text
# Answer by Dimitri Vulis (score 1) # How can i calculate the yield given price, or price given yield for a callable bond, with several callable dates and strike prices (quantlib) ``` import QuantLib as ql ql.Settings.instance().evaluationDate = ql.Date(2,3,2020) maturity = ql.Date(10, 5, 2023) coupon = 0.09 issueDate = ql.Date(30, 12, 2019) frequency = ql.Semiannual dayCount = ql.Thirty360() price = 104.5 bond = ql.FixedRateBond(2, ql.TARGET(), 100.0, issueDate, maturity, ql.Period(frequency), [coupon], dayCount) yld = bond.bondYield(price, dayCount, ql.Compounded,frequency) print(yld) cleanPrice = bond.cleanPrice(yld, dayCount, ql.Compounded, frequency) print(cleanPrice) dirtyPrice = bond.dirtyPrice(yld, dayCount, ql.Compounded, frequency) print(dirtyPrice) accrued = (dirtyPrice - cleanPrice) print(accrued) ``` ## Answer by Dimitri Vulis (score 1) https://quant.stackexchange.com/a/54691 You get yield to maturity (YTM) - the yield assuming the calls are not exercised even if they are in the money. According to the master himself http://quantlib.10058.n7.nabble.com/Yield-to-call-for-callable-bonds-td17004.html > there's no straighforward way. One workaround would be to instantiate a second bond with maturity equal to the callability date of the first, and calculate the yield on that one. There does not seem to be a straighforward way to have yields that e.g. Bloomberg Terminal YA screen provides - yield to worst, yield to next call, etc.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.