Function File: b = busdate (refdate)
Function File: b = busdate (refdate, direction)
Function File: b = busdate (refdate, direction, holiday)
Function File: b = busdate (refdate, direction, holiday, weekend)

Return the datenum of the next or previous business day from refdate. direction indicates the next day (default) if 1 and the previous day if -1. holiday is a vector of datenums that defines the holidays observed (the holidays function is used if not given). weekend defines the days of the week that should be considered weekends; [1 0 0 0 0 0 1] (default) indicates that Sunday and Saturday are holidays.

If any of the optional inputs (direction, holiday, weekend) are empty, then the default is used.

See also: holidays, lbusdate, isbusday, fbusdate.

Package: financial