Financial Time Series Toolbox    
busdays

Business days in serial date format

Syntax

Arguments

sdate
Start date in string or serial date format
edate
End date in string or serial date format
bdmode
(Optional) Frequency of business days:
DAILY, Daily, daily, D, d, 1 (default)
WEEKLY, Weekly, weekly, W, w, 2
MONTHLY, Monthly, monthly, M, m, 3
QUARTERLY, Quarterly, quarterly, Q, q, 4
SEMIANNUAL, Semiannual, semiannual, S, s, 5
ANNUAL, Annual, annual, A, a, 6
Strings must be enclosed in single quotation marks.
holvec
(Optional) Holiday dates vector in string or serial date format

Description

bdates = busdays(sdate, edate, bdmode) generates a vector of business days, bdates, in serial date format between the start date, sdate, and end date, edate, with frequency, bdmode. The dates are generated based on United States holidays. If you do not supply bdmode, busdays generates a daily vector.

bdates = busdays(sdate, edate, bdmode, holvec) lets you supply a vector of holidays, holvec, used to generate business days. holvec can either be in serial date format or date string format. If you use this syntax, you need to supply the frequency bdmode.

The output, bdates, is a column vector of business dates in serial date format.

If you want a weekday vector without the holidays, set holvec to '' (empty string) or [] (empty vector).


  boxcox candle