Closed davidt922 closed 1 month 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.
You're explicitly setting growthOnly = True
. This causes the final coupon to only pay the inflation. Use False
instead.
Understood, I was thinking this parameter was to limit the cupons to never be lower than the previous value.
Thank you so much for the clarification
El dt., 15 d’oct. 2024, 16:45, Luigi Ballabio @.***> va escriure:
You're explicitly setting growthOnly = True. This causes the final coupon to only pay the inflation. Use False instead.
— Reply to this email directly, view it on GitHub https://github.com/lballabio/QuantLib/issues/2095#issuecomment-2414140389, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHU7NU4SF263FVBKK5ZHPODZ3UTARAVCNFSM6AAAAABP7HKNMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJUGE2DAMZYHE . You are receiving this because you authored the thread.Message ID: @.***>
This is a working code in python for Quantlib >=1.30:
When executing you will get the following:
Date: October 2nd, 2008, Amount: 2.074783025193984 Date: October 2nd, 2009, Amount: 2.039487179487179 Date: October 4th, 2010, Amount: 2.10078312627201 Date: October 3rd, 2011, Amount: 2.1610340159526076 Date: October 2nd, 2012, Amount: 2.232253620324762 Date: October 2nd, 2013, Amount: 2.2964239421360775 Date: October 2nd, 2014, Amount: 2.3771955783605696 Date: October 2nd, 2015, Amount: 2.4620125358043627 Date: October 3rd, 2016, Amount: 2.5577482349514837 Date: October 2nd, 2017, Amount: 2.6514547175785808 Date: October 2nd, 2018, Amount: 2.7522468704257936 Date: October 2nd, 2019, Amount: 2.86461569336743 Date: October 2nd, 2020, Amount: 2.9886229182175446 Date: October 2nd, 2020, Amount: 45.388160089218154
As you can see last 2 cashflows have to be last coupon and notional, but notional is lower than 100.
The inflation coeficient as of October 2nd 2022 is: 2.9886229182175446/2.05 = 1.45786483815
So last cashflow (Notional + inflation) should be 1.45786483815 * 100 = 145.786483815 (I'm getting only the inflation part 45.786483815 but not the notional itself "100"
Can you check this.
Thank you