Bry-Boshan turning points datation
rbb=brybos(namey,arg1,...,argn)
* namey = a ts or a string representing the name of a ts
* argi = an optional argument that can be
- 'M=xx' with xx = minimal duration Peaks-Peaks or Trought-Trought
- 'e=xx' with xx = min # of periods separating a turn form borders
- 'm=xx' with xx = minimal phase
- 'k=xx' with xx = window of time over which the local peaks/troughs are computed in each side of a given date. Exemple: if k=2, then date t is a peak in t if {x(t-2)<x(t), x(t-1)<x(t), x(t+1)<x(t), x(t+2)<x(t)}.
- 'ma=xx to use filtered data by a moving xx-centered moving average
- 'spenc1' to filter data by a Spencer curve
- 'proc =''bb''' to perform Bry-Boschan specific procedure (otherwise performs Harding-Pagan dating rules ('proc =''hp'''))
- 'mcd = xx' with xx = user defined month of cyclical dominance for bry-boschan procedure
* rbb = a results tlist with:
- rbb('meth') = method used ('bb' or 'hp')
- rbb('P') = dates of peaks
- rbb('T') = dates of troughts
- rbb('DPP) = average duration from peak to peak
- rbb('DTT') = average duration from trough to trough
- rbb('DPT') = average duration from peak to trough
- rbb('DTP') = average duration from trough to peak
- rbb('APT') = average amplitude from peak to trough
- rbb('ATP') = average amplitude from trough to peak
- rbb('filter') = if filtered the data before analysis
- rbb('ind_peaks') = indexes of the peaks
- rbb('ind_troughs') = indexes of the troughs
- rbb('phases') = a (nobs x 1) vector equal to 0 in recessions and 1 in expansions
- rbb('prests') = boolean indicating the presence or absence of a time series in the regression
- rbb('namey') = name of the y variable
- rbb('bounds') = if there is a timeseries in the regression, the bounds of the regression
load(GROCERDIR+'\macros\grocer\db\pigiron.dat'); rbb1 = brybos('log(lpigiron)','proc=''bb'''); // Provides the Bry-Boschan dating procedure on the Pig-Iron series taken from Fig 1. (p. 27) // in Mark. W. Watson (1993), "Business Cycle Durations and Postwar Stabilization of the U.S. Economy", // American Economic Review, Vol. 84, 1, pp. 24-46 (see demo function bbq_d). | ![]() | ![]() |