pct (Series)
Percent rate of change
Syntax
x = pct(x, ~shift, ...)
Input arguments marked with a
~sign may be omitted
Input Arguments
x [ TimeSubscriptable ]
Input time series.
~shift [ numeric | 'yoy' ]
Time shift (lag or lead) over which the percent rate of change will be computed, i.e. between time t and t+k; if omitted,
shift=-1; ifshift='yoy'a year-on-year percent rate is calculated (with the actualshiftdepending on the date frequency of the input seriesx).
Output Arguments
x [ TimeSubscriptable ]
Percentage rate of change in the input data.
Options
'OutputFreq=' [ empty | Frequency ]
Convert the percent rate of change to the requested date frequency; empty means plain percent rate of change with no conversion.
Description
Examples
In this example, x is a monthly time series. The following command
computes the annualized percent rate of change between month t and t-1:
pct(x, -1, 'OutputFreq=', 1)
while the following line computes the annualized percent rate of change between month t and t-3:
pct(x, -3, 'OutputFreq=', 1)
In this example, xm is a monthly time series and xq is a quarterly
series. The following pairs of commands are equivalent for calculating
the year-over-year percent rates of change:
pct(xm, -12)
pct(xm, 'yoy')
and
pct(xq, -4)
pct(xq, 'yoy')