* * Example 7.3 (continued) from page 298 * Value at Risk calculation * open data d-ibmln98.dat data(format=free,org=columns) 1 9190 ibmlog set ibmlog = .01*ibmlog * * Define the equation for the mean * equation ar2 ibmlog # constant ibmlog{2} * * GARCH with normal residuals * garch(p=1,q=1,equation=ar2,hseries=h,resids=res) * * Forecast the variance using @GARCHFORE and the series itself using UFORECAST * @garchfore(steps=15) h res uforecast(equation=ar2,steps=15) fret * * Use SSTATS to accumulate the mean and variance over the forecast period * sstats 9191 9205 fret>>ret15 h>>ret15h * disp "5% VaR, 15 day horizon on 10000000" -10000000*(ret15+%invnormal(.05)*sqrt(ret15h))