Mean with second order correction

Hi,
I have a question regarding the theoretical mean computed by dynare for second order accurate solutions.
The moments are either automatically supplied as part of stoch_simul or can be accessed via disp_th_moments(dr,M_.endo_names). I am wondering how the second order correction is computed and where (it appears that the correction is displayed in oo_.gamma_y{8})?

The particular problem that I am grappling with is that the theoretical means computed in my case look very weird. I am working on a symmetric two country model and find that the mean of the variables is not symmetric, e.g. the mean of output yh is -6.7401 and yf 9.1625 . This also shows the second problem which is that the theoretical mean in the first case does not make any sense, as it is negative.

I have to admit that I do not even clearly understand why we should have a correction term at the second order anyway. I mean I have read bits that said it’s a shift due to the variance of future shocks and such like, but nothing that actually explains why, so any pointers there would also be most welcome.

My particular model is somewhat too long to be displayed here, but at least the question about non symmetry appears to be more general - I attach a file used by Colacito et al to illustrate the use of Matlab. It’s a simple two country model and the theoretical moments are still not symmetric.

Many thanks for your help,

macrodyn
TwocountryApprox.mod (841 Bytes)

When I run the example you attach, the theoretical means are the same for y1 and y2.

If you are working with an incomplete markets two country model, there is a possibility that you do not have stationarity inducing mechanisms in net foreign assets, so in that case the theoretical means are not unique.

Hi,

Is there a way to write the adjustment costs in dynare by writing the code with exp(x), where x is the variable, but to also have the net foreign asset positions being equal to zero. I am using the function proposed by Benigno and Schmidtt-Grohe and Uribe (2003). The problem is that I need to specify the steady state variables as log(X), where X is the steady state value of x. If this is X=0, then the log is not defined. I tried to write the equal for assets in levels but I get the following message

“ERROR: OpenEconomyIM.mod:105.114-121: To use an external function within the model block, you must first declare it via the external_function() statement.”

First of all, if a variable has a steady state of 0 or a negative one, do not put this variable in exp(). Do it with all other variables. Second, your error has nothing to do with this issue. Please post the mod-file.