Menu

#173 Schedule does not include termination date

None
closed-fixed
nobody
None
5
2017-12-05
2014-10-01
Cathie Jin
No

The maturity date of a CDS contract is unadjusted and included in the last coupon period. The FixedRateCoupon doesn't differentiate the last coupon period from the rest.

For example, a quarterly paying 1-year CDS contract on Sept 30, 2014 maturing on Dec 20th, 2015 have the following cash flow from FixedRateCoupon. The last period is missing a day.

Payment DateAccural StartAccrual EndAccrual Days
December 22nd, 2014September 30th, 2014December 22nd, 201483
March 20th, 2015December 22nd, 2014March 20th, 201588
June 22nd, 2015March 20th, 2015June 22nd, 201594
September 21st, 2015June 22nd, 2015September 21st, 201591
December 21st, 2015September 21st, 2015December 20th, 201590

I used following to create the schedule for CreditDefaultSwap:

Schedule cdsSchedule =
        MakeSchedule().from(effectiveDate).to(maturityDate)
                      .withFrequency(Quarterly)
                      .withCalendar(calendar)
                      .withConvention(Following)
                      .withTerminationDateConvention(Unadjusted)
                      .withNextToLastDate(maturityDate);

Please advice if QuantLib has a special handling on CreditDefaultSwap cash flow generation that I'm missing.

Discussion

  • Luigi Ballabio

    Luigi Ballabio - 2014-10-03

    What do you mean when you say that "the last period is missing a day"? Should the dates be different, or should an additional day be counted for the same dates?

     
  • Cathie Jin

    Cathie Jin - 2014-10-03

    the last period should be 91 days.

    12/20/2015 - 9/21/2015 + 1 = 91

     
  • Luigi Ballabio

    Luigi Ballabio - 2014-10-03

    Ok. The day-count convention is act/360, right? So it's just a matter of adding one day and there won't be any other strange calculations going on?

     
  • Cathie Jin

    Cathie Jin - 2014-10-03

    That's all. Adding 1 day to last period with terminating date unadjusted. I don't think it matters what day count it is.

     
  • Aparicio-Navarro Jose

    As I mentioned on Github, can you please check pcaspers branch 'CDS' to check you agree with what is done there? The aim of the branch is to replicate the ISDA standard engine and this point among others is dealt with there.
    Thank you

     
  • Luigi Ballabio

    Luigi Ballabio - 2017-12-05

    This should now be fixed by the work on the ISDA engine.

     
  • Luigi Ballabio

    Luigi Ballabio - 2017-12-05
    • status: open --> closed-fixed
    • Group: -->
     

Log in to post a comment.

MongoDB Logo MongoDB