Bug(?) in interpolation of zero yields
Posted by Sadruddin Rejeb-4 on
URL: http://quantlib.414.s1.nabble.com/Bug-in-interpolation-of-zero-yields-tp11172.html
Hello everyone,
In ql/TermStructures/piecewiseflatforward.cpp, shouldn't the zeroYieldImpl be
a simple linear interpolation between the zero yield nodes? In that case, I
think there is a small bug, fixed by the following patch
171c171
< return (zeroYields_[n-1]*tn+forwards_[n]*(t-tn))/t;
---
> return (zeroYields_[n-1]*tn+zeroYields_[n]*(t-tn))/t;
Am I correct?
Regards,
Sad