RISE Toolbox: Advancing Regime-Switching Models for Macroeconomic Analysis
Junior Maih, Norges Bank
The RISE Toolbox is designed for solving, estimating, and analyzing nonlinear regime-switching DSGE models. Regime-switching models are essential for addressing the complexities of economic environments, such as the zero lower bound, financial crises, and high inflation periods. See how RISE accommodates various macroeconomic models, including DSGE VARs, panel VARs, and optimal policy frameworks. Gain insights into solving these models using RISE, the benefits of regime-switching for economic forecasting, and real-world applications in policy analysis and simulation.
Published: 22 Oct 2024
OK. So thank you for this opportunity to present the RISE Toolbox, what I'm doing in the RISE Toolbox. The views are mine, not the views of Norges Bank.
So we need the tools for macroeconomic modeling. And policymakers typically rely on macroeconomic models to design frameworks for promoting stability and growth, particularly central banks and financial institutions. But traditional models typically assume constant parameters and a unique steady state.
So those models are designed for normal times. And obviously, they are not going to be well equipped to navigate nonlinearities and situations where the steady state is not steady. They are not going to be able to navigate recurring natural disasters and shocks, problems of fragmentations, of global market economies, financial crises, sudden stops, occasionally binding constraints, changes in behavior, et cetera.
So those models are useful. But they are going to struggle in situations as the ones I described here. So this is, for instance, a list of some of the major shocks that the world economy has undergone-- recessions, oil crises, great recessions, COVID. I don't even want to talk about the natural disasters that we've experienced lately. So there are lots of episodes like that that influence the way macroeconomists should approach modeling.
Not surprisingly, this is what we see when in a paper that I did with Hilde Bjornland and Vegard Larsen, where we were looking at the relationship between oil volatility and macroeconomic instability. And as you can see, we have here three panels depicting the various behaviors of different processes.
In the top one, we are looking at macroeconomic volatility. The second one, oil price volatility. And the third one, the behavior of the central bank, whether the central bank reacts strongly to inflation or not.
This is also what other people have found. This is a paper by Hubrich and Bob Tetlow at the Federal Reserve Board. And you see here again, the dynamics of the economic system is not stable. So it's not just for the US economy. It's also true for other countries, like Australia, Canada, Norway, New Zealand, Sweden, and the United Kingdom.
So why do we need regime-switching models? So models that are designed to be flexible and adaptive to changing circumstances are needed to address the challenges that I've talked about, because they are going to allow for different dynamics under various economic conditions. And they will be essential for understanding the behavior of the economies in crisis times and in normal times. Clearly, the behavior of the economic system in normal times is going to be different from the behavior in crisis times.
So I hope I have convinced you that we need models that are flexible. But now I'm going to talk about why we need RISE. So RISE is built for regime-switching models primarily. It solves, estimates, simulates forecast with those type of models. And we can do policy analysis as well.
RISE enables the development of flexible models that can adapt to changing circumstances and the complex nonlinear dynamics of an unstable world. And it is also very user friendly for macroeconomic analysis. And interestingly, it is developed in MATLAB.
But then, why MATLAB? Those are some of the reasons why I like MATLAB so much. Not just because of the numerical power, which allows efficient and complex calculations. Not just for the flexibility in solving nonlinear models. Not just because of the wide library support.
Not just because of the user friendliness, but also because of the great support and the responsiveness of the technical support for smooth implementation. So every now and then when I have a question, I can just send an email. And I receive an answer very quickly. So thank you to MATLAB and MathWorks for that.
So more about RISE. What is RISE? RISE is the acronym for Rationality In Switching Environments. It's a toolbox that I have developed for solving, simulating, and estimating regime-switching models. So when I talk about regime-switching models, there are time series models that RISE handles-- VARs, panel VARs, but also structural VARs and proxy structural VARs.
DSGE-VARs but also DSGE. In the DSGE group, we have higher order perturbation solutions. We can solve optimal policy problems-- Ramsey, discretion, loose commitment, stochastic replanning. There are tools for bounded rationality, the possibility of handling occasionally binding constraints.
In terms of simulation capabilities, we can do forecasting and conditional forecasting, perfect foresight under regime switching, stochastic simulation, uncertainty quantification. We can do all kinds of estimation and filtrations. RISE has nonlinear filters. We can estimate models using maximum likelihood, Bayesian estimation, indirect inference. RISE has also the possibility to customize priors on parameters and model properties.
So what class of models are we talking about? This is a generic regime-switching model. f is a potentially nonlinear function of its arguments. x is the vector of endogenous variables, the variables that are determined within the system. Theta is the vector of parameters. Epsilon is the vector of shocks to the system.
As you can see here, theta has an index rt. And rt stands for the regime. In this particular model, there are eight regimes. The number of regimes is finite. Today, we are in regime rt. And tomorrow, the economic system is going to be in regime rt plus 1, which is unknown at time t. So we have an expectations operator here that makes it clear that the future is not known.
And so how do we move from regime rt to regime rt plus 1? Well, that depends on the Markov process. And there are some probabilities of transitioning from regime rt today to regime rt plus 1 tomorrow. And those probabilities are potentially a function of the information that we have up to time t. Epsilon t is just a standard, normal vector, and without loss of generality.
So this is the generic model. It turns out that in this particular system, as you can see, uncertainty is going to come from two sources. One is going to be the structural shocks of the system. The other is going to be the transition probabilities here. And so that's what I'm saying here, that behavioral changes are governed by the switching process. The switching process can be exogenous or endogenous.
So what do we take away from this? These shocks and the regime switches induce the nonlinearities that is going to generate real-world instability. All of those models, all the models that I mentioned earlier, are going to be special cases of this framework.
So going back to this equation, if we set h to 1-- h, that's the number of regimes-- we get a constant parameter DSGE model. And if we do not have expectations, we get a model that looks like a VAR.
So let's look at a very simple example. This is just a simple application of a monetary policy. In some periods, monetary policy can be very hawkish in the sense that it reacts strongly to inflation. And in other periods, monetary policies can be dovish. That is, it doesn't react strongly to inflation. So this is just a simple example that we're going to look at.
And so here, the switch between dovish and hawkish regimes is going to be governed by a Markov process. This is going to be a very simple model with five endogenous variables and three shocks. In particular, here are the equations of the model. The first equation is an Euler equation. Think of y as an output. You can think of it as consumption as well.
What the first equation would say is that the term here, with the expectation, is the real interest rate. And so basically, it says that if the real interest rate increases, then output, or demand, the left-hand side, will fall. And if we expect output to increase tomorrow, output will increase today as well. And if we expect demand to increase in the future, output will increase today.
The second equation is a Phillips curve. Here, it relates inflation today to inflation in the future. And as we see here, there's also past inflation. So this is called a hybrid Phillips curve.
And then for the purpose of our analysis, we have a monetary policy reaction function here, where the interest rate reacts to inflation. And then there is a smoothing parameter here. But then this parameter, psi, which in red, is going to be the-- measure the strength of the reaction to inflation.
And as we've seen, as I've said earlier, we're going to consider two situations, one situation in which psi is very strong-- and that's going to be the hawkish regime-- and one situation in which psi is weak. That's going to be the dovish regime. And so here are two more equations. Those equations are just shock processes. Those shock processes enter these equations eta here and pi z here. And there is also a monetary policy shock.
So then these are just-- this is just the parameterization of the model. We're going to choose a baseline parameterization. And in particular, here, we see that in state 1, psi is very strong-- 2.5. And in state 2, psi is weak. It's 0.9. And then we have some probabilities of moving from state 1-- that is the hawkish regime-- to the dovish regime-- that is 0.05. And the probability of moving from the dovish regime to the hawkish regime, that is 0.1. This is just a simple calibration of the model.
So how do we implement such a model in RISE? That's very easy. We declare the endogenous variables. And optionally, we give a description of those variables. So Y is output, for instance. R is the interest rate, et cetera. We declare the exogenous variables. We declare the parameters, again optionally giving some descriptions.
And we declare the model equations. There's the keyword @model. And here, we write the equations in the most natural way. And here, as well, we can have some equation tags if we want. And so when we solve this model, this is what we get. We get a behavior of the economy in the hawkish state and the behavior of the economy in the dovish state. As you can see, these are the policy functions. And then they are different from one state to the other.
Again, this is another representation of the model solution that was just-- I did this just to show you that the behavior is different from one state to another. So another way to look at that is just to look at impulse responses. This is an impulse response to a cost-push shock. Following a cost-push shock, that is going to be a shock that increases inflation. As we can see here, in the middle panel, inflation rises.
And if inflation rises, demand is going to fall. That's what we see here. Demand is also going to fall because the central bank doesn't like the rising inflation. And the central bank is going to raise the interest rate.
But then we have two different scenarios. One is the hawkish scenario, when the central bank reacts strongly to inflation. And then in that scenario, as you can see here, the interest rate is going to-- the increase in the interest rate is going to be larger than in the dovish regime. And as a result, inflation is not going to increase that much. Output is going to fall more in that scenario.
But then in the dovish regime, the interest rate does not react strongly to inflation. As a result, inflation increases more. And output falls less. So this is just another way to summarize the dynamics of the model. This is just a very simple implementation that I wanted to show you.
Let me conclude here and leave time for some questions. RISE is very versatile. It is important for advancing macroeconomic analysis, using regime switches. And it's a flexible modeling environment that helps us capture the dynamics both in normal and in crisis periods.
It allows for policy analysis. We have powerful tools for forecasting estimation, simulation, and uncertainty. It's user friendly, again thanks to MATLAB. And it is a tool for deriving insightful policy decisions. It helps the design of frameworks to navigate today's unstable and fragmented global economy.
I'd like to end with this quote that I like very much. "We have not succeeded in answering all of our problems. The answers we have found only serve to raise a whole set of new questions. In some ways, we feel we are as confused as ever. But we believe we are confused on a higher level and about more important things." Thank you.