I am using a panel dataset, whereby I have data on log stock returns for a cross-section of companies. I am trying to use these stock returns to create a proxy for volatility using GARCH(1,1) methodology.
I want to run GARCH on each company individually, and then use the results to predict variance values. The code that I have come up with so far is:
forvalues companyid = 1(1)292{
arch Returns if companyid == `i', arch(1) garch(1)
predict Residual, r
predict ProxyVariance, variance
}
However, this returns a syntax error.
Could anyone advise me on why this is not working?
Kind regards,
Jack
I want to run GARCH on each company individually, and then use the results to predict variance values. The code that I have come up with so far is:
forvalues companyid = 1(1)292{
arch Returns if companyid == `i', arch(1) garch(1)
predict Residual, r
predict ProxyVariance, variance
}
However, this returns a syntax error.
Could anyone advise me on why this is not working?
Kind regards,
Jack
Comment