MATLAB: How to use the TOMONTHLY (and other TO- ) function to work with another market besides the NYSE in Financial Toolbox 3.2 (R2007a)

Financial Toolboxholidayinternationaltomonthly

When I execute the following at the MATLAB command prompt:
dates(1) = datenum('3-May-2004')
data = [1:6]';
tsobjkt = fints(dates, data)
uu = tomonthly(tsobjkt)
I see that '28-May-2004' appears as the last day of the month. This is true in case of NYSE. However, in the UK, for instance, '31-May-2004' is not a Memorial holiday. Thus, technically, '31-May-2004' is the last day of the month.

Best Answer

This enhancement has been incorporated in Financial Toolbox 3.3 (R2007b). In R2007b, you can supply the holiday data from any region and generate a vector of holidays using the CREATEHOLIDAYS function. This vector can then be supplied to the TOMONTHLY function via the parameter "AltHolidays'".
For previous product releases, read below for possible workarounds:
In Financial Toolbox 3.2 (R2007a) and before, you will need to bypass the NYSE holidays by supplying your own holidays vector. This is fairly difficult because it requires modification of the functions you are using, TOMONTHLY and TODAILY. Within these two functions are calls to the ISBUSDAY and BUSDAYS functions which determine which days are business days. These two functions take an additional input argument, a 'holidays' vector, that can bypass the default NYSE 'holidays' vector. You will need to supply your own holidays to these functions.