Re: Formula for the discount of a yield curve?

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Formula-for-the-discount-of-a-yield-curve-tp6098p6103.html

On Wed, 2011-01-26 at 07:00 -0300, Piter Dias wrote:
> Your code had just one curve node, 90 days.

That might also be the problem.  If you're passing 90 days as the tenor,
the deposit-rate helper takes it to be 90 business days, not calendar
days (the reason for this is that when using days, one is almost always
specifying deposits such as the overnight, spot-next etc. for which you
want this kind of behavior.)  Thus, if you pass 90 days, you'll get more
than 4 months, instead of the 3 you expected.  If you want 3 months,
you'll have to pass three months.

This said, if you want to check for consistency, you should call your
curve's nodes() method, which returns the vector of (date,discount)
pairs which is interpolated to return the results.  This way, you can
see exactly what dates are being used (which might move, due to holiday
adjustments) and what discounts are calculated for those dates based on
the input rates.

Luigi


--

Always code as if the guy who ends up maintaining your code will be
a violent psychopath who knows where you live.
-- Martin Golding



------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users