* * Example 7.2 from page 292 * Value at Risk calculation * open data d-ibmln98.dat data(format=free,org=columns) 1 9190 ibmlog set ibmlog = .01*ibmlog graph(footer="Figure 7.1 Time plot of daily log returns of IBM stock") # ibmlog * garch(p=1,q=1,i=nodrift,nomean,resids=u,hseries=h) / ibmlog * * Check Q's on the squared standardized residuals * set uustd = u**2/h corr(number=10,qstats,dfc=1) uustd * set uu = u**2 compute vc=%beta(1),va=%beta(2),vb=%beta(3) frml hfrml h = vc+vb*h{1}+va*uu{1} frml uufrml uu = h group garchmod hfrml>>h uufrml>>uu forecast(model=garchmod,noprint,steps=1) * disp "5% VaR on 10,000,000" %invnormal(.95)*sqrt(h(9191))*10000000 disp "1% VaR on 10,000,000" %invnormal(.99)*sqrt(h(9191))*10000000