Sylvia Kaufmann, "Dating and Forecasting Turning Points by Bayesian Clustering with Dynamic Structure: A Suggestion with an Application to Austrian Data", Journal of Applied Econometrics, Vo. 25, No. 2, 2010, pp. 309-344. There are two data files, both ASCII files in DOS format, which are zipped in the file kaufmann-data.zip. Unix users should use "unzip -a". There are also .xls versions of these two files, which are zipped in the file kauffman-xls.zip. Program files are zipped in the file kaufmann-progs.zip. Data: The files "datQ0703.txt" and "DAT_roh_Q0410.txt", and their .xls counterparts, are organized in the following way. datQ0703.txt runs from 1988Q1 to 2006Q4 DAT_roh_Q0410.txt runs from 1988Q1 2004Q3 (estimation sample 1988Q1-2003Q4) Observations are in rows and series are in columns. The first column contains the dates. The first line contains the series labels (see table 1 in the paper, and below) and the second line contains an integer referring to the classification of the series: % 1 GDP and its main components % 2 WIFO business cycle indicator % 3 business surveys % 4 prices (HICP) % 5 CPI % 6 wages % 7 wholesale prices % 8 foreign trade % 9 labor market % 10 IP % 11 financial variables The following series have been excluded for estimation (reason for exclusion): 'SZR' (inventory investment computed as statistical difference); 'YED';'PCD';'ITD';'GCD';'MTD';'XTD'; (all implicit deflators) 'ECOSEN' (older compilation of EECOS) 'INDSEN' (nearly perfectly correlated with EINDSE) 'ALQN' (not seasonally adjusted, nearly perfectly correlated with ALQNSA) The following outliers have been identified and are replaced by a missing-value estimate during model estimation. datafile: datQ0703.txt series: 'PCR' (1993Q1) 'ITR' (2003Q1) datafile: DAT_roh_Q0410.txt series: 'PCR' (1996Q2, 1996Q3) 'GCR' (1994Q4, 1995Q1, 1997) 'MTR' (1993Q1, 1993Q2) Data: YER LD100 National account data GDP real PCR LD100 Private consumption, real ITR LD100 Total investment, real GCR LD100 Government consumption, real MTR LD100 Imports, real XTR LD100 Exports, real %SZR Changes in inventories, real %YED GDP deflator %PCD Private consumption deflator %ITD Gross fixed capital formation deflator %GCD Public consumption deflator %MTD Import eflator %XTD Export deflator TOT LD100 Terms of trade EEN LD100 Nominal effective exchange rate on the export side USD LD100 Euro/US-Dollar exchange rate WIFO Quarterly survey QTAUF D Assessment of order books, industry,total, balance in QTEXPA D Assessment of export order books, industry, total, balance in QTLAG D Assessment of stocks, industry, total, balance in QTPR D Selling-price expectations, industry, total, balance in QTPRO D Production expectations, industry, total, balance in QTBAUF D Assessment of order books, main construction trade, total, balance in QTBPR D Assessment of selling price expectations, main construction trade, total, balance in QTBBGL D Assessment of business situation, main construction trade, total, balance in QTBAGL D Evolution of business situation, main construction trade, total, balance in %ECOSEN Economic sentiment indicator %INDSEN Industry - Confidence indicator Monthly survey data EECOS LD100 Economic sentiment indicator EINDSE D Industry - Confidence indicator KTPROL D Industry - Production in recent months KTAUF D Industry - Order books total KTAUSL D Industry - Exports order books KTLAG D Industry - Stocks of finished goods KTPRON D Industry - Production over next months KTVPN D Industry - Selling prices over next months BAUVPN D Construction - Selling prices over next months EBAUSE D Construction - Confidence indicator EHANSE D Retail trade - Confidence indicator EKONSE D Consumer confidence indicator IFOERW LD100 Foreign confidence indicator IFO - Business expectations in Western Germany, Index 1991 = 100 IFOKL LD100 IFO - Business climate index for Western Germany, 1991=100 IFOGL LD100 IFO - Business situation in Western Germany, Index 1991 = 100 PMI LD100 Purchasing Manager Index USA HICP LD100 HICP - Overall index HICP-FO LD100 HICP - Food incl. alcohol and tobacco HICP-PF LD100 HICP - Processed food incl. alcohol and tobacco HICP-UF LD100 HICP - Unprocessed food HICP-G LD100 HICP - Goods HICP-IG LD100 HICP - Industrial goods HICP-GX LD100 HICP - Industrial goods excluding energy HICP-E LD100 HICP - Energy HICP-S LD100 HICP - Services HICP-XA LD100 HICP - All-items excluding alcoholic beverages, tobacco HICP-XE LD100 HICP - All-items excluding energy HICP-XF LD100 HICP - All-items excluding energy and food HICP-XG LD100 HICP - All-items excluding energy and unprocessed food VPIG86 LD100 CPI Consumer price index, all items, 1986=100 VPI-WOH86 LD100 CPI 86, housing, 1986=100 TLIG86 LD100 Wages Agreed minimum wages, overall index, 1986=100 TLIARG86 LD100 Agreed minimum wages, workers, index 1986=100 TLIANG86 LD100 Agreed minimum wages, salary earners, index 1986=100 GHPIG LD100 Wholesale prices - overall index, 1986=100 GHPIOS LD100 Wholesale prices - excl. seasonal goods, 1986=100 GHPIGG LD100 Wholesale prices - consumer goods, 1986=100 GHPIGL LD100 Wholesale prices - durable commodities, 1986=100 GHPIGK LD100 Wholesale prices - non-durable commodities, 1986=100 GHPIVBG LD100 Wholesale prices - non-durables, 1986=100 GHPIKONG LD100 Wholesale prices - consumer goods, 1986=100 GHPIINVG LD100 Wholesale prices - investment goods, 1986=100 GHPIINTG LD100 Wholesale prices - intermediate goods, 1986=100 OEL LD Oil price, USD per Barrel - IMF EXPG LD100 Exports - FOB total EXP6 LD100 Exports - FOB basic manufactures, SITC 6 EXP7 LD100 Exports - FOB machines and transport equipment, SITC 7 EXP8 LD100 Exports - FOB misc. manufactured goods, SITC 8 IMPG LD100 Imports - CIF total IMP6 LD100 Imports - CIF basic manufactures, SITC 6 IMP7 LD100 Imports - CIF machines and transport equipment, SITC 7 IMP8 LD100 Imports - CIF misc. manufactured goods, SITC 8 EXP-US LD100 Exports of commodities to US EXP-EU LD100 Exports of commodities to EU EXP-DE LD100 Exports of commodities to Germany IMP-US LD100 Imports of commodities from US IMP-EU LD100 Imports of commodities from EU IMP-DE LD100 Imports of commodities from Germany %ALQN Unemployment rate, national definition, total ALQNSA D Unemployment rate, national definition, total SA ALOSM LD100 Unemployment, male ALOSW LD100 Unemployment, female OFST LD100 Vacancies STANDR LD100 Employees INDPROD LD100 IP Industrial production, overall index (excl. construction and energy), 1995=100 ATX LD100 ATX (Austrian Trading Index) M1 LD100 M1 M2 LD100 M2 M3 LD100 M3 DAX LD100 DAX DowJones LD100 Dow Jones Index STI D 3-month money market rate SEKMRE D Secondary market yield on government bonds (9 to 10 years) YIELD D Yield spread DCR-H LD100 Direct credits to private households DCR-F LD100 Direct credits to private firms DCR-G LD100 Direct credits to government DEBT LD100 Outstanding debt DCR LD100 Direct credits, total Programs: The current settings allow to estimate the model with informative prior for the data vintage ending in 2006: The program is implemented for the following parametrization: y_{it}= \mu^{i}_0-\mu^{i}_1*(1-I_{kt}) + \phi^{i}_1 * y_{i,t-1}+ \dots + \phi^{i}_p*y_{i,t-p}+\varepsilon_{it} with \varepsilon_{it} ~ i.i.d N(0,\sigma^2/\lambda_i) and I_{kt}=0 means contraction, I_{kt}=1 means expansion. ESTIMATION of PDS (Panel with dynamic structure) run 'start_model4_logit' settings: file='logit'; rest_diff=0; ieff_restr=0; post=0; not_switch=0; auto_switch=0; auto_grspec=1; pool=1; start_S=0; preclas=1; S_logit=1; DStruc=0; bas_cat=3; var_logit=[3]; eta_different=1; unit_spec_var=1; sg_change=1; dum_out=1; shrink=1; true=0; span=18; maxlag=4; for cal_beg=[1988]; cal_end=cal_beg+span; for cal_end_est=2006.75; for K=[3]; for lag_dlo=[2] end end .... end output: MCMC output saved in logit1_dyn0_shr1_var1_perm0_sg1_K3end2_ex0_grspecstd_2006.75_2006 IDENTIFICATION, POSTERIOR RESULTS run 'permut_MS_all' settings: span=18; pool=1; shrink=1; rest_diff=0; unit_spec_var=1; perm=0; sg_change=1; File='logit'; DSTruc=0; S_Logit=1; Pclas=1; indexMSsort=[1 1 1];indexsort=1; ind_enc=[1 2]; for cal_beg=[1988]; cal_end=cal_beg+span; for cal_end_Est=[2006.75]; for K=3; for lag_dlo=[2]; add=0; group=0; eta_restr=0; ..... end output: identified model and posterior moments saved in file logit1_dyn0_shr1_var1_perm0_sg1_K3end2_ex0_grspecstd_2006.75_2006_iden GRAPH RESULTS run 'plot_all' span=18; rest_diff=0; pool=1; shrink=1; sg_change=1; unit_spec_var=1; perm=0; File='logit'; DSTruc=0; S_Logit=1; Pclas=1; for cal_beg=[1988]; cal_end=cal_beg+span; for cal_end_Est=[2006.75]; for K=[3]; for lag_dlo=[2]; lag_dir=0; ... end output: graphical evaluation of MCMC output: graph 7 is figure 4 graph 9 is figure 6 in the paper graphs 10,11 are in figure 3 of the paper graphs 12,18 are in figure 2 graph 16,17 are in figure 5 TABULATED RESULTS run 'output_rel_parms' run 'output_ser_class' note: run AFTER plot_all, DEFINE file='file.out' in the command line output: file in tex-format containing posterior moments of MCMC output, and series classification ESTIMATE PP,BDS and UNI run 'start_model4_logit' settings for PP (different from PDS): file='pp'; S_logit=0; bas_cat=[]; var_logit=[]; for K=[1]; settings for BDS (different from PDS): file='bds'; S_logit=0; bas_cat=[]; var_logit=[]; sg_change=0; shrink=0; for K=[2]; settings for UNI (different from PDS): file='uni'; S_logit=0; bas_cat=[]; var_logit=[]; unit_spec_var=0; sg_change=0; shrink=0; for K=[1]; output: MCMC output saved in file pp...,bds...,uni... ESTIMATE DYNAMIC STRUCTURE run 'start_model4_logit' settings (different from PDS): preclas=0; S_logit=0; DStruc=1; bas_cat=[]; var_logit=[]; output: MCMC output saved in file logit0_pclas0_dyn1_shr1_var1_perm0_sg1_K3end2_ex0_grspecstd_2006.75_2006 ESTIMATE PDS, PP,BDS,UNI for out-of-sample forecasting run 'start_model4_logit' settings: see above ADDITIONAL setting: for cal_end_est=[2000.00:0.25:2006.75]; output: MCMC output saved in files logit..., pp...,bds...,uni... IN-SAMPLE FORECASTING needs the file 'dating.mat' in 'plot_forecast' containing the posterior estimates P(I_t=1|Y^T)>0.5 for the coincident group obtained from the various models: ecri, pds, pp, bds, uni (and also itl) run 'start_forecast' For PDS: settings: span=18; pool=1; Shrink=1; Unit_spec_var=1; sg_change=1; File='logit'; DSTruc=0; S_Logit=1; rest_diff=0; perm=0; for cal_beg=[1988]; cal_end=cal_beg+span; for cal_end_est=[2006.75]; for K=[3]; for lag_dlo=[2]; ... end For PP: settings (different from PDS): File='pp'; S_Logit=0; K=[1]; For BDS: settings (different from PDS): Shrink=0; Unit_spec_var=1; sg_change=0; File='bds'; S_Logit=0; K=[2]; For UNI settings(different from PDS): Shrink=0; Unit_spec_var=0; sg_change=0; File='uni'; S_Logit=0; K=[1]; output: graphs summarizing the forecasts file forecast.out containing model-based evaluation and evaluation against ecri and pds OUT-OF-SAMPLE FORECASTING needs the file 'dating.mat' in 'plot_forecast' containing the posterior estimates P(I_t=1|Y^T)>0.5 for the coincident group obtained for the various models evaluated: ecri, pds, pp, bds, uni (and also itl) run 'start_forecast_outsample' For PDS: settings: file='logit'; span=18; Pool=1; Shrink=1; Sg_change=1; Unit_spec_var=1; perm=0; ifig=7; for cal_beg=[1988]; cal_end=cal_beg+span; for cal_end_EST=[2000:0.25:2006.75]; for KK=[3]; ... end For PP: settings (different from PDS): file='pp'; for KK=[1]; For BDS: settings (different from PDS): file='bds'; Shrink=0; Sg_change=0; KK=[2]; For UNI: settings (different from PDS): file='uni'; Shrink=0; Sg_change=0; Unit_spec_var=0; KK=[1]; output: graphs summarizing the forecasts file forecast_outsample.out containing model-based evaluation and evaluation against ecri and pds EVALUATE SCENARIOS needs the file 'scenarios.mat' containing: si: the posterior probability of contraction ci: the posterior classification probability into the coincident group li: the posterior classification probability into the leading group estimated under the various scenarios: (i) \rho^* fixed, logit prior, full pre-classification (ii) \rho^* estimated, no pre-classification (iii) \rho^* fixed, full pre-classification (iv) \rho^* fixed, no pre-classification (v) \rho^* fixed, logit prior, partial pre-classification (vi) \rho^* fixed, partial pre-classification (vii) \rho^* fixed, full pre-classification, grouping state indicator only (viii) \rho^* fixed, partial pre-classification, grouping state indicator only the scenarios are estimated by running 'start_model4_logit' with the following settings: (i) PDS settings, see above; for all scenarios: to use data vintage ending in 2003 set span=15, cal_end_est=2003.75; (ii) settings (different from PDS): preclas=0; S_logit=0; DStruc=1; bas_cat=[]; var_logit=[]; sg_change=1; (iii) settings (different from PDS); S_logit=0; bas_cat=[]; var_logit=[]; (iv) settings (different from PDS); preclas=0; S_logit=0; bas_cat=[]; var_logit=[]; (v) PDS settings, see above; edit daten_read_cont0703.m (daten_read_cont0410.m), lines 28 and 29: ser_cont={'YER'};%'PCR';'ITR';'MTR';'XTR'}; %series falling into the contemporaneous group ser_lead={'KTAUF'};%'KTPROL';'QTAUF';'EINDSE'}; %series falling into the leading group (vi) settings (different from PDS); S_logit=0; bas_cat=[]; var_logit=[]; edit daten_read_cont0703.m (daten_read_cont0410.m), lines 28 and 29: ser_cont={'YER'};%'PCR';'ITR';'MTR';'XTR'}; %series falling into the contemporaneous group ser_lead={'KTAUF'};%'KTPROL';'QTAUF';'EINDSE'}; %series falling into the leading group (vii), (viii), the programs are available upon request run 'eval_scenarios' OTHER FIGURES figure 1 in the paper run 'data_properties' output: graph 2-4 are in figure 1 of the paper data_prop.tex contains tables in tex-format summarizing data properties saves file corr_0703.asc containing the correlations with GDP and KTAUF shaping the informative prior on classification probability figure 7 run 'plot_dat'