public class Convention
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DATE_ROLL_ACTUAL
Date Roll Actual
|
static int |
DATE_ROLL_FOLLOWING
Date Roll Following
|
static int |
DATE_ROLL_MODIFIED_FOLLOWING
Date Roll Modified Following
|
static int |
DATE_ROLL_MODIFIED_FOLLOWING_BIMONTHLY
Date Roll Modified Following Bi-monthly
|
static int |
DATE_ROLL_MODIFIED_PREVIOUS
Date Roll Modified Previous
|
static int |
DATE_ROLL_PREVIOUS
Date Roll Previous
|
static int |
WEEKDAY_HOLS
Week Day Holiday
|
static int |
WEEKEND_HOLS
Week End Holiday
|
Constructor and Description |
---|
Convention() |
Modifier and Type | Method and Description |
---|---|
static int |
AddBusinessDays(int iDate,
int iNumDays,
java.lang.String strCalendar)
Add the specified Number of Business Days and Adjust According to the Calendar Set
|
static int |
Adjust(int iDate,
java.lang.String strCalendar,
int iAdjustMode)
Adjust the given Date in Accordance with the Adjustment Mode and the Calendar Set
|
static java.lang.String |
AvailableDC()
Get all available DRIP day count conventions
|
static int |
BusinessDays(int iStartDate,
int iEndDate,
java.lang.String strCalendar)
Calculate the Number of Business Days between the Start and the End Dates
|
static int |
DaysAccrued(int iStartDate,
int iEndDate,
java.lang.String strDayCount,
boolean bApplyEOMAdj,
ActActDCParams actactParams,
java.lang.String strCalendar)
Calculate the Days Accrued between 2 given Dates for the given Day Count Convention and the other
Parameters
|
static java.util.Set<java.lang.String> |
HolidayLocations()
Retrieve the set of holiday locations
|
static int |
Holidays(int iStartDate,
int iEndDate,
java.lang.String strCalendar)
Calculate the Number of Holidays between the Start and the End Dates
|
static java.util.List<java.lang.Integer> |
HolidaySet(int iStartDate,
int iEndDate,
java.lang.String strCalendar)
Calculate the Set of Holidays between the Start and the End Dates
|
static boolean |
Init(java.lang.String strCalendarSetLoc)
Initialize the day count basis object from the calendar set
|
static boolean |
IsHoliday(int iDate,
java.lang.String strCalendar)
Indicates whether the given Date is a Holiday in the specified Location(s)
|
static boolean |
IsHoliday(int iDate,
java.lang.String strCalendar,
int iHolType)
Indicate whether the given Date is a Holiday in the specified Location(s)
|
static int |
RollDate(int iDate,
int iRollMode,
java.lang.String strCalendarSet,
int iNumDaysToRoll)
Roll the given Date in accordance with the Roll Mode and the Calendar Set
|
static int[] |
WeekendDays(java.lang.String strCalendarSet)
Get the week end days for the given holiday calendar set
|
static double |
YearFraction(int iStartDate,
int iEndDate,
java.lang.String strDayCount,
boolean bApplyEOMAdj,
ActActDCParams actactParams,
java.lang.String strCalendar)
Calculate the Accrual Fraction in Years between 2 given Dates for the given Day Count Convention and
the other Parameters
|
public static final int DATE_ROLL_ACTUAL
public static final int DATE_ROLL_FOLLOWING
public static final int DATE_ROLL_MODIFIED_FOLLOWING
public static final int DATE_ROLL_MODIFIED_FOLLOWING_BIMONTHLY
public static final int DATE_ROLL_PREVIOUS
public static final int DATE_ROLL_MODIFIED_PREVIOUS
public static final int WEEKDAY_HOLS
public static final int WEEKEND_HOLS
public static final boolean Init(java.lang.String strCalendarSetLoc)
strCalendarSetLoc
- The calendar setpublic static final java.util.Set<java.lang.String> HolidayLocations()
public static final int[] WeekendDays(java.lang.String strCalendarSet)
strCalendarSet
- Holiday calendar setpublic static final java.lang.String AvailableDC()
public static final double YearFraction(int iStartDate, int iEndDate, java.lang.String strDayCount, boolean bApplyEOMAdj, ActActDCParams actactParams, java.lang.String strCalendar) throws java.lang.Exception
iStartDate
- Start DateiEndDate
- End DatestrDayCount
- Day Count ConventionbApplyEOMAdj
- Apply End-of-Month Adjustment (TRUE)actactParams
- ActActParamsstrCalendar
- Holiday Calendarjava.lang.Exception
- Thrown if the Accrual Fraction cannot be calculatedpublic static final int DaysAccrued(int iStartDate, int iEndDate, java.lang.String strDayCount, boolean bApplyEOMAdj, ActActDCParams actactParams, java.lang.String strCalendar) throws java.lang.Exception
iStartDate
- Start DateiEndDate
- End DatestrDayCount
- Day Count ConventionbApplyEOMAdj
- Apply End-of-Month Adjustment (TRUE)actactParams
- ActActParamsstrCalendar
- Holiday Calendarjava.lang.Exception
- Thrown if the Accrual Days cannot be calculatedpublic static final int RollDate(int iDate, int iRollMode, java.lang.String strCalendarSet, int iNumDaysToRoll) throws java.lang.Exception
iDate
- Date to be RollediRollMode
- Roll Mode (one of DR_ACT, DR_FOLL, DR_MOD_FOLL, DR_PREV, or DR_MOD_PREV)strCalendarSet
- Calendar Set to calculate the Holidays byiNumDaysToRoll
- The Number of Days to Rolljava.lang.Exception
- Thrown if the date cannot be rolledpublic static final boolean IsHoliday(int iDate, java.lang.String strCalendar, int iHolType)
iDate
- DatestrCalendar
- Location Calendar SetiHolType
- WEEKDAY_HOLS or WEEKEND_HOLSpublic static final boolean IsHoliday(int iDate, java.lang.String strCalendar)
iDate
- DatestrCalendar
- Location Calendar Setpublic static final int BusinessDays(int iStartDate, int iEndDate, java.lang.String strCalendar) throws java.lang.Exception
iStartDate
- Start DateiEndDate
- End DatestrCalendar
- Holiday Calendar Setjava.lang.Exception
- Thrown if it cannot be evaluatedpublic static final java.util.List<java.lang.Integer> HolidaySet(int iStartDate, int iEndDate, java.lang.String strCalendar)
iStartDate
- Start DateiEndDate
- End DatestrCalendar
- Holiday Calendar Setpublic static final int Holidays(int iStartDate, int iEndDate, java.lang.String strCalendar)
iStartDate
- Start DateiEndDate
- End DatestrCalendar
- Holiday Calendar Setpublic static final int Adjust(int iDate, java.lang.String strCalendar, int iAdjustMode)
iDate
- Date to be AdjustedstrCalendar
- Calendar Set to calculate the Holidays byiAdjustMode
- Adjustment Mode (one of DR_ACT, DR_FOLL, DR_MOD_FOLL, DR_PREV, or DR_MOD_PREVpublic static final int AddBusinessDays(int iDate, int iNumDays, java.lang.String strCalendar)
iDate
- Date to be AdjustediNumDays
- Number of Days to AddstrCalendar
- Calendar Set to calculate the Holidays by