Jonas Dovern and Hans Manner, "Order Invariant Tests for Proper Calibration of Multivariate Density Forecasts", Journal of Applied Econometrics, Vol. 35, No. 4, 2020, pp. 440-456. The material provided along with this readme file enables readers to replicate the two empirical applications in Section 4 of the paper and to implement all of the used tests. Code for replicating the simulations can be obtained from the authors upon request. We note that the computations are time consuming and are best done using parallel computing on fairly powerful desktop computers. Note that both the estimation of the TVP-BVAR used in the macro application and the non-parametric estimation of marginal and conditional predictive densities were done in R (using the packages 'bvarsv' and 'np' respectively). Especially the latter task is very time-consuming and we, therefore, do not include the corresponding files in this package. Intermediate results are stored in the files 'PITs_macro.mat' (PITs for all marginal and conditional predictive densities, both for non-parameteric case and for Gaussian case), 'VCV_h_t.txt' (Covariance matrices of predictive densities under assumption of normality), and 'SimPITs_h_t.txt' (distribution of PITs of marginal and conditional predictive densities in the non-parametric case); these are called by 'application_macro.m' to reproduce the results in Section 4.2 of the paper. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Data files: - Macro_data.txt - The raw data for the macro application (data are from FRED (St. Louis Fed): UNRATE, GDPDEF, TB3MS. 264 observations/rows; first column indicates the quarter. Inflation is calculated as the q/q change of the GDP deflator in percent.) - PITs_macro.mat - The macro data after the PIT for applying our tests - MSCI_weekly.txt - The raw data for the finance application (data are from Datastream: MSUSAML, MSJPANL, MSUTDKL, MSAUSTL, MSGERML. 2505 observations/rows; first column indicates the week.) ) - MSCI_data.mat - The finance data in Matlab format %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Files for replication of the applications: - application_macro.m - Replicates the macro application of the paper - application_finance.m - Replicates the finance application for the Gaussian DCC GARCH - application_finance_dyn_copula.m - Replicates the finance application for the time-varying t-copula model and t-GARCH margins - application_finance_dyn_copula_skewt.m - Replicates the finance application for the time-varying t-copula model with skew-t GJR-Garch margins %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Functions needed to implement the various tests: - CS_PIT.m - Probability integral transform based on the product of iid uniforms as in Clements and Smith (2000) for any dimension d - KP_PIT.m - Probability integral transform based on the demeaned product of iid uniforms as in Ko and Park (2013) for any dimension d - Neyman_ST.m - Standard version of Neyman's smooth test - NST_EU.m - Neyman's smooth test accounting for estimation uncertainty - NST_DM.m - Neyman's smooth test accounting for dynamic misspecification - NST_EU_DM.m - Neyman's smooth test accounting for estimation uncertainty and dynamic misspecification - PIT_Z2S.m - Z2 transformation into uniform under normality - PIT_Z2dag.m - Z2_dagger transformation into uniform under normality - PIT_Z2star.m - Z2_star transformation into uniform under normality - PIT_Z2_student.m - Z2 transformation for data from a multivariate t-distribution - PIT_Z2dag_Student.m - Z2_dagger transformation into uniform for multivariate t-distribution - PIT_Z2star_Student.m - Z2_star transformation into uniform for multivariate t-distribution - PIT_chi2_mix.m - PIT for data coming from a mixture of chi-square variables - Z2dag_Student.m and Z2star_Student.m - Transformations Z2star and Z2dagger based on a multivariate t-distribution with time varying correlation matrix and time-varying degrees-of-freedom %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Matlab toolboxes required: - Dynamic Copula Toolbox - ucsd_garch toolbox - MFE toolbox - LeSage toolbox