Hello Professor,
I am currently trying to replicate the GMM estimation from Aguiar & Gopinath (2007, JPE), where the model features an explicit stochastic trend in productivity (I(1) technology process).
I have successfully set up the stationary version of the model in Dynare by normalizing the trending variables with the stochastic trend (e.g., y^t=Yt/Γt−1) and writing the equilibrium conditions in terms of these stationary variables and the growth rate of the trend, gt. I also have an analytical steady-state block for this stationary model.
My confusion is about the next step: using the method_of_moments command to match the empirical moments, which are based on the original, non-stationary data.
The moments used in the papers are a mix of transformations:
-
Moments of HP-filtered variables (e.g., variance of HP-filtered log output).
-
Moments of unfiltered growth rates (e.g., variance of log-differences of output).
-
Moments of filtered ratios (e.g., variance of HP-filtered Net Exports/GDP).
My core questions are:
-
How does Dynare bridge the gap? Given that Dynare’s solver works with the stationary model, how does it analytically compute the theoretical moments for these transformed, non-stationary variables? I have read the authors’ 2004 NBER working paper and their 2007 program notes, which detail the complex matrix algebra required to derive these moments analytically. Does Dynare’s method_of_moments command automate this entire procedure “under the hood”?
-
Can the matched_moments block handle this directly? Can I simply specify the observable variables in varobs as the non-stationary series (e.g., Y,C,I,NX) and then write expressions like variance of hp filtered log y or autocovariance of hp filtered logy with its first lag directly inside the matched_moments block? Or is an external MATLAB helper function still required to pre-calculate these moments? If yes, then what’s the best way to proceed?
-
Is SMM a valid alternative for this case? As a potential alternative, I was considering Simulated Method of Moments (SMM). If I were to use SMM, would the correct procedure be to:
-
Simulate the stationary model variables (y^t, c^t, etc.) and the trend growth (gt).
-
Use these simulations to reconstruct the non-stationary series (Yt=y^tΓt−1).
-
Apply the same data transformations (logs, HP-filter, ratios) to the simulated non-stationary series.
-
Finally, compute the moments from this processed simulated data to match with the empirical moments?
-
I’m trying to replicate this using modern Dynare’s capabilities as cleanly as possible. Any clarification on the correct workflow would be incredibly helpful.
Thank you for your time and expertise!