Hi all,
I have a very curious problem when running rolling forecasts with ARIMA. In every iteration (non-recursive forecast), Stata becomes a little slower, but eventually very slow. The first model takes five minutes to run, but by the 20th it is over one hour, for the same data and minimal differences in specification. I had a look and it seems like with every iteration, the amount of physical memory consumed rises. I started with around 100MB, and after 500 iterations it's gone to 800MB. With 5000 iterations it's over 5GB.
This is not an issue of Stata taking up a memory because the computation is hard. The sample size is small (time series, T=100 with 5 regressors and 1 or 2 ma terms). The memory usage remains unchanged even after the codes finishes and I clear the data. The problem is resolved only when I restart Stata. This only happens with ARIMA, standard regression does not affect anything. My guess is that the Kalman filter creates a lot of extra data which are then no unloaded.
I am not sure what kind of minimum working example to report here
. I just run a lot of ARIMA (0,0,1) models with independent variables, so ARMAX to be precise. Here is the example:
Any suggestions?
I have a very curious problem when running rolling forecasts with ARIMA. In every iteration (non-recursive forecast), Stata becomes a little slower, but eventually very slow. The first model takes five minutes to run, but by the 20th it is over one hour, for the same data and minimal differences in specification. I had a look and it seems like with every iteration, the amount of physical memory consumed rises. I started with around 100MB, and after 500 iterations it's gone to 800MB. With 5000 iterations it's over 5GB.
This is not an issue of Stata taking up a memory because the computation is hard. The sample size is small (time series, T=100 with 5 regressors and 1 or 2 ma terms). The memory usage remains unchanged even after the codes finishes and I clear the data. The problem is resolved only when I restart Stata. This only happens with ARIMA, standard regression does not affect anything. My guess is that the Kalman filter creates a lot of extra data which are then no unloaded.
I am not sure what kind of minimum working example to report here

Code:
arima y l.x1, arima(0,0,1)