Functions Data

GetTradingDays

GetTradingDays() returns all dates within a specified range and indicates whether each date is, or was, a trading day, accounting for weekends and public holidays of the relevant securities exchange or country.


Syntax:

Qx.GetTradingDays(Start, End, Exchange, ShowError)
  • In Excel with Quintessence addin versions prior to 25.1, use: GetTradingDays()
  • In the Quintessence Editor (Studio) using Quintessence language, use: GetTradingDays()
  • In the Quintessence Editor (Studio) using Python language, use: Qx. GetTradingDays()
 See parameter descriptions

StartThe start date that defines the beginning of the range.
EndThe end date that defines the end of the range.
Exchange
(optional)
The code of the exchange to use, e.g., XLSE for the London Stock Exchange.
ShowError
(optional)
If TRUE, an error message is displayed when the function fails.

Remarks:

  • Exchange default parameter is configured during the initial Quintessence setup.

Examples:

> Example 1: Return a range of dates and indicate whether they are or were trading days

=Qx.GetTradingDays("01 Jan 2015", "07 Jan 2015", "XStockExchange1", TRUE)
2015/01/01FALSE
2015/01/02TRUE
2015/01/03FALSE
2015/01/04FALSE
2015/01/05TRUE
2015/01/06TRUE
2015/01/07TRUE

For the exchange XStockExchange1, January 1, 2015, was a public holiday, and January 3 and 4 fell on a weekend.