Title

rosssekh -- Run the Rossi-Sekhposyan Forecast Rationality test

Syntax

rosssekh
[realized value]
[forecast]
[,
options]

Main
window Rolling window for the forecast comparison. This option is necessary for the program to run.

alpha Significance level (possible values are 0.01, 0.05 and 0.10) for the Rossi-Sekhposyan test. This option is necessary for the program to run.

nw Force the lag length used in the Newey-West estimator for the variance. With a value 0, the test will assume a lag length of the integer part of (w^(0.25)), where w is the size of the rolling window.
When no value is specified, the RS test statistic will be computed using the non-HAC variance.

References

Barbara Rossi, Tatevik Sekhposyan(2016): Forecast rationality tests in the presence of instabilities, with applications to Federal Reserve and survey forecasts. Journal of Applied Econometrics (31), pp.507-532.
Critical values can be found in Panel C, Table II and the Online Appendix.

Compatibility and known issues

The following are required to run the giacross program:

. Stata 8.0 or higher

. The data must be recognized as time series by Stata with the command tsset timevariable

The rosssekh command uses the newey package to estimate the variance matrix used in the Wald test. It is hence sensitive to issues inherent to the newey command.
In particular, Newey-West estimators should not be calculated on a time series that are not evenly spaced. (The rosssekh command forces the Newey-West estimator anyhow.)