Skip to content
Prev 14425 / 15274 Next

To obtain the t student of each rolling window with EGARCH model

Hi Sandrine,

Not sure if this is what you are after:

#####
# reproducible example:
library(rugarch)
library(xts)
data(sp500ret)
spx = xts(as.numeric(sp500ret[,1]), as.Date(rownames(sp500ret)))

spec2b<-ugarchspec(variance.model=list(model="eGARCH",garchOrder=c(1,1)),mean.model=list(armaOrder=c(0,0)), 
distribution.model = "std")
roll1=ugarchroll(spec2b,data=spx,n.start=NULL,window.size=500,solver="solnp")

cf=coef(roll1)

st=do.call(rbind, lapply(1:length(cf), function(i){
   xts(cf[[i]]$coef["shape",1], as.Date(cf[[i]]$index))
}))
st = na.locf(cbind(spx[paste0(index(st[1]),"/",st[length(st)])], st))[,2]
#####


Alexios
On 11/23/2017 12:30 PM, Sandrine Boulerne wrote: