####################################################### # News Impact Curves for GACRCH ZOO MODELS # # Now, the so-called news impact curves # This is a theoretical object that one can view as the graph of sigma^2_t as a # function of epsilon_{t-1} # conditional on everything else... # It shows the relative impact of the "news" in the various models ####################################################### #First get get fits of the tgarch, pgarch, garch module(finmetrics) hp.egarch = garch(hp.s~1, ~egarch(1,1), leverage=T, trace=F) hp.tgarch = garch(hp.s~1, ~tgarch(1,1), trace=F) hp.pgarch = garch(hp.s~1, ~pgarch(1,1,1), leverage=T, trace=F) # We have done this before. # Now the new part. # We get and plot the News Impact Curves. a0 = hp.tgarch\$coef[2] a1 = hp.tgarch\$coef[3] b1 = hp.tgarch\$coef[4] g1 = hp.tgarch\$coef[5] A = a0 + b1*hp.tgarch\$asymp.sd^2 epsilon = seq(-0.21,0.14, length=100) sigma2.t.TGARCH = A+(a1+g1*(epsilon < 0))*(epsilon^2) a0 = hp.pgarch\$coef[2] a1 = hp.pgarch\$coef[3] b1 = hp.pgarch\$coef[4] g1 = hp.pgarch\$coef[5] A = (a0 + b1*hp.pgarch\$asymp.sd)^2 error = abs(epsilon) + g1*epsilon sigma2.t.PGARCH = A + 2*sqrt(A)*a1*error + (a1*error)^2 hp.garch = garch(hp.s~1, ~garch(1,1), trace=F) a0 = hp.garch\$coef[2] a1 = hp.garch\$coef[3] b1 = hp.garch\$coef[4] #g1 = hp.garch\$coef[5] #BOGUS IN TEXT A = a0 + b1*hp.garch\$asymp.sd^2 error = abs(epsilon) + g1*epsilon sigma2.t.GARCH = A + a1*(error^2) matplot(cbind(epsilon, epsilon, epsilon), cbind(sigma2.t.TGARCH,sigma2.t.PGARCH,sigma2.t.GARCH), type="l") key(-0.05, 0.0045, lines=list(type="l", lty=1:3), text=list(c("TGARCH","PGARCH","GARCH")),border=1, adj=1) ############################################################## # Addendum: If you have not explored plot() applied to a GARCH object # this is a good time to try it. # Just do plot(hp.garch) to look at the stuff we have associated with the hp fit. # Go over each of these looking at the story first.