jmaih / RISE_toolbox

Solution and estimation of Markov Switching Rational Expectations / DSGE Models
BSD 3-Clause "New" or "Revised" License
104 stars 77 forks source link

Stochastic steady state with RISE? #113

Closed jkrenz closed 5 years ago

jkrenz commented 5 years ago

Hi,

I wonder if it is possible to calculate the stochastic steady state with RISE -- or rather, whether there is something like a stochastic steady state in a regime-switching model solved with RISE?

To clarify matters, I'm referring to the stochastic steady state defined as the point to which the economy converges in the absence of shocks but with agents knowing that shocks could happen any time.

In general, I think, it is possible to calculate the stochastic steady state in a model with occasionally binding constraints (see, e.g., Akinci&Queralto (2017, WP) or Gertler et al. (2012, JME)). However, when I simulate a model with an occasionally binding constraint in RISE, with zero shocks, for a very long time, I still get -- quite significant -- fluctuations in the endogenous variables whenever the regime switches. And due to the way RISE works, there will always be a few regime switches even though the (endogenous) probability to switch is very low.

I guess when using a global method to solve a model with an occasionally binding constraint, such as Akinci&Queralto (2017), and when simulating this model without shocks for a very long time, there won't be any regime switches any more, i.e., the economy really converges to one point. This is however not the case with RISE.

What I did now, is, I simulated the model without shocks for 10000 periods (at a second-order approx. level) and then kept a simulation in which there hadn't been a regime change within the last 200 periods. From this simulation I took the last value of the variables I was interested in as the "stochastic steady state value". Alternatively, I simulated the regime for 10000 periods without shocks AND fixing the regime to the non-binding regime (which is kind of the "default regime" in my model, i.e., the regime the economy stays in most of the time even if shocks are present). Then, I again took the last value of this simulation as the "stochastic steady state value". The results from the two approaches were similar. However, I wonder whether any of these two points can really be referred to as "stochastic steady state"?

Thanks a lot!

Best, Johanna

jmaih commented 5 years ago

Hi Johanna,

The simplest answer to your question is that whatever applies to a constant parameter model will apply also to the encompassing regime switching version of the same model. If you solve the model to a higher-order of approximation, you get an added constant that is related to the perturbation parameter. The added constant will alter the mean of the system. Perhaps it is this mean that you call the stochastic steady state? Because of the nonlinearity of the system that quantity cannot be computed analytically, especially in a regime switching model. You may want to resort to simulation.

Now you have to note that in a regime switching context, uncertainty is not exclusively due to shocks. Uncertainty is also related to the stochastic mechanism by which regimes change. And so we cannot interpret the resulting mean as the point where agents... as you said. The theory of stochastic steady states has not been extended to regime switching yet.

Now, as you have already experienced, you also have to deal with the fact that there are regimes. What you are saying is incorrect that when solving the model with a global method, the economy will converge to one point... and that this is not the case with RISE. Using the term global methods is in my opinion incorrect: the solution you find will depend on many things including the precise details of where you pick your grid. I prefer to call those methods projection methods. It is also the case that strictly speaking the model may have multiple solutions. There is no mathematical theorem telling us anything about the stability of a nonlinear system. Whether the solution is stable or not is not something we can demonstrate mathematically. You should also keep in mind that people typically use pruning when simulating models solved using perturbation.

Cheers,

J.

-- "You can never know everything", Lan said quietly, "and part of what you know is always wrong. Perhaps even the most important part. A portion of wisdom lies in knowing that. A portion of courage lies in going on anyway." Robert Jordan, Winter's Heart, Book IX of the Wheel of Time.

We have not succeeded in answering all of our problems. The answers we have found only serve to raise a whole set of new issues. In some ways we are as confused as ever, but we believe we are confused on a higher level and about more important things. (cited in Øksendal, 1985)

On Thu, Aug 29, 2019 at 4:20 PM jkrenz notifications@github.com wrote:

Hi,

I wonder if it is possible to calculate the stochastic steady state with RISE -- or rather, whether there is something like a stochastic steady state in a regime-switching model solved with RISE?

To clarify matters, I'm referring to the stochastic steady state defined as the point to which the economy converges in the absence of shocks but with agents knowing that shocks could happen any time.

In general, I think, it is possible to calculate the stochastic steady state in a model with occasionally binding constraints (see, e.g., Akinci&Queralto (2017, WP) or Gertler et al. (2012, JME)). However, when I simulate a model with an occasionally binding constraint in RISE, with zero shocks, for a very long time, I still get -- quite significant -- fluctuations in the endogenous variables whenever the regime switches. And due to the way RISE works, there will always be a few regime switches even though the (endogenous) probability to switch is very low.

I guess when using a global method to solve a model with an occasionally binding constraint, such as Akinci&Queralto (2017), and when simulating this model without shocks for a very long time, there won't be any regime switches any more, i.e., the economy really converges to one point. This is however not the case with RISE.

What I did now, is, I simulated the model without shocks for 10000 periods (at a second-order approx. level) and then kept a simulation in which there hadn't been a regime change within the last 200 periods. From this simulation I took the last value of the variables I was interested in as the "stochastic steady state value". Alternatively, I simulated the regime for 10000 periods without shocks AND fixing the regime to the non-binding regime (which is kind of the "default regime" in my model, i.e., the regime the economy stays in most of the time even if shocks are present). Then, I again took the last value of this simulation as the "stochastic steady state value". The results from the two approaches were similar. However, I wonder whether any of these two points can really be referred to as "stochastic steady state"?

Thanks a lot!

Best, Johanna

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jmaih/RISE_toolbox/issues/113?email_source=notifications&email_token=AATKBT7UZ4NAQ7GLPW2OINDQG7LKJA5CNFSM4ISC4MDKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HIG3LKA, or mute the thread https://github.com/notifications/unsubscribe-auth/AATKBTYFVECX6RV7RINS4GTQG7LKJANCNFSM4ISC4MDA .

jkrenz commented 5 years ago

Hi Junior,

thanks a lot for your detailed answer!

For now, I opted for a version where I simulate the model at second-order without shocks for twice as many periods as before. And then, instead of taking the first value of a variable after the burn-in phase as stochastic steady state value -- as I would do for a constant-parameter model -- I took the mean of the variable over all the simulations after the burn-in phase. This way the "stochastic steady state" value of the variable catches binding as well as non-binding periods. It would be defined as the point to which the economy converges in the absence of shocks but with agents knowing that shocks could happen any time and in the presence of uncertainty due to regime-switches, I guess. However, I also plan to ask authors who report stochastic steady state values from a model with regime switches how exactly they calculated these values.

Best, Johanna

jmaih commented 5 years ago

Hi Johanna,

The notion of steady state in a regime switching context is not necessarily the same as in the constant parameter case. In a regime switching model, turning off the shocks is not sufficient for the system to stabilize: it can still jump from one regime to another. With that said, what you compute after simulation in a regime switching model doesn't strike me as a steady state : at best it is the ergodic mean. My understanding is that in a constant parameter model, ergodic mean and stochastic steady state would essentially be the same.

Cheers,

J.

On Mon, Sep 2, 2019 at 3:49 PM jkrenz notifications@github.com wrote:

Hi Junior,

thanks a lot for your detailed answer!

For now, I opted for a version where I simulate the model at second-order without shocks for twice as many periods as before. And then, instead of taking the first value of a variable after the burn-in phase as stochastic steady state value -- as I would do for a constant-parameter model -- I took the mean of the variable over all the simulations after the burn-in phase. This way the "stochastic steady state" value of the variable catches binding as well as non-binding periods. It would be defined as the point to which the economy converges in the absence of shocks but with agents knowing that shocks could happen any time and in the presence of uncertainty due to regime-switches, I guess. However, I also plan to ask authors who report stochastic steady state values from a model with regime switches how exactly they calculated these values.

Best, Johanna

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jmaih/RISE_toolbox/issues/113?email_source=notifications&email_token=AATKBTYX3FKV3VRWJHBI6F3QHUKU5A5CNFSM4ISC4MDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5V34ZA#issuecomment-527154788, or mute the thread https://github.com/notifications/unsubscribe-auth/AATKBTYY3XVUEMHQTEEDFADQHUKU5ANCNFSM4ISC4MDA .

jkrenz commented 5 years ago

Hi Junior,

thanks again for your comments.

About your last sentence, I learned that Steady state + risk adjustment for variance of future shocks = risky/stochastic steady state; Risky/stochastic steady state + risk adjustment for variance of past shocks = ergodic mean; Hence, I don't understand why they should be the same in a constant parameter model?

Best, Johanna

jmaih commented 5 years ago

Hi Johanna, I do not fully understand why there is a particular emphasis on the notion of stochastic steady state in the literature. At first order of approximation, the steady state, the stochastic steady state and the ergodic mean are all the same in a constant-parameter model, but, in general, not in a regime switching model.

My understanding is that for a constant parameter model, the solution of the model can be written in deviation from the steady state at first-order of approximation or in deviation from the ergodic mean at higher orders. I would not know how to write the solution of the model in deviations from the stochastic steady state. When I wrote that ergodic mean and stochastic steady state would be essentially the same, I should have written it differently. I took for granted that by saying essentially one would understand that I didn't mean identical.

With that said, I do not understand your definition of Ergodic mean = Risky steady state + risk adjustment for variance of past shocks. Past shocks are known, once we know them their variance is zero. Is there any reference for that?

Cheers,

J.

On Thu, Sep 5, 2019 at 11:40 AM jkrenz notifications@github.com wrote:

Hi Junior,

thanks again for your comments.

About your last sentence, I learned that Steady state + risk adjustment for variance of future shocks = risky/stochastic steady state; Risky/stochastic steady state + risk adjustment for variance of past shocks = ergodic mean; Hence, I don't understand why they should be the same in a constant parameter model?

Best, Johanna

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jmaih/RISE_toolbox/issues/113?email_source=notifications&email_token=AATKBT7FCOPNABVXN2U77ETQIDH2RA5CNFSM4ISC4MDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD56QAAI#issuecomment-528285697, or mute the thread https://github.com/notifications/unsubscribe-auth/AATKBT7CMCNV6MRVYARUPODQIDH2RANCNFSM4ISC4MDA .

jkrenz commented 5 years ago

Hi Junior,

I guess in the constant-parameter-DSGE literature people like to use the stochastic steady state when they want to discuss the degree of risk present in the system, i.e. potential precautionary behavior by agents. But to obtain this info, obviously, the model has to be approximated up to second order.

Now, in our switching-parameter model, we want to obtain the stochastic steady state, because we want to see how our results compare to those of other financial frictions models with occasionally binding costraints. And as I wrote before, e.g., Akinci&Queralto (2017, WP) or Gertler et al. (2012, JME) also report stochastic steady state values for their occasionally binding constraint model, essentially for the same reason I stated above with respect to constant-parameter models: do discuss precautionary behavior by agents. We do NOT want write the solution of the model in deviations from the stochastic steady state.

I don't have a reference for my definition of ergodic mean, I got it from some colleague, I think when we talked about the difference between ergodic mean and risky steady state. What I meant with "risk adjustment for variance of past shocks" is basically that one way of finding the ergodic mean is by simulating the model WITH shocks over a long period as opposed to simulating it WITHOUT shocks as I would to for finding the stochastic steady state.

One (slightly) related questions: When I use [m,retcode]=solve(m,'steady_state_unique',true), what RISE reports as "steady state" when using the print_solution(m) command (and in m.solutions.ss) is the ergodic mean, correctly?

Best, Johanna

jmaih commented 5 years ago

Hi Johanna,

What RISE calls steady state is simply the deterministic steady state. RISE does not formally compute the ergodic mean at least for the purpose of presenting the solution. This is why RISE reports in separate expressions (@sig, @sig@sig,...), the elements related to the perturbation parameter.

Note that in a regime switching model, you can have an effect of the perturbation parameter already at first-order approximation.

Cheers,

J.

On Mon, Sep 9, 2019 at 10:28 AM jkrenz notifications@github.com wrote:

Hi Junior,

I guess in the constant-parameter-DSGE literature people like to use the stochastic steady state when they want to discuss the degree of risk present in the system, i.e. potential precautionary behavior by agents. But to obtain this info, obviously, the model has to be approximated up to second order.

Now, in our switching-parameter model, we want to obtain the stochastic steady state, because we want to see how our results compare to those of other financial frictions models with occasionally binding costraints. And as I wrote before, e.g., Akinci&Queralto (2017, WP) or Gertler et al. (2012, JME) also report stochastic steady state values for their occasionally binding constraint model, essentially for the same reason I stated above with respect to constant-parameter models: do discuss precautionary behavior by agents. We do NOT want write the solution of the model in deviations from the stochastic steady state.

I don't have a reference for my definition of ergodic mean, I got it from some colleague, I think when we talked about the difference between ergodic mean and risky steady state. What I meant with "risk adjustment for variance of past shocks" is basically that one way of finding the ergodic mean is by simulating the model WITH shocks over a long period as opposed to simulating it WITHOUT shocks as I would to for finding the stochastic steady state.

One (slightly) related questions: When I use [m,retcode]=solve(m,'steady_state_unique',true), what RISE reports as "steady state" when using the print_solution(m) command (and in m.solutions.ss) is the ergodic mean, correctly?

Best, Johanna

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jmaih/RISE_toolbox/issues/113?email_source=notifications&email_token=AATKBT5MOSIAQ7VZVY4K6H3QIYCJ3A5CNFSM4ISC4MDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6GVGHY#issuecomment-529355551, or mute the thread https://github.com/notifications/unsubscribe-auth/AATKBT6QXK2QISILBQPE5DLQIYCJ3ANCNFSM4ISC4MDA .