# Quantlib Floating Rate Cashflow

I am struggling to reconcile the cashflow of a floating rate bond. I created a reference index of 5% flat, then a bond that pays quarterly coupon with Actual/360. For example, I'd expect the coupon on 4/15/2023 (accrual from 1/15-4/15) to be 90/360*5%*100 = 1.25 exactly. Maybe it needs to be converted from continuous to simple. (exp(0.05/4)-1)*100 gives me 1.257845. Quantlib returns 1.2579326904575874. Where did this come from?

    flatZero5 = ql.ZeroCurve(spotDates,
pd_zero_curve['Value']*0 +0.05,
ql.Actual360(),
ql.UnitedStates(),
ql.Linear(),
ql.Continuous,
ql.NoFrequency)
flat5handle = ql.YieldTermStructureHandle( flatZero5 )
index1 = ql.USDLibor(ql.Period(3, ql.Months),
)

schedule = ql.MakeSchedule(ql.Date(15,1,2022), ql.Date(15,1,2042) , ql.Period('3M'))
bond1 = ql.FloatingRateBond(settlementDays=3,
faceAmount = 100,
schedule = schedule ,
index = index1,
paymentDayCounter = ql.Actual360(),
)
bond_cf= bond1.cashflows()
print ( bond_cf[4].date()  ) # April 15th, 2023
print (  bond_cf[4].amount()  ) # result 1.2579326904575874
print( flat5handle.forwardRate( ql.Date(15,1,2023),
ql.Date(15,4,2023),
ql.Actual360(),
ql.Continuous,
ql.NoFrequency) ) # returns 5.000000 % Actual/360 continuous compounding

• Could you share the spotDates and spotRates? Jan 4 at 9:07
• My program has 9/30/2022 as time zero. spotDates is just the date vector at monthly interval that goes out to 100 years. Since it's 5% flat I don't expect the date vector to matter in this case. Jan 5 at 15:34
• A follow up simplified test. This time I constructed flat 5% curve as simple annual. The Forward rate for some reason becomes 3.432548 % Actual/360 simple compounding. It doesn't seem right... Jan 10 at 16:03
• 'A follow up simplified test. This time I constructed flat 5% curve as simple annual. The Forward rate for some reason becomes 3.432548 % Actual/360 simple compounding. It doesn't seem right.. flatZero5 = ql.ZeroCurve([ql.Date(30,9,2022), ql.Date(30,9,2042)], [0.05,0.05], ql.Actual360(), ql.UnitedStates(), ql.Linear(), ql.Simple, ql.Annual) flat5handle = ql.YieldTermStructureHandle( flatZero5) ' Jan 10 at 16:04
• ' print( flat5handle.forwardRate( ql.Date(30,9,2032), ql.Date(30,9,2033), ql.Actual360(), ql.Simple, ql.Annual) )' Jan 10 at 16:04