Unit roots, welfare, and periods

Hello everybody,

I’m doing a common thing: I try to find an optimal simple rule based on a second-order solution in a non-linear model. My model contains unit-roots which most likely result from prices being modeled in absolute terms. I rely on the optimizer used here:

Optimal policy parameters in a non-linear model - #2 by jpfeifer

However, my question is actually related to the presence of unit roots. When I search for the optimal parameters, the results enormously hinge on the number of periods specified in stoch_simul. For instance, for periods=2000, I obtain IRFs that do return to the steady-state, a welfare gain of the expected low margin, but also very low parameters (close to 0). But, when I set periods=10000, my IRFs clearly show unit-root behavior, I receive an infinite welfare gain, and some parameters are very close to the upper bound. What is the way to go here? Can I perform such a welfare analysis anyway in the presence of unit roots? And should I use the pruning and periods options in stoch_simul?

I appreciate any help.

Best,

WiMa

get_minus_welfare_objective.m (1.7 KB) WiMa.mod (22.5 KB)

Simulations with unit roots are never a good idea. Why can’t you rely on theoretical moments?

Thanks four your answer.

With theoretical moments,
I obtain Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 7.659976e-20. and the solver only returns the penalty, so no real solution.

That is not a good sign, but may indicate a deeper issue. Can you provide the file generating the problem?

The .mod file should be attached above.

I would appreciate if you‘d look at it!