Thanks for your patient reply, Prof Pfeifer.
I have two more questions about SMM:
(1) I think there is a bug in line 233.
I change two line in objective_function.m, but when I run the SOE_SMM.mod, it report:
and I pause the objective_function.m in line 232,

So I change the line 233 in objective_function.m:
fval = ones(size(oo_.mom.data_moments,1),1)*options_mom_.huge_number;
The mod file can run sucessfully.
(2) I think there is something wrong with my data or code, but I really don’t know where is wrong.
When I run the nonlinear model at order 3, the result is weird:
Figure 1 show lsqnonlin may be not solve the problem?
Figure 2 and 3 show estimation at stage 1 and stage 2 is close, and I think the value of J-test is wrong.
Data moment :E(C) E(Y) E(I) is 0.0000
As you can see, I think the mod file and steady_state.m are right, because my model only introduce uncertatiny shock into Gali chanpter8 nonlinear model.
And I use hpfilter process data, so it is stationary.
but the result is really weird.



