MATLAB: Can’t I see the data related to 31-Dec-2011 when I use TOANNAUL in Financial Toolbox 3.8 (R2010b)

daylastMATLABofthetoannualyear

I am trying to display the values associated with 31-Dec-2011 using TOANNUAL Function. The values associated with 31 Dec 2011 are not being reflected in the output

Best Answer

In the TOANNUAL function the default end-of-year is the last business day of December. If there is missing data, it returns the nearest data point preceding the end-of-year date.
In order to include the value from the weekend days, use the following option with the TOANNUAL command at MATLAB command prompt.
newfts = toannua(oldfts,'Weekend',zeros(1,7));
The above command sets every day as a business day in order to get the 31st December reflected in the output.