Class BusinessDayConventions


  • public final class BusinessDayConventions
    extends java.lang.Object
    Constants and implementations for standard business day conventions.

    The purpose of each convention is to define how to handle non-business days. When processing dates in finance, it is typically intended that non-business days, such as weekends and holidays, are converted to a nearby valid business day. The convention, in conjunction with a holiday calendar, defines exactly how the adjustment should be made.

    • Field Detail

      • NO_ADJUST

        public static final BusinessDayConvention NO_ADJUST
        The 'NoAdjust' convention which makes no adjustment.

        The input date will not be adjusted even if it is not a business day.

      • FOLLOWING

        public static final BusinessDayConvention FOLLOWING
        The 'Following' convention which adjusts to the next business day.

        If the input date is not a business day then the date is adjusted. The adjusted date is the next business day.

      • MODIFIED_FOLLOWING

        public static final BusinessDayConvention MODIFIED_FOLLOWING
        The 'ModifiedFollowing' convention which adjusts to the next business day without crossing month end.

        If the input date is not a business day then the date is adjusted. The adjusted date is the next business day unless that day is in a different calendar month, in which case the previous business day is returned.

      • MODIFIED_FOLLOWING_BI_MONTHLY

        public static final BusinessDayConvention MODIFIED_FOLLOWING_BI_MONTHLY
        The 'ModifiedFollowingBiMonthly' convention which adjusts to the next business day without crossing mid-month or month end.

        If the input date is not a business day then the date is adjusted. The month is divided into two parts, the first half, the 1st to 15th and the 16th onwards. The adjusted date is the next business day unless that day is in a different half-month, in which case the previous business day is returned.

      • PRECEDING

        public static final BusinessDayConvention PRECEDING
        The 'Preceding' convention which adjusts to the previous business day.

        If the input date is not a business day then the date is adjusted. The adjusted date is the previous business day.

      • MODIFIED_PRECEDING

        public static final BusinessDayConvention MODIFIED_PRECEDING
        The 'ModifiedPreceding' convention which adjusts to the previous business day without crossing month start.

        If the input date is not a business day then the date is adjusted. The adjusted date is the previous business day unless that day is in a different calendar month, in which case the next business day is returned.

      • NEAREST

        public static final BusinessDayConvention NEAREST
        The 'Nearest' convention which adjusts Sunday and Monday forward, and other days backward.

        If the input date is not a business day then the date is adjusted. If the input is Sunday or Monday then the next business day is returned. Otherwise the previous business day is returned.

        Note that despite the name, the algorithm may not return the business day that is actually nearest.