Dear Michel and Sebastien,
working on the model derivatives w.r.t. parameters I noted that we are missing one aspect of the story. In the current state, model derivatives are only correct for parameters which do not affect the steady state of the model.
In general we have a non-linear model. So, the Jacobian is also a function of the steady state of the model which, in turn, is also a function of the model parameters.
So, when calling the MODEL_params_derivs.m routine, we need to provide both the steady state vector "y" AND the derivative of the steady state w.r.t. to deep parameters "dy", i.e. a modified call like:
gp = MODEL_arams_derivs(y, dy, x, params, it_).
Now, "dy" has to be given either analytically by the modeller, if this is available, or by some numerical or implicit derivation procedure from the 'static' model definition.
Given this information, the most general form of the MODEL_params_derivs.m should include this "dy" information.
What do you think ? best wishes Marco