# Steady State solved outside dynare but can not be solved inside

Hi all,

I solved for the initial guess for the steady state outside dynare. The inital guess works if I set the home bias tau to be 1 for all destination and origin country pairs. But it does not work when I set home bias for foreign countries to be lower than 1. It is weird that SS is solved outside dynare and all equations have close to zero residues. But dynare says there is still a 0.0143 gap. Can someone help me look into this? Thank you so much! The steady_state.m is the first step for solving SS assuming trade is balanced, the second step is given the first step answer and relax the balanced trade assumption.

Best,
Chengyuan
a.mat (845 Bytes)
dynare_Benchmark_temp1.mod (17.7 KB)
start_Benchmark_temp1.m (4.7 KB)

Particularly problematic are the residuals in

``````Equation number 275 : 0.98353 : Capital market clearing
Equation number 276 : 0.98407 : 276
Equation number 277 : 0.98208 : 277
``````

This suggests either a mistake in those equations or a conceptual problem in your steady state solution.

Thank you professor. I solved it. There is another question. I am using the built in SMM of dynare. I am wondering how I can target the standard deviation of a variable. I can only see E(x^2) possible.

Thatâ€™s only possible with the `prefilter`-option. But you can always define a demeaned variable in the model block so that the centered and uncentered moment coincide.

Thank you very much professor. I used the prefilter option in SMM. In SMM it says the variance is almost perfectly matched to data. But when I do the stochastic simulation, the approximated theoretical moments report
main.m (8.7 KB)
M_Calivar.mat (2.9 KB)
dynare_Benchmark.mod (28.9 KB)
the variances different from SMM. Could you please explain that for me?