Products & Services Solutions Academia Support User Community Company

Learn more about Financial Toolbox   

holidays - Holidays and nontrading days

Syntax

H = holidays
H = holidays(StartDate, EndDate)
H = holidays(AltHolidays)

Description

H = holidays returns a vector of serial date numbers corresponding to all holidays and nontrading days.

H = holidays(StartDate, EndDate) returns a vector of serial date numbers corresponding to the holidays and nontrading days between StartDate and EndDate, inclusive.

H = holidays(AltHolidays) returns a vector of serial date numbers corresponding to the alternate list of holidays and nontrading days.

Inputs

StartDate

Start date. Enter as a serial date number or date string.

EndDate

End date. Enter as a serial date number or date string.

AltHolidays

Alternate list of holidays and nontrading days stored as serial date numbers.

Outputs

H

Returns a vector of serial date numbers corresponding to all holidays and nontrading days.

Definitions

holidays is based on a modern 5-day workweek. This function contains all holidays and special nontrading days for the New York Stock Exchange from January 1, 1885 to December 31, 2050. Since the New York Stock Exchange was open on Saturdays before September 29, 1952, exact closures from 1885 to 2050 should include Saturday trading days. To capture these dates, use the function nyseclosures. The results from holidays and nyseclosures are identical if the WorkWeekFormat in nyseclosures is 'Modern'.

Examples

Create a vector of serial date numbers corresponding to all holidays and nontrading dates between a specified StartDate and EnDate:

H = holidays('jan 1 2001', 'jun 23 2001') 

This returns:

H =
      730852
      730901
      730954
      730999

The serial date numbers for these values are:

01-Jan-2001 (New Year's Day)
19-Feb-2001 (President's Day)
13-Apr-2001 (Good Friday)
28-May-2001 (Memorial Day)

See Also

busdate | createholidays | fbusdate | isbusday | lbusdate | nyseclosures

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS