Calendar

Overview

Calendar related functions.

Function List

qlCalendarAddHoliday ()
qlCalendarAdjust ()
qlCalendarAdvance ()
qlCalendarBusinessDaysBetween ()
qlCalendarEndOfMonth ()
qlCalendarHolidayList ()
qlCalendarIsBusinessDay ()
qlCalendarIsEndOfMonth ()
qlCalendarIsHoliday ()
qlCalendarName ()
qlCalendarRemoveHoliday ()

Function Documentation

qlCalendarAddHoliday

void returnValue
qlCalendarAddHoliday(
string calendar
long Date
any Trigger)
Description:

adds an holiday to the given calendar.

Supported Platforms:

Excel, Calc

Parameters
calendarID of Enumeration of class QuantLib::Calendar
Datedate.
Triggerdependency tracking trigger

qlCalendarAdjust

vector<long> returnValue
qlCalendarAdjust(
string calendar
vector<long> Date
string BusinessDayConvention
any Trigger)
Description:

Adjusts a non-business day to the appropriate near business day according to a given calendar with respect to the given convention.

Supported Platforms:

Excel, Calc

Parameters
calendarID of Enumeration of class QuantLib::Calendar
Datedate to be adjusted.
BusinessDayConventionrolling convention. Default value = Following.
Triggerdependency tracking trigger

qlCalendarAdvance

vector<long> returnValue
qlCalendarAdvance(
string calendar
long StartDate
vector<string> Period
string BusinessDayConvention
bool EndOfMonth
any Trigger)
Description:

advances a date according to a given calendar.

Supported Platforms:

Excel

Parameters
calendarID of Enumeration of class QuantLib::Calendar
StartDatestart date to be advanced.
Periodperiod(s) to advance (e.g. 2D for two days , 3W for three weeks, 6M for six months, 1Y for one year).
BusinessDayConventionrolling convention. Default value = Following.
EndOfMonthflag to enforce end of month convention. Default value = false.
Triggerdependency tracking trigger

qlCalendarBusinessDaysBetween

vector<long> returnValue
qlCalendarBusinessDaysBetween(
string calendar
vector<long> FirstDate
long LastDate
bool IncludeFirst
bool IncludeLast
any Trigger)
Description:

Returns the number of business days between two dates.

Supported Platforms:

Excel, Calc

Parameters
calendarID of Enumeration of class QuantLib::Calendar
FirstDatefirst date of the period.
LastDatelast date of the period.
IncludeFirstinclude the first date when counting business days. Default value = false.
IncludeLastinclude the last date when counting business days. Default value = false.
Triggerdependency tracking trigger

qlCalendarEndOfMonth

vector<long> returnValue
qlCalendarEndOfMonth(
string calendar
vector<long> Date
any Trigger)
Description:

returns the last business day in the given calendar of the month to which the given date belongs.

Supported Platforms:

Excel, Calc

Parameters
calendarID of Enumeration of class QuantLib::Calendar
Datedate.
Triggerdependency tracking trigger

qlCalendarHolidayList

vector<long> returnValue
qlCalendarHolidayList(
string Calendar
long FromDate
long ToDate
bool IncludeWeekEnds
any Trigger)
Description:

returns the holidays in a period between two dates according to a given holiday calendar.

Supported Platforms:

Excel, Calc

Parameters
CalendarCalendar to use for holiday determination.
FromDatefirst date of the period.
ToDatelast date of the period.
IncludeWeekEndsinclude week-end as holidays. Default value = false.
Triggerdependency tracking trigger

qlCalendarIsBusinessDay

vector<bool> returnValue
qlCalendarIsBusinessDay(
string calendar
vector<long> Date
any Trigger)
Description:

Returns TRUE if the date is a business day for the given calendar.

Supported Platforms:

Excel, Calc

Parameters
calendarID of Enumeration of class QuantLib::Calendar
Datedate.
Triggerdependency tracking trigger

qlCalendarIsEndOfMonth

vector<bool> returnValue
qlCalendarIsEndOfMonth(
string calendar
vector<long> Date
any Trigger)
Description:

returns TRUE if the date is last business day for the month in the given calendar.

Supported Platforms:

Excel, Calc

Parameters
calendarID of Enumeration of class QuantLib::Calendar
Datedate.
Triggerdependency tracking trigger

qlCalendarIsHoliday

vector<bool> returnValue
qlCalendarIsHoliday(
string calendar
vector<long> Date
any Trigger)
Description:

returns TRUE if the date is a holiday for the given calendar.

Supported Platforms:

Excel, Calc

Parameters
calendarID of Enumeration of class QuantLib::Calendar
Datedate.
Triggerdependency tracking trigger

qlCalendarName

string returnValue
qlCalendarName(
string calendar
any Trigger)
Description:

Returns the name of the given calendar.

Supported Platforms:

Excel, Calc

Parameters
calendarID of Enumeration of class QuantLib::Calendar
Triggerdependency tracking trigger

qlCalendarRemoveHoliday

void returnValue
qlCalendarRemoveHoliday(
string calendar
long Date
any Trigger)
Description:

removes an holiday from the given calendar.

Supported Platforms:

Excel, Calc

Parameters
calendarID of Enumeration of class QuantLib::Calendar
Datedate.
Triggerdependency tracking trigger