Hello,
In working on https://git.dynare.org/Dynare/dynare/issues/1197 I came across a potential bug.
As you can see from lines 22-24 & 39 of https://git.dynare.org/Dynare/dynare/blob/master/matlab/discretionary_policy..., upon exiting discretionary_policy(), `options_ `contains the original values it had upon entering the function with the field `discretionary_policy` set equal to 1.
However, the call to stoch_simul potentially changes options_, as you can see on line 99 of https://git.dynare.org/Dynare/dynare/blob/master/matlab/stoch_simul.m. Here, the field `logged_steady_state` is set to 1 with the idea that this value should be preserved upon exit of the function. However, given the way discretionary_policy has been written above, it is not preserved.
So the question is: is this a bug? If not, that would imply that discretionary_policy is incompatible with the loglinear option of stoch_simul: should I then end processing if the two hold simultaneously? If not, then we should only overwrite the `order` option in discretionary_policy with its original value.
Best, Houtan
Hi Houtan,
discretionary_policy should only be used with a linear model and not a linearIZED model (IMHO we could consider imposing in the parser this restriction). Therefor there is no reason to accept option loglinear with discretionary_policy
Best
Michel
Houtan Bastani writes:
Hello,
In working on https://git.dynare.org/Dynare/dynare/issues/1197 I came across a potential bug.
As you can see from lines 22-24 & 39 of https://git.dynare.org/Dynare/dynare/blob/master/matlab/discretionary_policy..., upon exiting discretionary_policy(), `options_ `contains the original values it had upon entering the function with the field `discretionary_policy` set equal to 1.
However, the call to stoch_simul potentially changes options_, as you can see on line 99 of https://git.dynare.org/Dynare/dynare/blob/master/matlab/stoch_simul.m. Here, the field `logged_steady_state` is set to 1 with the idea that this value should be preserved upon exit of the function. However, given the way discretionary_policy has been written above, it is not preserved.
So the question is: is this a bug? If not, that would imply that discretionary_policy is incompatible with the loglinear option of stoch_simul: should I then end processing if the two hold simultaneously? If not, then we should only overwrite the `order` option in discretionary_policy with its original value.
Best, Houtan _______________________________________________ Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev
Hi, I would not go as far as Michel. But we explicitly state in the manual: "You should ensure that your model is linear and your objective is quadratic" I don't mind Dynare linearizing the model for me. I consider this a big advantage. But I would provide an error if `loglinear` is used. There are easy ways around this for users, e.g. using an exp()-substitution or appending logged variables to the model. Best, Johannes
-----Ursprüngliche Nachricht----- Von: Dev dev-bounces@dynare.org Im Auftrag von Michel Juillard Gesendet: Mittwoch, 11. September 2019 17:32 An: List for Dynare developers dev@dynare.org Betreff: Re: [DynareDev] Issue #1197
Hi Houtan,
discretionary_policy should only be used with a linear model and not a linearIZED model (IMHO we could consider imposing in the parser this restriction). Therefor there is no reason to accept option loglinear with discretionary_policy
Best
Michel
Houtan Bastani writes:
Hello,
In working on https://git.dynare.org/Dynare/dynare/issues/1197 I came across a potential bug.
As you can see from lines 22-24 & 39 of https://git.dynare.org/Dynare/dynare/blob/master/matlab/discretionary_ policy.m, upon exiting discretionary_policy(), `options_ `contains the original values it had upon entering the function with the field `discretionary_policy` set equal to 1.
However, the call to stoch_simul potentially changes options_, as you can see on line 99 of https://git.dynare.org/Dynare/dynare/blob/master/matlab/stoch_simul.m. Here, the field `logged_steady_state` is set to 1 with the idea that this value should be preserved upon exit of the function. However, given the way discretionary_policy has been written above, it is not
preserved.
So the question is: is this a bug? If not, that would imply that discretionary_policy is incompatible with the loglinear option of stoch_simul: should I then end processing if the two hold simultaneously? If not, then we should only overwrite the `order` option in discretionary_policy with its original value.
Best, Houtan _______________________________________________ Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev
-- Michel Juillard _______________________________________________ Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev
Hi Johannes
the problem with linearizing a model, is that contrarily to Ramsey, the discretionary solution for a linearized model isn't an approximation of the discretionary solution in the original non-linear model (in part because we don't know how to compute the steady state of a non-linear model under discretionary policy).
Is the manual clear enough on that point?
Best
Michel
Johannes Pfeifer writes:
Hi, I would not go as far as Michel. But we explicitly state in the manual: "You should ensure that your model is linear and your objective is quadratic" I don't mind Dynare linearizing the model for me. I consider this a big advantage. But I would provide an error if `loglinear` is used. There are easy ways around this for users, e.g. using an exp()-substitution or appending logged variables to the model. Best, Johannes
-----Ursprüngliche Nachricht----- Von: Dev dev-bounces@dynare.org Im Auftrag von Michel Juillard Gesendet: Mittwoch, 11. September 2019 17:32 An: List for Dynare developers dev@dynare.org Betreff: Re: [DynareDev] Issue #1197
Hi Houtan,
discretionary_policy should only be used with a linear model and not a linearIZED model (IMHO we could consider imposing in the parser this restriction). Therefor there is no reason to accept option loglinear with discretionary_policy
Best
Michel
Houtan Bastani writes:
Hello,
In working on https://git.dynare.org/Dynare/dynare/issues/1197 I came across a potential bug.
As you can see from lines 22-24 & 39 of https://git.dynare.org/Dynare/dynare/blob/master/matlab/discretionary_ policy.m, upon exiting discretionary_policy(), `options_ `contains the original values it had upon entering the function with the field `discretionary_policy` set equal to 1.
However, the call to stoch_simul potentially changes options_, as you can see on line 99 of https://git.dynare.org/Dynare/dynare/blob/master/matlab/stoch_simul.m. Here, the field `logged_steady_state` is set to 1 with the idea that this value should be preserved upon exit of the function. However, given the way discretionary_policy has been written above, it is not
preserved.
So the question is: is this a bug? If not, that would imply that discretionary_policy is incompatible with the loglinear option of stoch_simul: should I then end processing if the two hold simultaneously? If not, then we should only overwrite the `order` option in discretionary_policy with its original value.
Best, Houtan _______________________________________________ Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev
Hi Michel, that is a subtle point that is typically neglected in the literature. For that reason, we should elaborate in the manual, but not enforce additional restrictions apart from not allowing `loglinear`. Best, Johannes
-----Ursprüngliche Nachricht----- Von: Dev [mailto:dev-bounces@dynare.org] Im Auftrag von Michel Juillard Gesendet: Mittwoch, 11. September 2019 18:50 An: List for Dynare developers dev@dynare.org Betreff: Re: [DynareDev] Issue #1197
Hi Johannes
the problem with linearizing a model, is that contrarily to Ramsey, the discretionary solution for a linearized model isn't an approximation of the discretionary solution in the original non-linear model (in part because we don't know how to compute the steady state of a non-linear model under discretionary policy).
Is the manual clear enough on that point?
Best
Michel
Johannes Pfeifer writes:
Hi, I would not go as far as Michel. But we explicitly state in the manual: "You should ensure that your model is linear and your objective is quadratic" I don't mind Dynare linearizing the model for me. I consider this a big advantage. But I would provide an error if `loglinear` is used. There are easy ways around this for users, e.g. using an exp()-substitution or appending logged variables to the model. Best, Johannes
-----Ursprüngliche Nachricht----- Von: Dev dev-bounces@dynare.org Im Auftrag von Michel Juillard Gesendet: Mittwoch, 11. September 2019 17:32 An: List for Dynare developers dev@dynare.org Betreff: Re: [DynareDev] Issue #1197
Hi Houtan,
discretionary_policy should only be used with a linear model and not a linearIZED model (IMHO we could consider imposing in the parser this restriction). Therefor there is no reason to accept option loglinear with discretionary_policy
Best
Michel
Houtan Bastani writes:
Hello,
In working on https://git.dynare.org/Dynare/dynare/issues/1197 I came across a potential bug.
As you can see from lines 22-24 & 39 of https://git.dynare.org/Dynare/dynare/blob/master/matlab/discretionary _ policy.m, upon exiting discretionary_policy(), `options_ `contains the original values it had upon entering the function with the field `discretionary_policy` set equal to 1.
However, the call to stoch_simul potentially changes options_, as you can see on line 99 of https://git.dynare.org/Dynare/dynare/blob/master/matlab/stoch_simul.m. Here, the field `logged_steady_state` is set to 1 with the idea that this value should be preserved upon exit of the function. However, given the way discretionary_policy has been written above, it is not
preserved.
So the question is: is this a bug? If not, that would imply that discretionary_policy is incompatible with the loglinear option of stoch_simul: should I then end processing if the two hold simultaneously? If not, then we should only overwrite the `order` option in discretionary_policy with its original value.
Best, Houtan _______________________________________________ Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev
-- Michel Juillard _______________________________________________ Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev
Thanks Johannes. This is fine with me.
Best
Michel
Johannes Pfeifer writes:
Hi Michel, that is a subtle point that is typically neglected in the literature. For that reason, we should elaborate in the manual, but not enforce additional restrictions apart from not allowing `loglinear`. Best, Johannes
-----Ursprüngliche Nachricht----- Von: Dev [mailto:dev-bounces@dynare.org] Im Auftrag von Michel Juillard Gesendet: Mittwoch, 11. September 2019 18:50 An: List for Dynare developers dev@dynare.org Betreff: Re: [DynareDev] Issue #1197
Hi Johannes
the problem with linearizing a model, is that contrarily to Ramsey, the discretionary solution for a linearized model isn't an approximation of the discretionary solution in the original non-linear model (in part because we don't know how to compute the steady state of a non-linear model under discretionary policy).
Is the manual clear enough on that point?
Best
Michel
Johannes Pfeifer writes:
Hi, I would not go as far as Michel. But we explicitly state in the manual: "You should ensure that your model is linear and your objective is quadratic" I don't mind Dynare linearizing the model for me. I consider this a big advantage. But I would provide an error if `loglinear` is used. There are easy ways around this for users, e.g. using an exp()-substitution or appending logged variables to the model. Best, Johannes
-----Ursprüngliche Nachricht----- Von: Dev dev-bounces@dynare.org Im Auftrag von Michel Juillard Gesendet: Mittwoch, 11. September 2019 17:32 An: List for Dynare developers dev@dynare.org Betreff: Re: [DynareDev] Issue #1197
Hi Houtan,
discretionary_policy should only be used with a linear model and not a linearIZED model (IMHO we could consider imposing in the parser this restriction). Therefor there is no reason to accept option loglinear with discretionary_policy
Best
Michel
Houtan Bastani writes:
Hello,
In working on https://git.dynare.org/Dynare/dynare/issues/1197 I came across a potential bug.
As you can see from lines 22-24 & 39 of https://git.dynare.org/Dynare/dynare/blob/master/matlab/discretionary _ policy.m, upon exiting discretionary_policy(), `options_ `contains the original values it had upon entering the function with the field `discretionary_policy` set equal to 1.
However, the call to stoch_simul potentially changes options_, as you can see on line 99 of https://git.dynare.org/Dynare/dynare/blob/master/matlab/stoch_simul.m. Here, the field `logged_steady_state` is set to 1 with the idea that this value should be preserved upon exit of the function. However, given the way discretionary_policy has been written above, it is not
preserved.
So the question is: is this a bug? If not, that would imply that discretionary_policy is incompatible with the loglinear option of stoch_simul: should I then end processing if the two hold simultaneously? If not, then we should only overwrite the `order` option in discretionary_policy with its original value.
Best, Houtan _______________________________________________ Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev