Skip to content
All library documents

Matching a Final-Coupon Bond Price with SimpleThenCompounded Yield

Article Quant Q&A · Author: Levan

Summary

The document investigates why a bond with only one remaining coupon produces different clean prices and accrued amounts in Bloomberg, Excel, and QuantLib. It presents the bond’s settlement and coupon conventions, then compares reported prices under semiannual compounding and simple yield. The discrepancy motivates checking conventions, particularly the day-count method, as well as the yield treatment for the final coupon period.

The accepted answer reports that QuantLib can reproduce the Bloomberg clean price by selecting the SimpleThenCompounded yield convention, alongside an Actual/Actual ISMA day count. This is a concrete implementation example, not evidence that the same settings fit every bond. Correct matching still depends on aligning settlement dates, calendars, coupon schedules, day-count conventions, and other instrument terms; the example does not establish that the accrued amount will match under all configurations.

Key ideas

  • Bond price comparisons depend on matching instrument conventions, including the day-count basis.
  • A final coupon period may use simple yield treatment while earlier periods use compounding.
  • The example matches the cited Bloomberg clean price in QuantLib with SimpleThenCompounded and Actual/Actual ISMA settings.
  • The result is specific to the bond and conventions described, so other cases require separate convention checks.

Tags

Full text
# Bloomberg bond clean price and accrued amount differs from Quantlib


# Bloomberg bond clean price and accrued amount differs from Quantlib












I'm getting the different bond clean price from Bloomberg and from QL but surprisingly Bloomberg price matches with excel price() function

I have the following bond : GETC21117030. The parameters are given below:

| Parameter Name | Value |
| Settlment Date | 30-12-20 |
| Bond Issue Date | 17-Jan-19 |
| Interest Acrual date | 17-Jan-19 |
| Maturity Date | 17-Jan-21 |
| Last Coupon Date | 17-Jul-20 |
| Coupon Rate | 7.25% |
| Coupon Frequency | 2 |
| Day Count | ACT/ACT |
| Redemption | 100 |
| Yield | 7.95% |
| Calendar | NullCalendar |
| Convention | Unadjusted |
| TermPayConv | Unadjusted |
| GenRule | Backward |

if you look at the parameters you'll notice that there is only one payment left on maturity date. If I calculate price and accrued interest in QLXL I'm getting different results from Bloomberg. But surprisingly Bloomberg numbers match if I use excel native price calculation function.

I looked into the excel formula and it looks that the price calculate formula is different when there is only one payment left (see below)

When N > 1 (N is the number of coupons payable between the settlement date and redemption date), PRICE is calculated as follows:

When N = 1 (N is the number of coupons payable between the settlement date and redemption date), PRICE is calculated as follows:

DSR = number of days from settlement to next coupon date.

E = number of days in coupon period in which the settlement date falls.

A = number of days from beginning of coupon period to settlement date.

It seems that for the last payment calculation excel is moving from compounded yield to simple yield.

I calculated the clean price both with compounded yield and with simple yield. While the clean price with simple yield is close to the Bloomberg/Excel price it still does not match.

With 7.95% yield and settlement date 30 Dec 2020:

Bloomberg/Excel clean price is 99.953226, Accrued Amount 3.270380

QLXL(semiannually compounded yield) clean price is 99.95983172, Accrued Amount 3.288251366

QLXL(simple yield) clean price is 99.95278714, Accrued Amount 3.288251366

I'm not C++ specialist but the QL code I've checked does not change the price calculation algorithm when only one payment is left.

The question is: Is it possible with current implementation of QuantLib to match the price and accrued amount for the above mentioned bond (and in general with all coupon bonds when there is only one cashflow is left)?

## Answer by David Duarte (score 5, accepted)

https://quant.stackexchange.com/a/60244

Several things might be affecting your result. Check if all the conventions are correct, namely the daycount.

Regarding, the compounding on the last period, I can replicate Bloomberg's price for that bond in QuantLib using the `SimpleThenCompounded` parameter.

```
import QuantLib as ql

settlementDate = ql.Date(30,12,2020)
issueDate = ql.Date(17,1,2019)
maturityDate = ql.Date(17,1,2021)
coupon = 0.0725
freq = ql.Period('6M')
dayCount = ql.ActualActual(ql.ActualActual.ISMA)
yld = 0.0795

bbgPrice = 99.953226
bond = ql.FixedRateBond(0, ql.TARGET(), 100.0, issueDate, maturityDate, freq, [coupon], dayCount, ql.Unadjusted, ql.Unadjusted)
print(f"BBG Price: {bbgPrice}")

px = bond.cleanPrice(yld, dayCount, ql.SimpleThenCompounded, ql.Annual, settlementDate)
print(f"QuantLib  Price: {px:.6f}\n")
```

BBG Price: 99.953226 QuantLib Price: 99.953226

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.