Posted by
Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/strange-bond-behavior-tp4348p4354.html
On 1/13/06,
[hidden email] <
[hidden email]> wrote:
> Thank for pointing that out. I might misunderstood the convention
> here. I was just following the example in
> /QuantLib/test-suite/bonds.cpp:
>
> FixedCouponBond bond(issue, dated, maturity, settlementDays,
> std::vector<Rate>(1, coupons[k]),
> frequencies[l], bondDayCount,
> calendar, convention, redemption);
Oh, I see. In the std::vector constructor that would be the number of
elements, but in Python it is not required---to build a list, one just
enumerates its elements. For a bond paying 10%, you can just write
coupon = [0.1]
or if you want coupons with different rates,
coupon = [0.1, 0.08, 0.04]
Luigi