Time period average (TPA#)

Time period average (TPA#)

This calculates the average value for a series for full calendar periods between the display start and end dates. The calendar periods are calculated from the start date. Incomplete periods at the end of the display period are ignored and filled with null values ('N/A'). The TPA# function is similar to the calendar average functions, but offers greater flexibility in your choice of time period. For example, if you specify a mid-month start date, TPA# calculates a series of average values for consecutive mid-month to mid-month periods.Unlike a MAV# time period, TPA# time periods are consecutive and do not overlap.

Format

TPA#(Expression,Period,Carry_Indicator )

Where:

Period comprises one or more full calendar days, weeks, months, quarters or years.

Carry_Indicator determines the way in which the function deals with null values. Null values are displayed when a numeric value for a stock is unavailable and is indicated by N/A. There are three methods for handling null values in a time series, specified by the codes D, C, and, I. If you do not specify a Carry_Indicator, the default, D, is used.

D (Default) Carry previous value, but not between periods
Null values are overwritten with the previous value from the series; the previous value is "carried over" to the slot containing the null value. Values are not carried over between periods. For example, a null value occurring on the first of a month is not overwritten with a value from the end of the previous month.

C Carry previous value.
Null values are overwritten with the previous value from the series; the previous value is "carried over" to the slot containing the null value. Null values occurring on the first day of a new time period (week, month, quarter, or year) will be overwritten with the value carried over from the last day of the previous time period.

I Ignore
Null values are ignored and appear in the series you request.

Example

TPA#(MKS,2M,C)

This calculates the average Marks and Spencer share price over consecutive two month periods between the display dates, starting from the display start date. An incomplete period, in this case a period of less than two months, at the end of the display period is ignored and filled with null values ('N/A').

See also

Average functions