[R-SIG-Finance] estimation difference between ugarchroll and ugarchfit‏

linpack linpack at 163.com
Wed May 23 20:54:49 CEST 2012


 Hi there,

I have two questions (which might be related).
I am trying to predict mean and variance of monthly stock excess return using dividend price ratio with a eGarch model.

Data format is the following
column 1                column 2                column 3
gross S&P return   gross t-bill return    lagged dividend price ratio
#data dimension is nrow=750 and ncolumns =3 and the "redp.dat" file is attached.

code is following
library(rugarch);
dat=read.csv('C:\\redp.dat',header=F);

logexr=log(dat$V1)-log(dat$V2); # log of gross excess return
as.matrix(logexr);
dp=log(dat$V3); #log of dividend price ratio
as.matrix(dp);

spec = ugarchspec(variance.model = list(model = "eGARCH", garchOrder = c(1,1), external.regressors = as.matrix(dp)),
mean.model = list(armaOrder=c(0,0), include.mean = T, external.regressors = as.matrix(dp)), distribution.model = "norm");
# dividend price ratio are used as external regressor in both mean and variance equation

test=ugarchroll(spec, n.ahead=1, data=logexr, forecast.length=400, refit.every=1, refit.window="moving");
as.data.frame(test, which='LLH')
# where I did a rolling window forecast and display all the likelyhood

#then I did a double check on the rolling estimation by doing
for (j in 1:10) # I am justing printing the first ten loop step
myfit = ugarchfit(spec, logexr[j:349+j]);
likelihood(myfit)
end

# Question 1: the first likelihood from ugarchfit exactly equals that in ugarchroll, while the values are different from then on.
# When I modify the spec to exclude any external regressor, the two sets of likelihood are then exactly the same.
# reducing the forecast length (and therefore increase the length of the estimation window) seems to mitigate the estimation difference.

# Question 2: I then compare the density forecast
as.data.frame(test, which='density')
# this seem to produce
for (j in 1:10) # I am justing printing the first ten loop step
ugarchforecast(myfit, n.ahead=1); # and again when the likelihood are different, the forecast is different.
end
# however, I am a bit confused since I thought it should produce
for (j in 1:10)
ugarchforecast(myfit, n.ahead=1,external.forecasts = list(mregfor = dp[350+j], vregfor = dp[350+j] ));
end

looking forward to your help.


Guoshi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20120524/f914775e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: redp.dat
Type: application/octet-stream
Size: 17280 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20120524/f914775e/attachment.obj>


More information about the R-SIG-Finance mailing list