odd arguments for datemnth in Financial Toolbox

3 views (last 30 days)
The datamnth function takes a basis argument. This is quite odd: as the description of the function indicates datemnth will produce a series of future or past DATEs, NOT YEARFRACs. However, in capital markets, the date roll convention and the daycount convention are two independent concepts: date roll determines how to determine a future or a past date from a start date, and day count determines how to calculate number of days between two given dates. Thus the inclusion of basis (or more accurately day count convention) in the datemnth function is confusing and may produce unexpected date series.
Or am I missing something? I tried to find examples to show how basis affects the results but couldn't find any so this question.
On a lesser note, endMonthRule seems to simply mean dayFlag = 2 so redundant, unless I miss-interpreted the documentation.

Answers (0)

Categories

Find more on Holidays / Seasons in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!