Hi everyone, I'm currently doing an event study of quarterly earnings announcements and are trying to produce an ARMA(1,1) forecast for the earnings per share (EPS). Due to the large number of events I'm trying to configurate the ARMAREG module (SAS/IML(R) 9.22 User's Guide) to loop and get the forecast as an output. Currently I've managed to loop and get the right estimates for the parameters, but I'm struggeling with getting the forecast to concur with what I get in PROC ARIMA. I've read how the one-period ahead forecast should be done here,SAS/ETS(R) 9.2 User's Guide However I've not managed to replicate the result in order to loop the code. I have only done changes to the bottom of the ARIMAREG code. The variable "estimate" are currently producing false results. Here is my current code: /* everything above here is the same as in ARIMAREG */ /* Begin estimation for Grunfeld's investment models */ iphi=1; /*p*/ itheta=1; /*q*/ maxiter=10; delta=0.0005; ml=1; /*---- To prevent overflow, specify starting values ----*/ par={-0.5 0.5 1.956306}; use work.eps; read all var {EPS} into y; EPSrow=nrow(Y); params=J(3,4,0); estimate=J(4,1,0); do tt=1 to 4; y=y[1:EPSrow-tt]; x=j(EPSrow-tt,1,1); par={-0.5 0.5 1.956306}; run armareg; /*---- Perform ML estimation ----*/ Yrows=nrow(Y); estimate[tt]=par[3]+par[2]*(-1)*Y[yRows]+par[1]*(-1)*resid[yRows]; params[,tt]=par[1:3]; end; quit; I`ve also attached the data sample "Hydro" and the import procedure is: PROC IMPORT OUT= WORK.EPS DATAFILE= "filapath:\Hydro.xls" DBMS=xls REPLACE; GETNAMES=YES; RUN; I think that estimate[tt]=par[3]+par[2]*(-1)*Y[yRows]+par[1]*(-1)*resid[yRows]; is not the correct formula. I think the correct formula is stated here SAS/ETS(R) 9.2 User's Guide under "finite memory forecasts", but I do not know how to implement it, so if someone could give me an good answer to this, I would be deeply thankful. I posted this on the SAS IML community too, and was reffered to this community. Kind regards Morten Groendal
... View more