* * Example 7.5 from page 300 * open data d-ibmln98.dat data(format=free,org=columns) 1 9190 ibmlog set ibmlog = .01*ibmlog * * This produces slightly different results than shown because RATS determines the * quantiles by taking 1+p(n-1), not pn. While this is only makes a slight * difference for large n, the formula used by RATS gives the "correct" empirical * values for small n. * * The %FRACTILES function returns a 2 vector in this case, with the .05 and .01 * quantiles respectively. * compute fr=%fractiles(ibmlog,||.05,.01||) disp "5% VaR on 10000000, Empirical" -fr(1)*10000000 disp "1% VaR on 10000000, Empirical" -fr(2)*10000000