[ quantlib-Feature Requests-1469488 ] Unadjusted month end business day convention

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ quantlib-Feature Requests-1469488 ] Unadjusted month end business day convention

SourceForge.net
Feature Requests item #1469488, was opened at 2006-04-12 22:12
Message generated for change (Comment added) made by lballabio
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=362740&aid=1469488&group_id=12740

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Luigi Ballabio (lballabio)
Summary: Unadjusted month end business day convention

Initial Comment:
There is no business day convention available that
conforms to the convention of the US 2 year treasury
note - which is the last day of the month unadjusted
for weekends or holidays.

I corrected this for myself by adding
UnadjustedMonthEnd to the BusinessDayConvention and
changing the Calendar::adjust function by replacing:

  if (c == Unadjusted)
    return d;

with:

  if(c == UnadjustedMonthEnd && origin != Date() &&  
isEndOfMonth(origin))
    return Date::endOfMonth(d);

  if (c == Unadjusted || c == UnadjustedMonthEnd)
    return d;


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

Comment By: Luigi Ballabio (lballabio)
Date: 2006-05-04 14:48

Message:
Logged In: YES
user_id=75450

The feature is now implemented in CVS and will be available in the
next library release.


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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=362740&aid=1469488&group_id=12740