toannual
Convert to annual
toannual
is not recommended. Use convert2annual
instead.
Syntax
newfts = toannual(oldfts) newfts = toannual(oldfts,'ParameterName',ParameterValue, ...)
Arguments
| Financial time series object. |
Description
newfts = toannual(oldfts)
converts a financial time series of any
frequency to one of an annual frequency. The default end-of-year is the last business day of
the December. toannual
uses holidays.m
to determine
valid trading days.
Note
If oldfts
contains time-of-day information, newfts
displays the time-of-day as '00:00'
for those days that did not
previously exist in oldfts
.
Empty ([ ]
) passed as inputs for parameter pair values for
toannual
triggers the use of the defaults.
newfts = toannual(oldfts,'ParameterName',ParameterValue, ...)
accepts
parameter name/parameter value pairs as input, as specified in the following table.
Parameter Name | Parameter Value | Description |
---|---|---|
|
| Returns the cumulative sum of the values within each year. Data for
missing dates are given the value |
CalcMethod |
| Returns the exact value at the end-of-year date. No data manipulation occurs. |
|
| (Default) Returns the values located at the end-of-year dates. If there
is missing data, |
CalcMethod |
| Returns an averaged annual value that only takes into account dates with
data (non- |
|
| This mode is compatible with previous versions of this function (Version
2.1.x and earlier). It returns an averaged end-of-year value using a previous
|
Note If you set | ||
|
| Returns a financial time series that ranges from (or between) the first
date to the last date in |
|
| (Default) Generates a monthly financial time series that ranges from the
first date to the last date in NYSE
market closures, holidays, and weekends are observed if
|
|
| (Default) Returns all annual dates between the start and end dates of
Note The default is to create a time series with every date at the specified
periodicity, which is with
|
|
| Returns only the annual dates that exist in |
|
| Annual period ends on the last day or last business day of the month. |
|
| Specifies a particular annual day. Months that do not contain the
specified day return the last day (or last business day) of the month (for
example, |
|
| (Default) The annual period ends on the last day (or last business day)
of the specified month. All subsequent annual dates are calculated from this
month. Default annual month is December ( |
| [ | Denotes the minimum number of days that constitute an odd annual period at the endpoints of the time series (before the first-time series date and after the last end-of-year date).
A single value input
for
|
The following diagram is a general depiction of the factors involved in the determination of endpoints for this function. | ||
|
| Returns only the observation that occurs at the first (earliest) time for a specific date. |
TimeSpec |
| (Default) Returns only the observation that occurs at the last (latest) time for a specific date. |
| Vector of dates specifying an alternate set of market closure dates. | |
AltHolidays |
| Excludes all holidays. |
| Vector of length 7 containing 0's and 1's. The value |