Re: Formula for the discount of a yield curve?
Posted by
Piter Dias-4 on
URL: http://quantlib.414.s1.nabble.com/Formula-for-the-discount-of-a-yield-curve-tp6098p6099.html
Mihai,
In your case (based on the code, settlement in D+0, Rate object, etc...) simple interest rates is used:
Df = 1 / (1+ 90/365 * 100%) = 0.802197802
>> Rate d1Quote=1.0;
In QuantLib when you use "Rate" it is probably simple interest rate. InterestRate class is used for more complex interest rate setup. I can't guarantee this rule will work 100% of times, but in most of the code I saw it works.
You should take a look at InterestRate code to learn how to calculate the types covered by QuantLib.
Regards,
_____________________
Piter Dias
[hidden email]
http://www.piterdias.com------------------------------------------------------------------------------
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