fGarch: possbible bug(s) in garchSim
Yohan Chalabi
chalabi at phys.ethz.ch
Tue Feb 19 20:18:27 CET 2008
>>>> "MM" == michal miklovic <mmiklovic at yahoo.com>
>>>> on Mon, 18 Feb 2008 09:00:43 -0800 (PST)
MM> Finally, I would like to ask why are you using 'rev' in
MM>
MM> z = c(rev(spec at presample[, 1]), z)
MM> h = c(rev(spec at presample[, 2])^delta, rep(NA, times = n))
MM> y = c(rev(spec at presample[, 3]), rep(NA, times = n))
MM>
MM> Thanks for your answer.
spec at presample is a matrix where the rows represented a time in the past.
> spec <- garchSpec(model = list(alpha = c(0.2,0.1), beta = 0.2))
> spec at presample
z h y
0 -0.7006318 2e-06 0
-1 1.3742579 2e-06 0
here row #1 is at time t = 0 and row #2 is at time t = -1
when you expand the whole sample as done in
z = c(rev(spec at presample[,1]), z)
you want to keep the chronological order. i.e
t = -1, t = 0, t = 1, t = 2, ...
hence the need of rev
> rev(spec at presample[,1])
-1 0
1.3742579 -0.7006318
Yohan
More information about the Rmetrics-core
mailing list