From: Luigi B. <lui...@gm...> - 2010-01-20 14:51:04
|
On Wed, 2010-01-20 at 10:33 -0300, MN wrote: > When looking at the Mathworks link ... their EndMonthRule rule caught my > attention. They say "This rule applies only when Maturity is an end-of-month > date for a month having 30 or fewer days". Is this really correct? How is > this implemented in Quantlib? I think it's correct, in the sense that if the the maturity is the 31st of the month, EndMonthRule=0 and EndMonthRule=1 are the same (0 = always on the 31st, and if there's no such day or if it's a holiday, go on the last actual day---which is the same as case 1.) Instead, if the maturity is on, say, June 30th, you want to specify whether it rolls on the 30th of each month or the end of each month, so you look at the parameter (in the Mathworks link, "this rule applies" means "we take into account the value of the parameter".) You can see this as "the rule is only applied for 30-day months" (which in a way is true, since for the others you roll on the 31st---which is the same as the end) or as "the rule is always applied" (which in another way is also true, since you roll on the end---which is the same as the 31st.) QuantLib takes the second view (i.e., there's no check for month length.) Luigi -- To err is human -- to blame it on a computer is even more so. -- unknown |