Skip to contents

turning_points() returns the number of downturns (downturn()) and upturns (upturn()) in a time series. unwanted_ripples() returns the number of unwanted ripples in a time series.

Usage

turning_points(x, start = NULL, end = NULL, digits = 6, k = 3, m = 1)

upturn(x, start = NULL, end = NULL, digits = 6, k = 3, m = 1)

downturn(x, start = NULL, end = NULL, digits = 6, k = 3, m = 1)

unwanted_ripples(x, start = NULL, end = NULL, digits = 6, k = 3, m = 1)

Arguments

x

the input time series.

start, end

the interval where to find turning points.

digits

number of digits used for the comparison of the values.

k, m

number of observation before and after the turning point (see details).

Details

Zellner, Hong, et Min (1991) definition is used \(k=3\), \(m=1\):

  • we have an upturn at date \(t\) when $$ y_{t-k}\geq\cdots\geq y_{t-1}<y_t\leq y_{t+1}\leq\cdots y_{t+m} $$

  • we have a downturn at date \(t\) when

$$ y_{t-k}\leq\cdots\leq y_{t-1}>y_t\geq y_{t+1}\geq\cdots y_{t+m} $$

An unwanted ripple is defined whenever two downturns or upturns occur within a 10 month period (i.e.: small cycles of less than 11 months).