Before fitting a GARCH model to a process, we should make sure that the process has zero mean. Which test is used in R?
Testing for zero mean becomes complicated when the observations are not i.i.d. but rather exhibit autoregressive conditional heteroskedasticity. To account for that you can fit a GARCH model allowing for nonzero mean and see if the estimated mean is statistically different from zero (check the p-value of the estimated coefficient). In the
rugarch package you would use
ugarchspec for model specification with the option
mean.model = list(..., include.mean = TRUE, ...).
You need to get the model right for the test result to be reliable, though. If you fit an inadequate GARCH model and some autoregressive conditional heteroskedasticity remains unexplained by the model, the p-value might not give an accurate assessment of whether the mean is zero or not.
(Another possible problem are patterns in the conditional mean, like autocorrelation, that should also be accounted for.)
Another alternative could be some ARCH-robust test, perhaps one that uses HAC standard errors; I am just not sure whether HAC standard errors are adequate under ARCH patterns or not. It would be interesting to find out (see "Can I use HAC for testing whether mean is zero in a GARCH model?").