Displayed and stored variances look different. Am I collecting them incorrectly? (within a parameter loop)

Good afternoon,

I use a loop to explore how some macro variable volatility change over financial development in my IRBC model. Before introducing the loop, I detected some non-linear patterns (hump shape) in the standard deviations displayed in dynare output when I simulated the model for different values of the parameter measuring this financial development, one-by-one.
Whithin the loop, however, I collect variances from oo_.var(x,x). The results are strange to me. No pattern is found in the behaviour of the variances.
Why are the results different? How could I correctly collect what I want? Was I wrong when I interpreted the changes of the standard deviations appeared in the command window in every run?

Thank you so much
dyn_main.mod (8.3 KB) dyn_extract.m (1.3 KB) dyn_main_steadystate.m (955 Bytes) dyn_stats.m (2.1 KB) dyn_table.m (3.8 KB) findss.m (503 Bytes) stst.m (1.9 KB)eta_loop.m (3.0 KB)

I fail to see how you change anything in your loop before calling stoch_simul

Do you mean that my loop does not manage to change the value of H parameter in the model in every iteration? Why do I get different variances (the plots) if this is the case? How should I proceed, then?

Here you have a new try… Thank you so much.
eta_loop.m (3.7 KB)

Yes, the set_param_value is the way to go. As you are doing simulations, you may also want to consider setting a seed.