public final class BusinessDayConventions extends Object
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.
| Modifier and Type | Field and Description |
|---|---|
static BusinessDayConvention |
FOLLOWING
The 'Following' convention which adjusts to the next business day.
|
static BusinessDayConvention |
MODIFIED_FOLLOWING
The 'ModifiedFollowing' convention which adjusts to the next business day without crossing month end.
|
static BusinessDayConvention |
MODIFIED_FOLLOWING_BI_MONTHLY
The 'ModifiedFollowingBiMonthly' convention which adjusts to the next business day without
crossing mid-month or month end.
|
static BusinessDayConvention |
MODIFIED_PRECEDING
The 'ModifiedPreceding' convention which adjusts to the previous business day without crossing month start.
|
static BusinessDayConvention |
NEAREST
The 'Nearest' convention which adjusts Sunday and Monday forward, and other days backward.
|
static BusinessDayConvention |
NO_ADJUST
The 'NoAdjust' convention which makes no adjustment.
|
static BusinessDayConvention |
PRECEDING
The 'Preceding' convention which adjusts to the previous business day.
|
public static final BusinessDayConvention NO_ADJUST
The input date will not be adjusted even if it is not a business day.
public static final BusinessDayConvention FOLLOWING
If the input date is not a business day then the date is adjusted. The adjusted date is the next business day.
public static final BusinessDayConvention MODIFIED_FOLLOWING
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.
public static final BusinessDayConvention MODIFIED_FOLLOWING_BI_MONTHLY
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.
public static final BusinessDayConvention PRECEDING
If the input date is not a business day then the date is adjusted. The adjusted date is the previous business day.
public static final BusinessDayConvention MODIFIED_PRECEDING
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.
public static final BusinessDayConvention NEAREST
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.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.