# Example 12.9, ARCH in Stock Returns # Data set: nyse # Function for result reporting source("_report.R") # Load the data and estimate the model in the background load("nyse.Rdata") names(data)[names(data)=="return"]="return.t" names(data)[names(data)=="return_1"]="return.t_1" tsdata=ts(data,start=1,frequency=1) model1=lm(return.t~return.t_1,data=tsdata) # Estimate ARCH model uhatsq.t=ts((model1$residuals)^2) ressq=cbind(uhatsq.t,uhatsq.t_1=lag(uhatsq.t,k=-1)) model2=lm(uhatsq.t~uhatsq.t_1,data=ressq) dig=c(2,3,3) uhat.t=ts(model1$residuals) res=cbind(uhat.t,uhat.t_1=lag(uhat.t,k=-1)) model3=lm(uhat.t~uhat.t_1,data=res) { cat("This example closely follows Example 12.8. In the previous example, we found strong evidence of heteroskedasticity. Actually, this heteroskedasticity is better characterized by the ARCH model. Regressing the squared residuals on their first lag gives the following result:") reportreg(model2,dig,suffix=".hat") } # Interpretation cat("The t statistic on uhatsq.t_1 is ", printt(model2,2,dig[2]), ", indicating strong ARCH. However, it is important to note that while the squared residuals are related, the residuals themselves are not (as is consistent with the EMH): regressing uhat.t on uhat.t_1 gives ", "rhohat = ", printcoef(model3,2,4), " with a t statistic of ", printt(model3,2,4,tdig=3), sep="")