domokane / FinancePy

A Python Finance Library that focuses on the pricing and risk-management of Financial Derivatives, including fixed-income, equity, FX and credit derivatives.
GNU General Public License v3.0
2.16k stars 322 forks source link

Change Zero Bond date convention to the same as ACT_ACT_ISDA #145

Closed DominicHong closed 2 years ago

DominicHong commented 2 years ago

Hi, Dominic It seems to me that it would be better to use the ACT_ACT_ISDA convention for Zero Coupon Bond, in case that the period crosses a leap year and a non-leap-year. Do you mind if I change the DayCountTypes.ZERO algorithm in year_frac() to ACT_ACT_ISDA ? ################## On the other hand, I am considering calculating the accrued interest of a Zero Coupon Bond. It's a convention in China that the accrued_interest of zero-coupon bond = (principal - issue price)*(settlement_date - issue_date)/(maturity_date - issue_date) If we adopt this convention, we need to set the issue_price of the bond. What's your opinion? I'll be working on it if you agree.