-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad interpolation ql.ZeroCurve #1797
Comments
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. |
I haven't looked closely into the calculation to see what happens, but after experimenting a bit it looks like the problem is Using act/365 or act/360 as day-count convention works as expected. |
The same issue is e.g. with |
Ok, found the issue—for a number of reasons (possibly different compounding etc), the zero rate is not returned directly from the interpolation but passes through a few conversions. The calculations don't work correctly for t=0, so there is a special case in the code for that. However, the check to trigger the special case is not for t==0 but for d == referenceDate. In this case, August 31 is not the reference date (August 30) so the code goes into the general case, but unfortunately t ==0 (because we're using 30/360) and this causes the calculations to fail. August 30 works because it goes into the special case, and September 1st works because t != 0. I'll change the check so that it detects this case. |
Moving the issue to the main repo because the problem is in the underlying C++ code. |
Fixed by #1798, it will be in version 1.32 |
There seems to be a wrong interpolation in ql.ZeroCurve, returning zeroRate = 0.0 instead of a correct value.
I define a curve that has two edge points:
If I retrieve rate for 2023-08-31 I get rate = 0.0, which is wrong:
If I do
or
I get 0.02. Not clear where the singularity at
ql.Date(31, 8, 2023)
comes from.The text was updated successfully, but these errors were encountered: