Posted by
Piter Dias-4 on
URL: http://quantlib.414.s1.nabble.com/calculating-time-factor-of-a-cashflow-tp7739p7743.html
Khanh
> Thank you for your answer. Could you elaborate a little more? I can't
> establish a "connection" between yearFraction() with the Matlab's
> description of TimeFactor.
Please take a look at the PV formula where TFactor is explained. The
denominator in that formula looks like the code below, from
interestrate.cpp:
case Compounded:
return std::pow(1.0+r_/freq_, freq_*t);
Comparing the two formulas you can see that TFactor = freq_*t, where t =
yearFraction.
You can check the compoundFactor methods of InterestRate class in order to
understand how yearFraction (method of DayCounter class) is used.
Regards,
-------------------------
Piter Dias
[hidden email]
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users