Login  Register

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

Posted by Luigi Ballabio on Oct 15, 2016; 12:01pm
URL: http://quantlib.414.s1.nabble.com/qlIborLeg-in-QuantLibXL-returns-all-forward-floating-coupons-zero-tp17732p17806.html

Hello Christos,
    thanks for providing the Python code. That really makes me easier to see what's happening.

No, it's not a bug. You're passing vectors of zeros for the gearing, the caps and the floors. This means that you're multiplying the rate by zero (the gearing) and furthermore, you're forcing it to be between 0 and 0 (the cap and floor).  If you want the default values (gearing=1, no cap, no floor) you need to pass the empty list [] in Python and possibly an empty cell in Excel.

Hope this helps,
    Luigi


On Fri, Oct 14, 2016 at 6:03 PM chrarv <[hidden email]> wrote:
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



--
View this message in context: http://quantlib.10058.n7.nabble.com/qlIborLeg-in-QuantLibXL-returns-all-forward-floating-coupons-zero-tp17732p17805.html
Sent from the quantlib-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users