Description Usage Arguments Details Value References
Compute Bry-Boschan or Harding and Pagan turning points dating rules.
1 | brybos(x, ilog, imcd, nma)
|
x |
A time series (seasonally adjusted). |
ilog |
1 for logs of data (multiplicative model) |
imcd |
Short-term MA for step IV: 0 = Let program decide based on MCD 3 = MA(3), 4 = MA(4), 5 = MA(5), 6 = MA(6) |
nma |
number of terms in MA filter for initial TP (BB use 12-term asymmetric) |
ioutput |
1 for full output, 0 otherwise |
Purpose: compute BB or HP turning points dating rules
Dates for 'peaks' and 'troughs' in the yearmon format.
cal_ind_p = zeros(rows(cal),1); cal_ind_t = zeros(rows(cal),1); tmp_p = zeros(rows(cal),1); tmp_t = zeros(rows(cal),1); if sumc(bcp5) .> 0; cal_ind_p[bcp5]=ones(rows(bcp5),1); tmp_p[bcp5+1]=ones(rows(bcp5),1); endif; if sumc(bct5) .> 0; cal_ind_t[bct5]=ones(rows(bct5),1); tmp_t[bct5+1]=ones(rows(bct5),1); endif; rec_ind=zeros(rows(cal),1);
rec_ind=cumsumc(tmp_p-tmp_t); if bct5[1] .< bcp5[1]; rec_ind=1+cumsumc(tmp_p-tmp_t); endif;
D. Harding & A. Pagan (2002), "Dissecting the Cycle: a Methodological Investigation", Journal of Monetary Economics, n 49, pp. 365-381 G. Bry & C. Boschan (1971), "Cyclical Analysis of Time Series: Selected Procedures and Computer Programs", NBER Technical Paper 20
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.