I'm working with a fixed-rate bond in QuantLib, and I have set the day count convention to ISMA, but I would like to understand how this specific day count convention is used in the calculation of the bond's first cashflow I have gone through the link https://www.isda.org/a/pIJEE/The-Actual-Actual-Day-Count-Fraction-1999.pdf still not able to understand how quantlib is calculating the first short period or long period cashflow. Here are the relevant code and cashflows:
issue_date = ql.Date(1, 1, 2021)
maturity_date = ql.Date(15, 1, 2022)
stubdate = ql.Date(28, 2, 2021)
coupon_rate = 8.40 / 100
face_value = 1000000
calendar = ql.NullCalendar()
day_count = ql.ActualActual(ql.ActualActual.ISMA)
compounding = ql.Simple
payfreq = ql.Monthly
payment_schedule = ql.Schedule(issue_date, maturity_date, ql.Period(payfreq), calendar, ql.Unadjusted, ql.Unadjusted, ql.DateGeneration.Forward, True, stubdate)
lst_pysch = list(payment_schedule)
lst_pysch.pop(0)
lst_pysch.insert(0, issue_date)
new_paysch = ql.Schedule(lst_pysch)
fixedrate_leg = ql.FixedRateLeg(
schedule=new_paysch, dayCount=day_count, nominals=[face_value], couponRates=[coupon_rate])
bond = ql.Bond(0, calendar, 100.0, maturity_date, issue_date, fixedrate_leg)
[(a.date(), a.amount()) for a in fixedrate_leg]
Output:
[(Date(28, 2, 2021), 14000.000000000013),
(Date(31, 3, 2021), 6999.999999999895),
...
(Date(15, 1, 2022), 3452.054794520487)]
My specific question is, how is the first cashflow value of 14,000 calculated? I would like to understand the logic and calculations behind this particular cashflow.
Thank you for your help!
issue_date
. $\endgroup$