Login  Register

Compounded schedule in IR/Compounded Swap

Posted by Anne Noir on Jan 06, 2016; 10:05am
URL: http://quantlib.414.s1.nabble.com/Compounded-schedule-in-IR-Compounded-Swap-tp17237.html

I am trying to model a compounded swap in quantlib. Theoretically, the index in the example below is monthly and the payment frequency is 6 monthly so there should be 6 fixings within one period. Why dont i see those fixings when printing the schedule? Or is the modelling of a compounding swap not possible in this way?

Thanks,

Anne

 

leg = 'Floating'

startdate = Date(20,January,2016)

fixingDays = 2

nominal = 5000000

forecastTermStructure = RelinkableYieldTermStructureHandle()

index = USDLibor(Period(1,Months),forecastTermStructure);

floatingLegDayCounter = index.dayCounter()

calendar = TARGET()

 

if leg == 'Floating':

    floatingSchedule = Schedule(startdate, Date(20,January,2021), Period(6,Months) , calendar, ModifiedFollowing, ModifiedFollowing, DateGeneration.Forward, False)

 

if leg=='Floating':

    fltSched = ""

    nominals1 =[nominal for x in floatingSchedule]

    nom = nominals1[:1

    

    floatingrates = IborLeg(nom,floatingSchedule,index,floatingLegDayCounter)·

    for c in floatingrates:

        if leg == 'Floating':

            qdat = c.date()

            coupon11 = as_floating_rate_coupon(c)·

            print "Fixing date: " + str(coupon11.fixingDate())

            tmp = str(startdate.dayOfMonth())+'.'+ str(startdate.month())+'.'+ str(startdate.year())+'-'+str(qdat.dayOfMonth())+'.'+ str(qdat.month())+'.'+ str(qdat.year())+':  TBD'+''

            print tmp

            startdate = calendar.advance(c.date(),0,Days);

 


------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users