Schedule and Business calendar functions

This xll provides general schedule and busness calendar related functions. The library currently supports business calendars for US, UK, SWITZERLAND, JAPAN, TARGET and SINGAPORE. Another calendar option called "WEEKDAYS", which is a weekday only calendar, can be used along with the input array of holidays (see below in the relevant function definition) to implement other business calendars. Combination business calendars can be arrived at by providing calendar names as a single string seperated by commas. e.g. A US and JAPAN business calendar combination can be arrived at by providing "US,JAPAN" as the input to the formulae below.

Synoposis - Available functions
sched_BusinessDayCount  

Description : Returns the number of business days between the input date. Inclusive of start date but exclusive of end date.

Input parameters

Input variable Example Description
startDate 5/31/2009 Start date
endDate 5/31/2010 End date
holidayCalendar TARGET,JAPAN Calendar string
xtraHolidays - List of dates to be added
sched_IsBusinessDay  

Description : Performs the business day check.

Input parameters

Input variable Example Description
iDate 5/31/2010 Input date
holidayCalendar TARGET,JAPAN Calendar string
xtraHolidays - List of dates to be added
sched_plusBusinessDays  

Description : Adds Business days to the input date.

Input parameters

Input variable Example Description
iDate 5/31/2010 Input date
numberOfDays 4 Number of business days to be added.
holidayCalendar TARGET,JAPAN Calendar string
xtraHolidays - List of dates to be added
sched_Holidays  

Description : Displays non business days for a given calendar. Excludes regular saturdays and sundays.

Input parameters

Input variable Example Description
startDate 5/31/2009 Start date
endDate 5/31/2010 End date
holidayCalendar TARGET,JAPAN Calendar string
sched_Schedule  

Description : Generates schedule for a given set of parameters.

Input parameters

Input variable Example Description
effective_date 5/20/2007 Effective date
first_regular_schedule_date 7/20/2007 First regular schedule date
last_regular_schedule_date 10/20/2009 Last regular schedule date
End date 12/20/2009 Maturity
rollDay 20 Roll day
tenor 1M 1M,3M,6M,1Y,2Y etc.
ctrl u Control 'u' for unadjusted, 'm' for modfollowing, 's' succeeding and 'p' for preceeding
holidayCalendar TARGET,JAPAN Calendar string
sched_DCF  

Description : Calculates DCF given the day count convention. Supported conventions are Act/365F, Act/360, Act/365A, Act/365L, NL/365, 30/360 ISDA, 30E/360, 30E+/360, 30/360 German, 30/360 US and Act/Act.

Input parameters

Input variable Example Description
period_start_date 5/31/2009 Period start date
period_end_date 7/31/2009 Period end date
dayCountConvention Act/Act Day count convention
sched_discountFactor  

Description : Calculates Discount factor given the day count convention. Supported conventions are Act/365F, Act/360, Act/365A, Act/365L, NL/365, 30/360 ISDA, 30E/360, 30E+/360, 30/360 German, 30/360 US and Act/Act.

Input parameters

Input variable Example Description
spotRate 6.50% Spot rate
period_start_date 5/31/2009 Period start date
period_end_date 7/31/2009 Period end date
dayCountConvention Act/Act Day count convention
sched_forwardRate  

Description : Calculates form forward rate given the spot rates. Supported conventions are Act/365F, Act/360, Act/365A, Act/365L, NL/365, 30/360 ISDA, 30E/360, 30E+/360, 30/360 German, 30/360 US and Act/Act.

Input parameters

Input variable Example Description
refDate 5/20/2009 Date on which the forward rate needs to be calculated.
spotRate1 6.50% Spot rate of the first tenor
maturity1 8/20/2009 maturity date for the first tenor
spotRate2 6.60% Spot rate of the second tenor
maturity2 11/20/2009 maturity date for the second tenor
dayCountConvention Act/Act Day count convention
sched_Tenor2Month  

Description : Converts tenor to month.

Input parameters

Input variable Example Description
tenor 1M Tenor
sched_previousBusinessDay  

Description : Returns the previous business day.

Input parameters

Input variable Example Description
iDate 5/12/2009 Input date
holidayCalendar TARGET,JAPAN Calendar string
xtraHolidays - List of holidays to be added
sched_nextBusinessDay  

Description : Returns the next business day.

Input parameters

Input variable Example Description
iDate 5/12/2009 Input date
holidayCalendar TARGET,JAPAN Calendar string
xtraHolidays - List of holidays to be added
sched_LastBusDayOfMonth  

Description : Returns the the last business day for the month.

Input parameters

Input variable Example Description
iDate 5/12/2009 Input date
holidayCalendar TARGET,JAPAN Calendar string
xtraHolidays - List of holidays to be added
sched_plusMonths  

Description : This function adds required number of months to a calendar date.

Input parameters

Input variable Example Description
iDate 5/12/2009 Input date
iMonths 2 Number of months to be added
sched_endOfMonth  

Description : This function returns last calendar day of the month.

Input parameters

Input variable Example Description
iDate 5/12/2009 Input date
Requirements