How Schedule Tenor Sets Payment Dates in QuantLib
Summary
In QuantLib, the tenor passed to a Schedule specifies the spacing used to generate dates between the schedule’s start and end dates. The discussion applies this to a floating-rate bond that references quarterly EURIBOR but pays every two months: the index tenor describes the reference rate, while the schedule tenor determines the payment-date frequency. Setting the schedule tenor to two months therefore generates a schedule at two-month intervals.
An example uses a six-month tenor and calendar and business-day conventions to generate dates, including a final stub period ending before the regular interval. This illustrates that generated dates depend on more than tenor, including the start and end dates and schedule rules. The answer also points to general design-pattern material for learning about class interfaces, but offers no comprehensive reference for QuantLib argument definitions.
Key ideas
- A Schedule tenor sets the regular interval between generated schedule dates.
- The index tenor and payment schedule frequency are separate choices for a floating-rate bond.
- A two-month payment interval can be represented by a two-month schedule tenor.
- Generated dates also depend on date bounds, calendars, business-day conventions, and generation rules.
Tags
Full text
# Definition of "tenor" argument in QuantLib's Schedule class object
# Definition of "tenor" argument in QuantLib's Schedule class object
In QuantLib an object of class Schedule takes const Period `&tenor` as argument.
I would like to know what that `tenor` is supposed to be.
Let I would like to price a floating rate bond (that is, to use the `Schedule` object as argument for FloatingRateBond object) which pays quarterly EURIBOR every two months: from what I've read so far, the quarterly EURIBOR (forward) rate is set through an IborIndex class object while I'm not sure of how I can set the payment frequency.
Maybe I should use that `Schedule` argument (`tenor = "2M"` here)?
P.S.: in order to avoid too many questions regarding QuantLib here, I'm looking for some reference which explain topics like the one of this question, that is, the natural language definition of classes' and methods' arguments. Can you suggest me any source suitable to this purpose?
## Answer by zuiqo (score 3, accepted)
https://quant.stackexchange.com/a/8944
Tenor is just a different term for time to maturity. A schedule is generated from startDate and endDate in combination with a time to maturity and some info on calendar specifics.
Here is an example from Dimitri Reiswich' Presentation from quantlib.com, I hope it makes the use of schedule clearer to you:
```
void testingSchedule1 (){
Date begin (30 , September ,2009) , end (15 , Jun ,2012);
Calendar myCal = Japan ();
BusinessDayConvention bdC= BusinessDayConvention ( Following );
Period myTenor (6, Months );
DateGeneration :: Rule myRule = DateGeneration :: Forward ;
Schedule mySched (begin ,end , myTenor ,myCal ,bdC ,bdC , myRule , true );
std :: vector <Date > finalSched = mySched . dates ();
BOOST_FOREACH ( Date d, finalSched ) std :: cout << d << std :: endl ;
}
```
which generates the following dates:
```
September 30th, 2009
March 31st, 2010
September 30th, 2010
March 31st, 2011
September 30th, 2011
March 30th, 2012
June 15th, 2012
```
As you can see, your assumption is actually right - the schedule contains all the payment dates. The Input you need to give it simply
```
Period myTenor (2, Months );
```
General info on classes
If you are looking for something that specifically deals with design patterns for finance, I recommend Mark Joshis Book on that topic. But, be warned, its pretty hard for C++ Newbies, the finance part is actually quite easy. Otherwise, I think you should look into Design Patterns in general, unfortunately the only book I've actually read about those is the Heads First book, I really cannot recommend those provided you're older than 12.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.