Gabriele Fiorentini and Enrique Sentana, "Dynamic Specification Tests for Dynamic Factor Models", Journal of Applied Econometrics, Vol. 34, No. 3, 2019, pp. 325-346. Our replication codes and data may be found in the zip file fsdynfac.zip. They are all ASCII files in DOS format, so Unix/Linux users should use "unzip -a". fsdynfac.zip includes the Matlab program CPPapplication.m and the functions findMLGRAN41.m, multh.m, and coj.m, as well as the data file CPPdata.txt The options and usage of the Matlab optimization function "fmincon" need to be taylored to the available version of Matlab. Notice that we compute analytical formule for both the gradient and the expected hessian of the spectral log-likelihood function. The code can be also used to run Monte Carlo experiments by assigning a value larger than one to the variable NREP (number of Monte Carlo replications) and by "uncommenting" a few lines indicated in the CPPapplication.m file (specifically from line 149 to line 179)