B34S 8.11C (D:M:Y) 27/11/07 (H:M:S) 9:38:28 DATA STEP Dow Jan 1983 - October 1989 PAGE 1 Variable Label # Cases Mean Std. Dev. Variance Maximum Minimum DJONES 1 Dow Jones 30 industrials 82 1739.70 505.821 255855. 2693.41 1064.29 CONSTANT 2 82 1.00000 0.00000 0.00000 1.00000 1.00000 Number of observations in data file 82 Current missing variable code 1.000000000000000E+31 Data begins on (D:M:Y) 1: 1:1983 ends 1:10:1989. Frequency is 12 B34S 8.11C (D:M:Y) 27/11/07 (H:M:S) 9:38:28 PGMCALL STEP Dow Jan 1983 - October 1989 PAGE 2 Output from Rats * * data passed from b34s(r) system to rats * CALENDAR 1983 1 12 ALLOCATE 82 OPEN DATA rats.dat DATA(FORMAT=FREE,ORG=OBS, $ MISSING= 0.1000000000000000E+32 ) / $ DJONES $ CONSTANT SET TREND = T TABLE Series Obs Mean Std Error Minimum Maximum DJONES 82 1739.69987805 505.82099967 1064.29000000 2693.41000000 TREND 82 41.50000000 23.81526121 1.00000000 82.00000000 * * set seriesn = djones(t) - djones(t-1) set seriesn = djones(t) compute iter = 100,isiter=100 * * arch with ma * * see page 5 31 rats manual * smpl(series=seriesn) set v = 1.0 set ra = 0.0 nonlin b0 b1 b2 mu1 a0 a1 frml regresid = seriesn - b0 - b1*seriesn{1}- b2*seriesn{2} $ + mu1*ra{1} * note: to add more series on the right place added lines before * + mu1 * ra{1} line frml archvar = a0+a1*regresid(t-1)**2 frml archlogl = (v=archvar(t)),(ra(t)=regresid(t)), $ .5*(log(v)+ra(t)**2/v) linreg seriesn # constant seriesn{1} seriesn{2} Linear Regression - Estimation by Least Squares Dependent Variable SERIESN Monthly Data From 1983:01 To 1989:10 Usable Observations 80 Degrees of Freedom 77 Total Observations 82 Skipped/Missing 2 Centered R**2 0.981828 R Bar **2 0.981356 Uncentered R**2 0.998649 T x R**2 79.892 Mean of Dependent Variable 1756.2958750 Std Error of Dependent Variable 500.8925819 Standard Error of Estimate 68.3939419 Sum of Squared Residuals 360185.30895 Regression F(2,77) 2080.1100 Significance Level of F 0.00000000 B34S 8.11C (D:M:Y) 27/11/07 (H:M:S) 9:38:28 PGMCALL STEP Dow Jan 1983 - October 1989 PAGE 3 Log Likelihood -450.00897 Durbin-Watson Statistic 1.758662 Variable Coeff Std Error T-Stat Signif ******************************************************************************* 1. Constant 30.25529399 28.14443601 1.07500 0.28573135 2. SERIESN{1} 1.45318441 0.10134425 14.33909 0.00000000 3. SERIESN{2} -0.46450615 0.10267294 -4.52413 0.00002169 compute b0=%beta(1),b1=%beta(2),b2=%beta(3) compute a0=%seesq, a1=.05, mu1=0.0 * maximize(method=simplex,recursive,iterations=iter) archlogl 3 * nlpar(subiterations=isiter) maximize(method=bhhh,recursive,iterations=iter) archlogl 3 * MAXIMIZE - Estimation by BHHH NO CONVERGENCE IN 16 ITERATIONS LAST CRITERION WAS 0.0000000 SUBITERATIONS LIMIT EXCEEDED. ESTIMATION POSSIBLY HAS STALLED OR MACHINE ROUNDOFF IS MAKING FURTHER PROGRESS DIFFICULT. TRY HIGHER SUBITERATIONS LIMIT, TIGHTER CVCRIT, DIFFERENT SETTING FOR EXACTLINE OR ALPHA ON NLPAR. RESTARTING ESTIMATION FROM LAST ESTIMATES OR DIFFERENT INITIAL GUESSES MIGHT ALSO WORK Monthly Data From 1983:03 To 1989:10 Usable Observations 79 Total Observations 80 Skipped/Missing 1 Function Value 131954.72328507 Variable Coeff Std Error T-Stat Signif ******************************************************************************* 1. B0 46.738780 0.000268 174199.94753 0.00000000 2. B1 1.585094 0.002494 635.56946 0.00000000 3. B2 -0.609329 0.000000 0.00000 0.00000000 4. MU1 -0.098260 0.000000 0.00000 0.00000000 5. A0 7654.922567 0.000000 0.00000 0.00000000 6. A1 -0.112179 0.000000 0.00000 0.00000000 smpl(series=ra) statistics ra Statistics on Series RA Monthly Data From 1983:01 To 1989:10 Observations 80 Skipped/Missing 2 Sample Mean 2.812151 Variance 4687.463529 Standard Error 68.465053 of Sample Mean 7.654626 t-Statistic (Mean=0) 0.367379 Signif Level 0.714318 Skewness -0.567839 Signif Level (Sk=0) 0.041898 Kurtosis (excess) 2.365045 Signif Level (Ku=0) 0.000036 Jarque-Bera 22.944005 Signif Level (JB=0) 0.000010 set rssa = ra(t)*ra(t) statistics rssa Statistics on Series RSSA Monthly Data From 1983:01 To 1989:10 Observations 80 Skipped/Missing 2 Sample Mean 4636.778427 Variance 88102052.025884 Standard Error 9386.269335 of Sample Mean 1049.416814 B34S 8.11C (D:M:Y) 27/11/07 (H:M:S) 9:38:28 PGMCALL STEP Dow Jan 1983 - October 1989 PAGE 4 t-Statistic (Mean=0) 4.418434 Signif Level 0.000031 Skewness 4.688958 Signif Level (Sk=0) 0.000000 Kurtosis (excess) 27.602913 Signif Level (Ku=0) 0.000000 Jarque-Bera 2832.887129 Signif Level (JB=0) 0.000000 smpl(series=rssa) compute sumsqra = %sum(rssa) display 'sum of squares of ra' sumsqra sum of squares of ra 370942.27416 * * Modern code * * set seriesn = djones(t) - djones(t-1) set seriesn = djones(t) compute iter = 100,isiter=100 * * garch(1,1) * * see pages 206-211 of Version 6 Reference Manual * * garch(p=1,q=1,resids=at,hseries=fvar,regressors) / seriesn # constant seriesn{1} seriesn{2} GARCH Model - Estimation by BFGS Convergence in 16 Iterations. Final criterion was 0.0000000 <= 0.0000100 Monthly Data From 1983:01 To 1989:10 Usable Observations 80 Total Observations 82 Skipped/Missing 2 Log Likelihood -537.03776374 Variable Coeff Std Error T-Stat Signif ******************************************************************************* 1. Constant 422.888711 0.000038 11196307.27723 0.00000000 2. SERIESN{1} 1.250270 0.027425 45.58859 0.00000000 3. SERIESN{2} -0.474580 0.015824 -29.99151 0.00000000 4. C 38055.596607 0.000004 9.25521e+09 0.00000000 5. A 0.104708 0.006742 15.53056 0.00000000 6. B -0.192509 0.000000 -2139450.13964 0.00000000 graph(header="Residuals of Model") 1 # at ; graph(header="Conditional Volatility of Model") 1 # fvar B34S(r) Matrix Command. d/m/y 27/11/07. h:m:s 9:38:29. => CALL LOADDATA$ => DJONES=DIF(DJONES)$ => ARCH=ARRAY(NOROWS(DJONES):)+VARIANCE(DJONES)$ => CALL GARCHEST(RES,ARCH,DJONES,FUNC,2,N => :MAXIT 8000 => :MAXFUN 8000 => :MAXG 8000 => :STEPTOL .1E-10 => :NMA 2 :NGMA 1 :PRINT )$ GARCH/ARCH Model Estimated using DB2ONF Routine Constrained Maximum Likelihood Estimation using CMAXF2 Command Finite-difference Gradiant Model Estimated res1(t)=y(t)-cons(1)-ar(1)*y(t-1) -... -ma(1)*res1(t-1) -... res2(t)= cons(2)+gar(1)*res2(t-1) +... +gma(1)*(res1(t-1)**2)+... where: gar(i) and gma(i) ge 0.0 LF =-.5*sum((ln(res2(t))+res1(t)**2/res2(t))) Final Functional Value -394.4658805872099 # of parameters 5 # of good digits in function 15 # of iterations 2002 # of function evaluations 2031 # of gradiant evaluations 2004 Scaled Gradient Tolerance 6.055454452393343E-06 Scaled Step Tolerance 9.999999999999999E-12 Relative Function Tolerance 3.666852862501036E-11 False Convergence Tolerance 2.220446049250313E-14 Maximum allowable step size 2236.067977499790 Size of Initial Trust region -1.000000000000000 # of terms dropped in ML 2 1/ Condition of Hessian Matrix 9.476601492027534E-11 # Name order Parm. Est. SE t-stat 1 MA 1 -0.30000913 0.36741075E-01 -8.1654968 2 MA 2 -0.61070784 0.35181728E-01 -17.358665 3 GMA 1 1.2246494 0.15644923 7.8277753 4 CONS_1 0 7.3959877 0.45624850 16.210437 5 CONS_2 0 1032.4643 330.76848 3.1214108 SE calculated as sqrt |diagonal(inv(%hessian))| Order of Parms: AR, MA, GAR, GMA, MU, vd, Const 1&2 Hessian Matrix 1 2 3 4 5 1 45177.2 46789.2 -58.1685 283.993 -0.501977E-01 2 46789.1 49349.7 -8.21970 293.869 -0.120215E-01 3 -58.4721 -9.85229 81.1083 3.46260 0.248092E-01 4 284.473 294.255 3.54845 7.78829 -0.273962E-02 5 -0.462128E-01 -0.904911E-02 0.254415E-01 -0.229070E-02 0.194919E-04 Gradiant Vector -0.539264E-05 -0.629141E-05 0.00000 0.243043E-06 -0.230599E-05 Lower vector -0.100000E+33 -0.100000E+33 0.100000E-16 -0.100000E+33 0.100000E-16 Upper vector 0.100000E+33 0.100000E+33 0.100000E+33 0.100000E+33 0.100000E+33 => CALL GRAPH(GOODROW(RES))$ Note: Graphics not available with this version of B34S => CALL GRAPH(GOODROW(ARCH))$ Note: Graphics not available with this version of B34S => ARCH=ARRAY(NOROWS(DJONES):)+VARIANCE(DJONES)$ => CALL GARCHEST(RES,ARCH,DJONES,FUNC,2,N => :MAXIT 8000 => :MAXFUN 8000 => :MAXG 8000 => :STEPTOL .1E-10 => :NAR 2 :NGMA 1 :PRINT )$ GARCH/ARCH Model Estimated using DB2ONF Routine Constrained Maximum Likelihood Estimation using CMAXF2 Command Finite-difference Gradiant Model Estimated res1(t)=y(t)-cons(1)-ar(1)*y(t-1) -... -ma(1)*res1(t-1) -... res2(t)= cons(2)+gar(1)*res2(t-1) +... +gma(1)*(res1(t-1)**2)+... where: gar(i) and gma(i) ge 0.0 LF =-.5*sum((ln(res2(t))+res1(t)**2/res2(t))) Final Functional Value -358.3127554680724 # of parameters 5 # of good digits in function 15 # of iterations 267 # of function evaluations 300 # of gradiant evaluations 269 Scaled Gradient Tolerance 6.055454452393343E-06 Scaled Step Tolerance 9.999999999999999E-12 Relative Function Tolerance 3.666852862501036E-11 False Convergence Tolerance 2.220446049250313E-14 Maximum allowable step size 2236.067977499790 Size of Initial Trust region -1.000000000000000 # of terms dropped in ML 2 1/ Condition of Hessian Matrix 1.839063016175616E-08 # Name order Parm. Est. SE t-stat 1 AR 1 0.36202316 0.11063306 3.2722874 2 AR 2 -0.85367433E-01 0.85946709E-01 -0.99326006 3 GMA 1 0.49882223 0.21015701 2.3735693 4 CONS_1 0 20.048651 6.3462054 3.1591556 5 CONS_2 0 1991.8051 452.86300 4.3982508 SE calculated as sqrt |diagonal(inv(%hessian))| Order of Parms: AR, MA, GAR, GMA, MU, vd, Const 1&2 Hessian Matrix 1 2 3 4 5 1 127.960 75.8617 16.6759 0.663540 -0.136064E-02 2 72.9551 184.399 -0.360620 0.776888 0.257489E-03 3 14.9485 4.01390 28.1636 0.104295 0.340746E-02 4 0.708902 0.605863 0.269105E-01 0.287804E-01 0.273326E-04 5 -0.223515E-02 0.997606E-03 0.480666E-02 -0.166504E-04 0.561617E-05 Gradiant Vector 0.317267E-03 0.737893E-03 -0.108752E-03 0.176180E-04 0.645267E-07 Lower vector -0.100000E+33 -0.100000E+33 0.100000E-16 -0.100000E+33 0.100000E-16 Upper vector 0.100000E+33 0.100000E+33 0.100000E+33 0.100000E+33 0.100000E+33 => CALL GRAPH(GOODROW(RES))$ Note: Graphics not available with this version of B34S => CALL GRAPH(GOODROW(ARCH))$ Note: Graphics not available with this version of B34S => ARCH=ARRAY(NOROWS(DJONES):)+VARIANCE(DJONES)$ => CALL GARCHEST(RES,ARCH,DJONES,FUNC,1,N => :MAXIT 8000 => :MAXFUN 8000 => :MAXG 8000 => :STEPTOL .1E-10 => :NMA 1 :NGMA 1 :NGAR 1 :PRINT )$ Note: Last global step failed to locate a lower point than the current x value. Note: Hessian not full rank. SE not calculated. GARCH/ARCH Model Estimated using DB2ONF Routine Constrained Maximum Likelihood Estimation using CMAXF2 Command Finite-difference Gradiant Model Estimated res1(t)=y(t)-cons(1)-ar(1)*y(t-1) -... -ma(1)*res1(t-1) -... res2(t)= cons(2)+gar(1)*res2(t-1) +... +gma(1)*(res1(t-1)**2)+... where: gar(i) and gma(i) ge 0.0 LF =-.5*sum((ln(res2(t))+res1(t)**2/res2(t))) Final Functional Value -1784.429462459979 # of parameters 5 # of good digits in function 15 # of iterations 45 # of function evaluations 303 # of gradiant evaluations 46 Scaled Gradient Tolerance 6.055454452393343E-06 Scaled Step Tolerance 9.999999999999999E-12 Relative Function Tolerance 3.666852862501036E-11 False Convergence Tolerance 2.220446049250313E-14 Maximum allowable step size 2236.067977499790 Size of Initial Trust region -1.000000000000000 # of terms dropped in ML 1 1/ Condition of Hessian Matrix 2.540796891079351E-17 # Name order Parm. Est. SE t-stat 1 MA 1 -0.33022165 0.10000000E+32 0.10000000E+32 2 GAR 1 331.42695 0.10000000E+32 0.10000000E+32 3 GMA 1 334.48110 0.10000000E+32 0.10000000E+32 4 CONS_1 0 -13.355401 0.10000000E+32 0.10000000E+32 5 CONS_2 0 42.071824 0.10000000E+32 0.10000000E+32 SE calculated as sqrt |diagonal(inv(%hessian))| Order of Parms: AR, MA, GAR, GMA, MU, vd, Const 1&2 Hessian Matrix 1 2 3 4 5 1 224506. -177.924 -199.687 4139.29 -25.0969 2 -255.040 96.3662 97.1256 -7.96288 12.0362 3 -211.624 96.9507 97.6635 -8.08509 11.8923 4 3980.33 -9.88616 -7.16668 0.153849E+16 -2.10358 5 -25.1749 12.0351 11.8921 1.27423 2.96403 Gradiant Vector 0.519439E+09 -0.156728E+07 -0.155297E+07 -0.388935E+08 0.646354E-03 Lower vector -0.100000E+33 0.100000E-16 0.100000E-16 -0.100000E+33 0.100000E-16 Upper vector 0.100000E+33 0.100000E+33 0.100000E+33 0.100000E+33 0.100000E+33 => CALL GRAPH(GOODROW(RES))$ Note: Graphics not available with this version of B34S => CALL GRAPH(GOODROW(ARCH))$ Note: Graphics not available with this version of B34S => CALL NAMES$ # Name Type Klass Row-Col Label TimeBase Start Freq 1 BJULIAN_ Real*8 D1array 82 by 1 1983 1 12.0000 2 DJONES Real*8 D1array 81 by 1 Dow Jones 30 industrials 0 0 12.0000 3 CONSTANT Real*8 D1array 82 by 1 1983 1 12.0000 4 ARCH Real*8 D1array 81 by 1 0 0 0.0000 5 %IPARAM Integer D1array 7 by 1 0 0 0.0000 6 %RPARAM Real*8 D1array 7 by 1 0 0 0.0000 7 RES Real*8 D1array 81 by 1 0 0 0.0000 8 %RESOBS Real*8 D1array 81 by 1 0 0 0.0000 9 FUNC Real*8 Scalar 1 by 1 0 0 0.0000 10 N Integer Scalar 1 by 1 0 0 0.0000 11 %COEF Real*8 Vector 5 by 1 0 0 0.0000 12 %SE Real*8 Vector 5 by 1 0 0 0.0000 13 %T Real*8 Vector 5 by 1 0 0 0.0000 14 %HESSIAN Real*8 Matrix 5 by 5 0 0 0.0000 15 %IWORK Integer Vector 5 by 1 0 0 0.0000 16 %NAR Integer Scalar 1 by 1 0 0 0.0000 17 %NMA Integer Scalar 1 by 1 0 0 0.0000 18 %NGAR Integer Scalar 1 by 1 0 0 0.0000 19 %NGMA Integer Scalar 1 by 1 0 0 0.0000 20 %NMU Integer Scalar 1 by 1 0 0 0.0000 21 %CON Integer Scalar 1 by 1 0 0 0.0000 22 %CNAME Char*8 Vector 5 by 1 0 0 0.0000 23 %CORDER Integer Vector 5 by 1 0 0 0.0000 24 %FUNC Real*8 Scalar 1 by 1 0 0 0.0000 25 %NPARM Integer Scalar 1 by 1 0 0 0.0000 26 %N_GOODD Integer Scalar 1 by 1 0 0 0.0000 27 %N_ITER Integer Scalar 1 by 1 0 0 0.0000 28 %N_FUNC Integer Scalar 1 by 1 0 0 0.0000 29 %N_GRAD Integer Scalar 1 by 1 0 0 0.0000 30 %SG_TOL Real*8 Scalar 1 by 1 0 0 0.0000 31 %SS_TOL Real*8 Scalar 1 by 1 0 0 0.0000 32 %RF_TOL Real*8 Scalar 1 by 1 0 0 0.0000 33 %FC_TOL Real*8 Scalar 1 by 1 0 0 0.0000 34 %MAX_SS Real*8 Scalar 1 by 1 0 0 0.0000 35 %S_TRUST Real*8 Scalar 1 by 1 0 0 0.0000 36 %NT_DROP Integer Scalar 1 by 1 0 0 0.0000 37 %H_COND Real*8 Scalar 1 by 1 0 0 0.0000 38 %WORK Real*8 Vector 90 by 1 0 0 0.0000 Space available 2856718 , used 2353 , peak used 2460 # Temp varibles 61 , peak # used 52 B34S Matrix Command Ending. Last Command reached. Space available in allocator 2856718, peak space used 2460 Number variables used 51, peak number used 52 Number temp variables used 61, # user temp clean 0 B34S 8.11C (D:M:Y) 27/11/07 (H:M:S) 9:38:36 PGMCALL STEP Dow Jan 1983 - October 1989 PAGE 5 B34S normal exit on Date (D:M:Y) 27/11/07 at Time (H:M:S) 9:38:36