# A question about dates generation

I am actually trying to strip Markit IR curves, following their specs here :

http://www.cdsmodel.com/cdsmodel/assets/cds-model/docs/Interest%20Rate%20Curve%20Specification%20-%20All%20Currencies%20(Updated%20November%208%202014)%20Final.pdf

I have questions about swaps, more specifically about the fixed/floating payment schedule generation, in this Markit/ISDA context (specialist are welcome !) :

• just to be sure : adding/substracting for instance $3$M to a date $dd/mm/yyyy$ means adding/substracting $3$ to $mm$ (and taking the remainder modulo $12$) and adjusting if needed, right ?

• is the generation done forward (for instance for a $3$M floating leg frequency, one adds $3$M to the settlement date to have the first floating payment date and iterate until the tenor maturity of the swap) or backward (one adds let's say $10$Y to the settlement the have the maturity and last floating payment date, and then from this date one moves backward substracting $3$M's from it) ? I guess the generation is done forward, and backward we would have broken periods issues that they don't discuss in the paper. Am I right ?

• whether it is backward or forward, do we generate dates by substracting or adding (let's say) $3$M's and then adjusting the whole series of obtained dates, or do we add/substract $3$M, then adjust (according to a given convention) then add/substract $3$M again and adjust again etc etc ?

The forwards/backwards will matter if there is a stub period. Typically it is done backwards though with the end-of-month convention. Also, the way to do it is to calculate all the accrual start/end dates as if there are no holidays and then do the adjustments. This way, all the payment dates will roughly be on the same day of the month except for non-business days and different months having different numbers of days etc. If you add the period then adjust and then add a period to this adjusted date, we can easily drift away from the intended accrual end dates - and by the end of a 30 year swap, you could find that there are only 70 days left in a 3M accrual period!

• Is the "convention" used to adjust a non-business day to a business day a convention of the same type than the convention used to adjust a "$28/02/2017+3$M" (as the date 28/05/2017 does not make sense) ? – ujsgeyrr1f0d0d0r0h1h0j0j_juj Apr 19 '17 at 21:26
• @ujsgeyrr1f0d0d0r0h1h0j0j_juj - yes - the convention is typically a modified following convention that is followed for converting to a business day. You may need to investigate the concept of "following", "modified following" which is the same as "following" except that it goes backwards if the next business day brings you to the next month. Also the end of month convention is important for getting accrual dates. If the swap settles on the last business day of a month, then all coupons must be set for the last business day of the month as well. – FinanceGuyThatCantCode Apr 19 '17 at 21:39
• So a swap settling on Feb 28, will have coupons on Aug 31 (weekends notwithstanding) instead of Aug 28. – FinanceGuyThatCantCode Apr 19 '17 at 21:39
• Actually I know all of this stuff, but I want to be sure of the generic names of the convention, as nothing is specified in Markit's paper, despite the fact that their IR curve bootstrapping is supposes to be used (for quotation) in the cds standard model. Typically the eom rule your rightly referring to is not even mentionned in Markit's papee I am linking to in my question... – ujsgeyrr1f0d0d0r0h1h0j0j_juj Apr 19 '17 at 22:01
• I guess that for every currency they implicitely use well known conventions for the swaps concerned. But is ISDA specifying these conventions ? (As swaps are OTCs as far as I know...) – ujsgeyrr1f0d0d0r0h1h0j0j_juj Apr 19 '17 at 22:03

This is really just to elaborate on other contributor's answers:

Generating the cash flow schedule is surprisingly complicated. As a general rule of thumb, the following dates are involved for a swap (though not all of them need to be specified):

• The trade date: This is the date on which the swap is traded, usually "today."
• The effective date: This is when the contract actually settles. For USD swaps, it is 2 business days after the trade date.
• The first interest payment date: This is the date when the first interest payment occurs. For the floating leg of a USD swap, this is usually 3 months after the effective date, though it could be longer than 3 months (long stub) or shorter than 3 months (short stub).
• The penultimate interest payment date: This is the last interest payment before the maturity date. The period between this date and the maturity date can also be longer or shorter than other periods.
• The maturity date: The day on which the final interest rate payment is made and the swap matures.

For most standard swaps, all you need is the trade date and the tenor/term. Using USD standard swap as an example, the cash flows can be generated as follows:

• With the effective date, the maturity date is the effective date + tenor of the swap. To do this date calculation, you also need to understand the "roll day." In this case, the roll day should be determined from the effective date:
• If "end-of-month roll" is off:
• If the effective date is MM-28-YYYY, then the roll day is 28, and the maturity date should also fall on the 28th.
• If the effective date is MM-31-YYYY, then the roll day is 31, and the maturity date should also fall on the 31st (if that's not possible, move it BACK to the end of the month).
• If "end-of-month roll" is on (default for US Treasuries):
• If effective date is month end, all dates in the schedule should also fall on month end.
• Otherwise, use the same rules above.
• The dates between effective date and maturity can be calculated relatively easily, by incrementally adding the payment period to the previous date, using the same roll day determined in the previous step. For floating leg of a USD swap, for example, start from effective date and incrementally add 3 months.
• Finally, go through all the dates again and adjust them for holidays and weekends as needed. USD swaps follow the "Modified Following" convention – if a date is a bad day (i.e., holiday/weekends), you move it to the next good day; unless the next good day is in the next month, in which case you move it backward to the previous good day.

In practice, you need to carefully read both the proper local market convention AND the actual agreement to determine the cash flow schedule.

• What convention handles how to calculate $30/10/2016 + 4$M ? I thought it was end of month (eom for short) convention, but eom convention handles how to perform the calculation when you start from an eom date, which is not the case here : here the starting date ($30/10/2016$) is not an eom date, and the "date" $30/02/2017$ doesn't even exist. Which convention handles this case ? – ujsgeyrr1f0d0d0r0h1h0j0j_juj Apr 20 '17 at 8:50
• As mentioned in the 2nd bullet in "end-of-month roll" is off, you'd move it back to 2/28/2017. – Helin Apr 20 '17 at 13:42
• I don't see why : for the "$30/10/2016 + 4$M" case, the "end-of month roll off" doesn't specify what to do with a date not being a 28 or a 31 (case of the $30/10/2016$) and the "end-of month roll on" then the "otherwise" (second point) sends us back to the "end-of month roll off" wihch we have seen doesn't cover the being a 30 case. – ujsgeyrr1f0d0d0r0h1h0j0j_juj Jun 28 '17 at 15:00

Swap dates are usually generated using some periodicity to maturity. All of these dates are generated first, then they are individually adjusted for holidays using a business day convention (e.g. modified following).

With this method there is no distinction between "backwards" or "forwards" because both ways produce the same dates.

• It matters if there is some stub period. – FinanceGuyThatCantCode Apr 19 '17 at 15:07