Financial Toolbox    

Determining Dates

The toolbox provides many functions for determining specific dates, including functions which account for holidays and other nontrading days.

For example, you schedule an accounting procedure for the last Friday of every month. The lweekdate function returns those dates for 2000; the 6 specifies Friday.

Or your company closes on Martin Luther King Jr. Day, which is the third Monday in January. The nweekdate function determines those dates for 2001 through 2004.

Accounting for holidays and other nontrading days is important when examining financial dates. The toolbox provides the holidays function, which contains holidays and special nontrading days for the New York Stock Exchange between 1950 and 2030, inclusive. You can edit the holidays.m file to customize it with your own holidays and nontrading days. In this example, use it to determine the standard holidays in the last half of 2000.

Now use the toolbox busdate function to determine the next business day after these holidays.

The toolbox also provides the cfdates function to determine cash-flow dates for securities with periodic payments. This function accounts for the coupons per year, the day-count basis, and the end-of-month rule. For example, to determine the cash-flow dates for a security that pays four coupons per year on the last day of the month, on an actual/365 day-count basis, just enter the settlement date, the maturity date, and the parameters.


  Current Date and Time Formatting Currency