Bug(?) in interpolation of zero yields

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug(?) in interpolation of zero yields

Sadruddin Rejeb-4
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


Reply | Threaded
Open this post in threaded view
|

Re: Bug(?) in interpolation of zero yields

Sadruddin Rejeb-4
Please ignore this mail.

On Thursday 29 June 2006 13:14, Sadruddin Rejeb wrote:

> 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
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> QuantLib-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev