Login  Register

Re: qlIborLeg in QuantLibXL returns all forward floating coupons zero!

Posted by chrarv on Oct 14, 2016; 2:37pm
URL: http://quantlib.414.s1.nabble.com/qlIborLeg-in-QuantLibXL-returns-all-forward-floating-coupons-zero-tp17732p17805.html

Hello
Apart the small excel example I have posted I have tried to price a Simple Vanilla amortizing Swap both in C++ and python using the exported bindings
I have remarked and report here! that in both cases (C++ and Python) IborLeg class returns 0 cash flows all the way across the schedule

For your reference in Python I report small piece of code that creates the IborLeg to be passed to the swap class

Assuming the 6M curve is build Euribor6M_curve_c

1.
euribor6M_calc=ql.Euribor6M(ql.YieldTermStructureHandle(Euribor6M_curve_c))



2.

amort_notional= [66552649.72,63806870.94,
           61784144.40,60029495.50,
           57468704.81,55759411.61,
           55712615.57,55404932.02,
           54947952.17,54944085.09,
           54940218.01,54936350.93,
           54926643.75,54582525.94,
           54206621.58,53841099.95,
           53481292.21,53025949.56,
           52572181.43,52084605.00,
           51560753.71,50964715.27,
           50345757.91,49696416.56,
           48995690.04,47915847.64,
           47111497.45,46247761.48,
           45362609.91,44468182.47,
           43569117.10,42996253.76,
           42186855.80,40817534.20,
           39350991.83,37780135.74,
           36955677.69,34646716.19,
           31723527.74,27859142.47,
           24338697.33,21105866.33,
           17461157.37,13352405.80,
           8720840.27,5174670.91
           ]



fixed_coupon_ms=[0.047657,0.047657,0.047657,
              0.047657,0.047657,0.047657,
              0.047657,0.047657,0.047657,
              0.047657,0.047657,0.047657,
              0.047657,0.047657,0.047657,
              0.047657,0.047657,0.047657,
              0.047657,0.047657,0.047657,
              0.047657,0.047657,0.047657,
              0.047657,0.047657,0.047657,
              0.047657,0.047657,0.047657,
              0.047657,0.047657,0.047657,
              0.047657,0.047657,0.047657,
              0.047657,0.047657,0.047657,
              0.047657,0.047657,0.047657,
              0.047657,0.047657,0.047657,
              0.047657]


swap_float_leg=ql.IborLeg(amort_notional,
                              MS_Float_schedule,
                              euribor6M_calc,
                              ql.Actual360(),
                              ql.ModifiedFollowing,
                              [fixingDays],
                              [0],              # floors
                              [0],              # Gearings
                              [0],              # Spreads
                              [0],              # caps
                              False)

the above returns all the coupons as zeros
Is that finally a BUG??

Please advise

Thanks in advance for your help
Christos