Posted by
Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/porting-from-FinCad-to-Quantlib-tp6776p6777.html
You'll want to look at the Bond class (see
<
http://quantlib.org/reference/class_quant_lib_1_1_bond.html>).
In particular, the cashflows() class returns a vector of CashFlow
objects that you can ask for their dates and amounts. To see how to
instantiate a bond and the parameters you can pass, see the classes
inherited from Bond (just click on them in the inheritance diagram on
the page linked above). Ex-dividend days are not yet supported, but the
other features should be there; you might have to work a bit to get them
(for instance, you'll have to define a custom calendar if you want
Saturday to be a business day).
Luigi
On Fri, 2011-09-16 at 12:11 +0000, graybark2 wrote:
> I just started with QuantLib. I am trying to find QuantLib class/function that
> can match functionality of FinCad function
> aaBond4_cf or similar. FinCad doc states that aaBond4_cf:
>
> "Calculate the dates and cash flows for a generic level coupon bond (allows
> redemption, allows ex-dividend days as market days, switch for handling accrued
> prior to dated date, allows Sat. as business day, allows bus/252)."
>
> My question is:
>
> Does QuantLib has something similar to this and if it does then what is the
> class/function name.
>
> Thanks.
>
>
> ------------------------------------------------------------------------------
> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
>
http://p.sf.net/sfu/rim-devcon-copy2> _______________________________________________
> QuantLib-users mailing list
>
[hidden email]
>
https://lists.sourceforge.net/lists/listinfo/quantlib-users--
Hanlon's Razor:
Never attribute to malice that which is adequately explained
by stupidity.
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users