Tips for faster estimation

Dear all,

I am estimating a very large model with an expanding window to test for out of sample RMSE performance. Because the estimation is very slow, I am looking for every possible way to speed it up, even at the price of some accuracy.

For now, I added the options:

  1. nodisplay
  2. nodiagnostic
  3. nograph
  4. fast_kalman_filter (I hope it is useful)
  5. no_posterior_kernel_density (not sure exactly it is helping)
  6. optim=(‘TolFun’,0.01), which helps a lot at the cost of accuracy.
  7. I am using previous estimation results as the new initial guess for newer estimation with “estimated_params_init”
  8. I disabled SMT (hyper-threading) for my AMD CPU, and apparently, now it is twice as fast (previously it used around 50% of the CPU)

I am doing some tests for different mode_compute. Which one is usually faster?
Does anyone know other tips for speeding up the estimation procedure?

Also, the estimation spends a lot of time (could be half of the estimation time) after the last iteration, after displaying “Final value of minus the log posterior…” and before displaying the parameters values and std’s. I think it computes the hessian (with the “hessian” function), which I think I might not need (I am only interested in point forecast). Does anyone know a way to keep some of it?

Thanks, Yaakov

Without seeing the codes, it’s hard to give specific advice. Are you running an MCMC?

  1. For very large models, the univariate Kalman filter can be faster.
  2. mode_compute=5 tends to work fast and efficiently.
  3. Regarding not computing the Hessian, set options_.cova_compute=0.
1 Like

Thanks!!!
The option to not compute the hessian helped a lot. For now, it seems that mode_copmpute 4 is still faster than 5 for my model, but I will try it again if and when I will enlarge the model.

About the univariate Kalman filter, is it important only if I have missing data (for now, the estimation speed was about the same for my model)?

Thanks, Johannes

For the univariate filter, potential gains very much depend on the model dimensions.