Codes
For Matlab codes, see my research page at the tab above and look for codes to replicate a specific paper (codes may not be available for some papers)
Download STATA codes that implement the Giacomini and Rossi (Journal of Applied Econometrics, 2010) and the Rossi and Sekhposyan (Journal of Applied Econometrics 2016) tests here: DOWNLOAD STATA FILES A description of the Stata codes and output is available at: Rossi and Soupre’ (2017)
Example of a test of relative forecasting performance robust to instabilities
(Giacomini and Rossi, Journal of Applied Econometrics 2010).
The figure below (implemented via the giacross command in Stata) depicts a sequence of differences of Mean Squared Forecast Error (MSFEs) between two models in rolling windows over time (rescaled by the standard deviation – i.e. a sequence of Diebold and Mariano’s (JBES 1995) test statistics in rolling windows over time). The sequence of MSFEs is depicted in blue in the figure, together with the Giacomini and Rossi’s Fluctuation test critical value lines (in red). Since the sequence of tests is outside the bands, we reject the null hypothesis that the models' forecasting performance is the same in favor of the alternative that the first model forecasts significantly better.
This research has been supported by the NSF through Grants #0647627 and #1022125, the Marie Curie Fellowship program, the Spanish Ministry of Research and the ERC through Grant 615608. The author gratefully acknowledges the funding from these sources over the years.