Estimating (Detrended) Non-stationary model with SMM/GMM

Dear Professor Pfeifer,

If we are attempting to estimate structural parameters, such as shock standard deviations and persistence using SMM/GMM. But the model being non-stationary is written with detrended equations, specifically the Aguiar and Gopinath (2007) model using your code as a crucial reference to rebuild the non-stationary series after the model block. We then run the hp-filter and calculate moments from the simulated series. But how do we integrate this in the SMM/GMM framework in dynare directly ? If not what other alternatives can we use, as doing the same in Matlab, where we simulate the model in dynare with each iteration of parameters, is proving to be very inefficient. What is the best practice with regards to estimating structural parameters in non-stationary models.

I have uploaded the relevant files we are using for the same.

get_moment_contributions.m (4.1 KB)

calculate_optimal_W.m (1.7 KB)

param.m (281 Bytes)

run_smm_estimation_final.m (5.7 KB)

smm_objective.m (3.4 KB)

save_params_to_m.m (1.3 KB)

aguiar_gopinath_soe.mod (5.2 KB)

Thank you so much for your time and guidance.

Best Regards,

1 Like