Dear all, Im trying to improve an old program written by one of my predecessors. The program takes 15 minutes to complete. Assuming there was some efficiency to be won I started my own program with the intention to produce the same results. From what I read in the code it appears a Garch(1,1) is estimated for every period in time from the data set. This is done using the following code: %MACRO estimfx(lastobs=); %do X=261 %to &Lastobs. ; data temp; set FX_M; if &x-259<=seq<=&x; run; proc autoreg data=temp noprint; model ret_eur = / garch=(q=1,p=1,type=stationary) maxiter=200; output out=temp cev=vhat; quit; data temp_A; set temp; adj=1; run; data temp_S; set temp; keep seq; run; proc means data=temp_S noprint; var seq ; output out=s_max max=Seq_M; run; data s_max; set s_max; adj=1; run; data temp_A; merge s_max temp_A; by adj; drop _type_ _freq_; run; data temp_A; set temp_A; if seq=seq_M; run; PROC APPEND BASE = fxconvar DATA = temp_A; %end; %mend estimfx; It appears to me that if there are 4000 observations, the garch-model will be estimated at every point in the time series (about 4000 times). This takes quite a while. So my question is, isn't there some option out there to yield the same result without looping over every point in time? (FYI seq = _n_) Best regards, Wouter
... View more