Re: Simple Expiration Date Handling

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Simple-Expiration-Date-Handling-tp5105p5113.html

On Fri, 2006-10-20 at 18:12 +0200, Ferdinando Ametrano wrote:
> If the expiry day just rolls up to the next business day, what about:
> static Date fridayAfterThirdThursday(Calendar c, Month m, Year y) {
>     Date thirdThursday = nthWeekday(3, Thursday, m, y);
>     Date result = nextWeekday(thirdThursday, Friday);
>     result = c.adjust(result, Following);
> }
>
> if this is what you are looking for I can add it to QuantLib.

Are you going to add a static method to Date for each country
convention? You better make it a separate function or class...

Luigi


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

Never mistake motion for action.
-- Ernest Hemingway