lballabio / QuantLib-SWIG

QuantLib wrappers to other languages
Other
338 stars 282 forks source link

Quantlib - ACT ACT ISMA , Short Stub cases with EOM True leading to incorrect coupon just for 1st period #632

Closed crypthodl91 closed 1 month ago

crypthodl91 commented 5 months ago

Using the below parameters for creating the schedule and Accrual calculation for bond

Accrual Date - 15th Feb 2023 First Coupon Date - 30th April 2023 End Of Month - True Frequency - Qtrly Maturity - 31 May 2024

Expected schedule 30-April 2023 31 - July 2023 31- Oct 2023 31- Jan 2024 31-May 2024

Quantlib creates the schedule correctly, but while calculating the Accrual using Fixed rate bond the number of days in denominator is incorrect .

Expected values for ACT/ ACT isma in first period 31- July - 30 April = 75 Days Denominator = 92 4 Denominator as of now = 75* 4

This is leading to wrong values for 1st period for accruals. Could you help ?

Schedule creation

ql.Schedule(accrualDate, MaturityDate, frequency,calendar, ql.Unadjusted, ql.Unadjusted, ql.DateGeneration.Forward,False,firstCouponDate)

accrued amount

fixedRateBond.accruedAmount()

boring-cyborg[bot] commented 5 months ago

Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it.

github-actions[bot] commented 3 months ago

This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.

lballabio commented 3 months ago

May you post some code to reproduce the problem, including how you create the bond? Thanks!

github-actions[bot] commented 1 month ago

This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.

github-actions[bot] commented 1 month ago

This issue was automatically closed because it has been stalled for two weeks with no further activity.