|
From: jian Xu <jia...@gm...> - 2021-03-26 01:40:00
|
Hi,
In QuantLib, given a semi-annual FixedRateBond with 1% coupon, and
Actual/Actual day count convention, the actual coupon payment amount
varies.
But my understanding is that the DCC only affects the accrual
calculation, not the actual coupon payment amount. Is this correct?
A check on the Bloomberg terminal seems to confirm this, since any
Act/Act bond also shows the coupon amount to be constant.
So why is QuantLib different from Bloomberg? Which one is correct in
reality? (US bond market). Thank you very much.
Following is a piece of code to produce the varying coupon in Python:
import numpy as np
import pandas as pd
import QuantLib as ql
acc_start = ql.Date(15, 2, 2020)
maturity = ql.Date(15, 2, 2025)
end_of_month = False
calendar = ql.UnitedStates(ql.UnitedStates.GovernmentBond)
period = ql.Period(ql.Semiannual)
accrual_convention = ql.Unadjusted
date_gen_rule = ql.DateGeneration.Backward
schedule = ql.MakeSchedule(effectiveDate=acc_start,
terminationDate=maturity,
tenor=period,
calendar=calendar,
convention=accrual_convention,
rule=date_gen_rule,
endOfMonth=end_of_month)
face = 100
redemption = 100
issue_date = ql.Date(16, 2, 2020)
day_count = ql.ActualActual()
coupon = 0.01
days_settle = 2
payment_convention = ql.ModifiedFollowing
bond = ql.FixedRateBond(days_settle, face, schedule, [coupon],
day_count, payment_convention, redemption, issue_date)
Then [(cf.date(), cf.amount()) for cf in bond.cashflows()] shows the
amount is not constant.
|