

I use ARMAX(4,1) model to estimate the volatility and include interest rate r_t as the exogenous variable. I use the arima function and ugarchfit function from RUGARCH package, respectively. The results seem to contradict with each other.
 
If I use arima function,
my code is as follows,
data<-read.csv("...")
volatility<-ts(data$volatility);
rate<-ts(data$diff_rate);
result=arima(volatility,order=c(4,0,1),xreg=rate)
Box.test(result$residuals, lag =10, type = c("Box-Pierce", "Ljung-Box"))
 
The output is as follows,
 Box-Pierce test
data:  result$residuals 
X-squared = 13.1749, df = 10, p-value = 0.2141
which means no correlation among the residuals.
 
However, if I use RUPACKAGE,
my code is as follows,
spec=ugarchspec(variance.model=list(model="sGARCH",garchOrder=c(1,1),submodel=NULL, 
+ external.regressors=as.matrix(rate), variance.targeting = FALSE),
+ mean.model = list(armaOrder = c(4,1), include.mean = TRUE, garchInMean = FALSE,
+ inMeanType = 1, arfima = FALSE, external.regressors =as.matrix(rate)), distribution.model = "std",
+ start.pars = list(), fixed.pars = list())
fit=ugarchfit(spec,data=as.matrix(volatility))
fit
 
The output is as follows,
Q-Statistics on Standardized Residuals
------------------------------------
               statistic   p-value
Lag10     15.76      0.0075508
Lag15     21.98      0.0152135
Lag20     42.29      0.0002031
H0 : No serial correlation
which means there exisits correlation among the residuals.
 

 
  		 	   		  
	[[alternative HTML version deleted]]

