I can't generate arch and garch data
Posted: Wed Feb 08, 2012 5:32 pm
Here is my code for a arch and garch processes. The problem is i'm not generating dates associated to simarch/simgarch, so when i try to show a correlogram, i get a malfunction error. So, how do i generate 1000 observations simulating an arch and garch processes for afterward see their correlograms and other tests?
Code: Select all
create u 1 1001
!length=1001
series errores=nrnd
series eta1=nrnd
series eta2=nrnd
vector(!length) sigma
errores(1)=0.55
vector(!length) sigma
vector(!length-1) simarch
vector(!length-1) simgarch
sigma(1)=0.8^2
for !i=1 to 1000
simarch(!i)=10+0.5*errores(!i)^2+eta1(!i)
simgarch(!i)=10+0.5*errores(!i)^2+0.6*sigma(!i)+eta2(!i)
sigma(!i+1)=simgarch(!i)
next