Silviase/jgov_v1.4_full_ann huggingface dataset:
$$ E_{t}y_{t+1}=f\left(E_{t}\varepsilon_{t+1}\right), $$

where $ y_{t} + 1 $ is an endogenous variable and $ \varepsilon_{t+1} $ is an exogenous variable. $ E_{t} $ denotes the expectations in period t. On the other hand, the stochastic rational expectations are derived from the integration of the policy function with respect to the exogenous variables as below:

$$ E_{t}y_{t+1}=\int f(\varepsilon_{t+1})d p(\varepsilon_{t+1}), $$

where $ dp(\varepsilon_{t+1}) $ is the density function of the exogenous shocks. As above, the concept of stochastic rational expectations is more realistic than that of perfect foresight, since the size of the uncertainty of the future endogenous variables is taken into account in terms of the given information on the exogenous variables. Figure 1 (a) intuitively illustrates these two concepts. There is no discrepancy in the expected values of the endogenous variables between the two expectations in the case of a linear DSGE model without restrictions such as the ZLB. In the long run, their unconditional expected value and steady states are equivalent in this case, since the distribution of the endogenous variables is symmetrical. Accordingly, we do not need to select the stochastic rational expectations as a means of calculating the expectations with an effort. $ ^{3} $

However, the situation must be different in the case of the model with the ZLB constraint, as shown in Figure 1 (b). Under perfect foresight, the expected values of the endogenous variables are not affected by the ZLB, when the policy function derived from the expected value of the structural shocks does not hit the ZLB. In contrast, under stochastic rational expectations, the ZLB truncates the distribution and changes the expected values from the steady state in the long run. In addition, the size of the expected values must depend on the size of the distribution truncated by the ZLB. The bigger the distribution is, the greater the discrepancy between the expected values and the steady states in the long run. Accordingly, we have to take account of the size of the distributions of the endogenous variables and that of the exogenous variables that found the former under the ZLB. Otherwise, the simulation might produce a significant error in a policy analysis.

Now, I turn to the case of a regime-switching DSGE model. In the MS-DSGE developed by Davig and Leeper (2007), there is no difference in the expected values conditional on the specified regime between perfect foresight and stochastic rational expectations, even though the sizes of distribution differ between the different regimes, because the model is a linear one without the ZLB constraint, as shown in Figure 2 (a). Accordingly, the unconditional expected values of the endogenous variables calculated from the equation below are equivalent between the two expectations:
Figure 1: Perfect foresight vs. Stochastic Rational Expectations

(a) Under the non ZLB

Perfect foresight

Stochastic Rational Expectations

$$ E_{t}y_{t+1}=f(E_{t}\varepsilon_{t+1}) $$

$$ E_{t}y_{t+1}=\int f(\varepsilon_{t+1})d p(\varepsilon_{t+1}) $$

Expected values of y are derived from expected values of shocks

Expected values of y are derived from distribution of shocks

In a linear model, both expected values are the same.

(b) Under the ZLB

Perfect foresight

In a nonlinear model, expected values are dependent on the size of distributions of shocks.

⇒ The discrepancy between both expectations become large.
Figure 2: Expected values of Markov-swiching DSGE model under stochastic rational expectations

(a) Under the non-ZLB

The case of nominal interest rate

(b) Under the ZLB How to calculate expected values in Markov-switching DSGE

The case of nominal interest rate
$$ E_{t}(y_{t+1})=\sum_{i=1}^{N}Prob(S_{i,t+1}|S_{t})\\E_{t}(y_{t+1}|S_{i,t+1}),\mathrm{~for~}i=1\cdots N, $$

where $ S_{i,t} $ denotes a regime variable when the regime in period t belongs to regime i.

However, the unconditional expected values differ between the two expectations in the regime-switching DSGE model under the ZLB, as shown in Figure 2 (b). This is because the area truncated by the ZLB depends on the size of the distribution of the endogenous variables conditional on the specified regime. This indicates that the policy evaluation seems to be different in each regime as a result of having different expected values. For example, the evaluation of the passive policy might be changed from negative to positive depending on one specified condition, such as deflation or deep recession. This is why we need to consider the stochastic rational expectations in the regime-switching model. It also indicates that whether the stable solution (or a fixed point) of the rational expectations model can be obtained depends on the size of the distributions of the exogenous variables conditional on the regime. Unfortunately, this study does not consider the condition of the stable solution. To overcome this issue, we need to accumulate further general knowledge and calculation techniques of the non-linear DSGE model.

## 3 Model

### 3.1 Set-up

This section presents a Markov switching monetary policy process constrained by the ZLB. I use a prototypical new Keynesian dynamic stochastic general equilibrium (DSGE) model, which has frequently been dealt with in the literature studying monetary policy regime shifts and Markov switching DSGE models, for example Davig and Leeper (2007), Farmer et al. (2009, 2011) and Lubik and Schorfheide (2004). This model can be summarized by the following equations, comprised from the private sector and the monetary policy authorities.

## Private Sector

The basic elements of the private sector in the model include a representative household, a representative firm that produces a final good and a continuum of monopolistically competitive firms that each produce an intermediate good indexed by $ j \in [0,1] $ . The behaviour of the private sector is summarized by two log-linearized equations, namely a Euler equation and a Phillips curve, respectively, indicating the demand and the supply side of the economy.

The Euler equation (1) is obtained from the household's optimal choice of consumption and bond holdings:

$$ y_{t}=E_{t}y_{t+1}-\sigma(i_{t}-E_{t}\pi_{t+1})+g_{t}, $$
where $ E_{t} $ denotes the expectations operator conditional on the information available at time t. $ y_{t} $ is the output, and $ \pi $ is inflation. These variables are percentage deviations from the zero inflation steady state, in the case of output, from a trend path. In addition, $ i_{t} $ denotes the nominal interest rate expressed as the deviation from the interest rate consistent with the zero inflation steady state. $ g_{t} $ denotes an aggregate demand shock, or the net effects of exogenous shifts on the Euler equations. Parameter $ \sigma $ is the intertemporal substitution elasticity.

The Phillips curve (2) is the inflation dynamics obtained from the optimal price-setting behaviour of monopolistically competitive firms, each of which faces a downward-sloping demand curve for differentiated products. The prices are sticky due to Calvo-style rigidity that allows only a fraction of firms to adjust their prices.

$$ \pi_{t}=\beta E_{t}\pi_{t+1}+\kappa y_{t}+u_{t}, $$

where $ u_{t} $ is an aggregate supply shock or exogenous shifts of the marginal cost of production. Parameter $ \beta $ is the household's discount factor. $ \kappa $ is the slope parameter which is determined by

$$ \kappa=\frac{(1-\omega)(1-\omega\beta)}{\omega}\frac{\sigma^{-1}+\tau}{1+\tau\theta} $$

where $ 1 - \omega $ is the randomly selected fraction of firms that adjust their prices. The prices are more flexible as $ \omega \rightarrow 0 $ , which makes $ \kappa \rightarrow \infty $ . $ \tau $ is the elasticity of a firm's real marginal cost with respect to its own output level. $ \theta $ is the price elasticity of demand substitution among differentiated goods produced by firms.

Both aggregate shocks $ g_{t} $ and $ u_{t} $ are assumed to evolve according to univariate AR(1) stochastic processes with coefficients of $ \rho_{g} $ and $ \rho_{u} $ , respectively.

$$ g_{t}=\rho_{g}g_{t-1}+\varepsilon_{g,t}, $$

$$ u_{t}=\rho_{u}u_{t-1}+\varepsilon_{u,t}. $$

## Markov Switching Monetary Policy

Following Davig and Leeper (2007), we assume that the monetary authority sets the short-term nominal rate using a two-state regime-switching Taylor rule, such as

$$ i_{t}(S_{t})=\phi_{\pi}(S_{t})\pi_{t}+\phi_{y}(S_{t})y_{t}, $$

$$ \phi_{\pi}(S_{t})=\left\{\begin{array}{l l}\phi_{\pi1}>1&\quad\mathrm{f o r}S_{t}=1\\ \phi_{\pi2}\leqq1&\quad\mathrm{f o r}S_{t}=2\end{array}\right. $$

$$ \phi_{y}(S_{t})=\left\{\begin{array}{cc}\phi_{y1}>\phi_{y2}&\quad for S_{t}=1\\\phi_{y2}&\quad for S_{t}=2\end{array}\right. $$
where the deviation of the level of the nominal interest rate $ i_{t}(S_{t}) $ is the function of $ S_{t} $ , which is a discrete-valued random variable that evolves according to a two-state Markov chain with a transition matrix given by,

$$ P=\left[\begin{array}{cc}p_{11}&1-p_{11}\\1-p_{22}&p_{22}\end{array}\right] $$

where $ p_{11} = Pr(S_t = 1 | S_{t-1} = 1) $ and $ p_{22} = Pr(S_t = 2 | S_{t-1} = 2) $ . The active, or more aggressive, regime corresponds to $ S_t = 1 $ . The less active, or possibly passive, regime corresponds to $ S_t = 2 $ . The nominal interest rate $ i_t(S_t) $ is the function of $ S_t $ , since it obeys one of the two Taylor rules decided by one of the two policy regimes $ S_t $ in the current period t.

In addition, I assumed that the level of the nominal interest rate, $ I_{t}(S_{t}) $ , has to remain positive for both of the above regimes, i.e., $ I_{t}(S_{t}) \geq 0 $ . This requires the deviation of nominal interest rate $ i_{t}(S_{t}) $ from the steady state $ r^{*} : i_{t}(S_{t}) = I_{t}(S_{t}) - r^{*} $ is to be set up by

$$ i_{t}\left(S_{t}\right)\geqq-r^{*} $$

where $ r^{*} $ is the real rate of the deterministic zero inflation steady state, or $ r^{*} = 1/\beta - 1 $ . By accounting for the ZLB constraint as in the above, the regime-switching Taylor rule (5) can be rewritten as $ ^{4} $

$$ i_{t}(S_{t})=\operatorname*{m a x}\{-r^{*},\phi_{\pi}(S_{t})\pi_{t}+\phi_{y}(S_{t})y_{t}\}. $$

Note that the monetary policy rule (6) is a combination of two different types of regime switching monetary policies: state-dependent regime switching and Markov switching. This is because the model subject for the ZLB is regarded as a kind of state-dependent regime-switching one, in which if an economy belongs to a regime in which the interest rate is positive, then the interest rate could operate based on the Taylor rule, but if the economy hits the other regime in which the interest rate is fixed at the zero level, then the Taylor rule cannot work regardless of the situation of its economic activities.

Ignoring the existence of the ZLB constraint, the simple problems (1) through (5) can be solved by standard linear-quadratic methods. In contrast, a global numerical procedure must be used to solve the above problem including (6) instead of (5). Following Billi's (2011, 2012, 2013) algorithm, I will solve it by setting up the model as a static one-period problem, as in Subsection 2.3. Beforehand, an approach using the stochastic rational expectation equilibrium model (SREE) to apply to any kind of DSGE model is explained.

### 3.2 Stochastic Rational Expectation Equilibrium (SREE)

Most studies solving non-linear DSGE models, for example the model constrained by the ZLB, use a standard procedure in which it is assumed that agents have perfect foresight about the evolution of the economy. However, in the case of
non-linear DSGE models including the ZLB constraint, we can observe a non-negligible discrepancy of equilibria between perfect foresight and stochastic rational expectations. Following Billi (2011, 2012, 2013), I adopt the concept of stochastic rational expectations and introduce them into policy functions to solve the underlying MS-DSGE model with the ZLB constraint. By finding a fixed point in the space of policy functions numerically, we can obtain the solution to the problem consisting of the first-order conditions (1) through (4) and (6) with stochastic rational expectations, as explained in the following manner.

## (1) Expectations function with stochastic shocks characterized by a continuous density function

In equilibrium, private-sector agents, such as households and firms, and policy makers choose a policy vector $ x_{t} $ (or control variables) based on a policy function $ x(z_{t}) $ and a state vector $ z_{t} $ . Since the policy function $ x(z_{t}) $ does not have an explicit representation in the model, only the numerical results of the policy functions are available. In the model of this study, the policy function consists of the three variables,

$$ x(z_{t})=\left(y_{t,},\pi_{t},i_{t}\right), $$

for which the policy decision includes the inflation rate, the output and the nominal interest rate. The state vector is

$$ z_{t}=(u_{t,},g_{t}), $$

and includes the exogenous shocks. Using these two notations, the law of motion in equilibrium,

$$ z_{t+1}=h\left(z_{t},x(z_{t}),\varepsilon_{t+1}\right), $$

describes how the future state variables in the economy evolve. The future state $ z_{t+1} $ depends on the current state $ z_{t} $ and on the current policy $ x(z_{t}) $ , which are known to both the monetary authority and the private sector. It also depends on future shock innovations $ \varepsilon_{t+1} $ , which are unknown. When the private sector knows the current policy, then it can form expectations about the future policy using policy function $ x(z_{t}) $ . Therefore, using the policy function with the current policy $ x_{t} $ and state $ z_{t} $ , an expectations function of the future policy $ E_{t}x_{t+1} $ can be given by

$$ E_{t}x_{t+1}(z_{t})=\int_{\varepsilon_{t+1}}x(z_{t+1})f(d\varepsilon_{t+1})\\=\int_{\varepsilon_{t+1}}x(h\left(z_{t},x(z_{t}),\varepsilon_{t+1}\right))f(d\varepsilon_{t+1}), $$

where $ f(\cdot) $ is the probability density function of the shock innovation, and the inside of the function denotes the dynamics of future state $ z_{t+1} = \rho z_t + \varepsilon_{t+1} $ . As the shock innovation $ \varepsilon_{t+1} $ can be integrated out on the right-hand side of the above function, only state $ z_t $ remains as the input in the expectations $ E_t x_t(z_t) $ of the left-hand side. In order to obtain unique and bounded values of expectations, the policy functions are requested to satisfy the assumptions such that $ \int x^+(z_t) < \infty $ .
$ \int x^{-}(z_{t}) < \infty $ , and elements of domain of function $ x(z_{t}) $ , state vectors $ z_{t} $ and shock innovation $ \varepsilon_{t} $ , belong to the Borel set, that is, $ z_{t}, \varepsilon_{t} \in B $ , described in chapter 7 of Berttsekas and Shreve (1996).

In the model presented in Section 2.1, the expectations function using a stochastic process such as Eqs. (3) and (4) is rewritten as

$$ \begin{align*}E_{t}\pi_{t+1}(u_{t},g_{t})\quad=&\quad\int_{\varepsilon_{u}}\int_{\varepsilon_{g}}\pi(\left.u_{t+1},g_{t+1}\right)f(d\varepsilon_{g,t+1}|\varepsilon_{u,t+1})f(d\varepsilon_{u,t+1}),\\=&\quad\int_{\varepsilon_{u}}\int_{\varepsilon_{g}}\pi(\left.\rho_{u}u_{t}+\varepsilon_{u,t+1},\rho_{g}g_{t}+\varepsilon_{g,t+1}\right)f(d\varepsilon_{g,t+1}|\varepsilon_{u,t+1})f(d\varepsilon_{u,t+1}),\end{align*} $$

$$ \begin{align*}E_{t}y_{t+1}(u_{t},g_{t})\quad=&\quad\int_{\varepsilon_{u}}\int_{\varepsilon_{g}}y(u_{t+1},g_{t+1})f(d\varepsilon_{g,t+1}|\varepsilon_{u,t+1})f(d\varepsilon_{u,t+1}).\\=&\quad\int_{\varepsilon_{u}}\int_{\varepsilon_{g}}y(\rho_{u}u_{t}+\varepsilon_{u,t+1},\rho_{g}g_{t}+\varepsilon_{g,t+1})f(d\varepsilon_{g,t+1}|\varepsilon_{u,t+1})f(d\varepsilon_{u,t+1}).\end{align*} $$

On the other hand, in the case of perfect foresight, only the expectations values of states are used as inputs for policy functions so that the expectations function of the control variables is expressed as

$$ \begin{aligned}E_{t}\pi_{t+1}(u_{t},g_{t})\quad&\equiv\quad\pi(E_{t}u_{t+1},E_{t}g_{t+1})\\&=\quad\pi(\rho_{u}u_{t},\rho_{g}g_{t})\end{aligned} $$

$$ \begin{aligned}E_{t}y_{t+1}(u_{t},g_{t})\quad&\equiv\quad y\left(E_{t}u_{t+1},E_{t}g_{t+1}\right)\\&=\quad y\left(\rho_{u}u_{t},\rho_{g}g_{t}\right)\end{aligned} $$

where two future states implying the inputs of the function, $ E_{t} $ $ u_{t+1} $ and $ E_{t} $ $ g_{t+1} $ , are derived from $ u_{t+1} = \rho_{u}u_{t} $ , and $ g_{t+1} = \rho_{g}g_{t} $ , and the realized values of future shock innovations are set as $ \varepsilon_{t+1} = 0 $ . Most studies even using non-linear DSGE models adopt perfect foresight like Eqs. (9) and (10), instead of stochastic rational expectations such as Eqs. (7) and (8). Therefore, to show the significance of the expectations form of models for the effects on output and inflation in the presence of the ZLB, I will also simulate a perfect foresight version and compare it with its counterparts. It is noteworthy that the expectations explained above are just expectations and do not necessarily match the realized value. We allow the presence of forecasting errors between expectations and actual values. Similarly, expectations derived from the perfect foresight without distributions can be allowed to deviate from actual values and to take on forecasting errors, as well as stochastic expectations.
## (2) Stochastic Rational Expectations Equilibrium

Generally speaking, a solution to a non-linear DSGE model can be obtained from the concept of the stochastic rational expectations equilibrium (SREE) proposed by Billi (2013, p.8). The definition of SREE is given as the following. I apply the equilibrium concept to solve the MS-DSGE model with the ZLB constraint.

Definition 1 (SREE) A stochastic, rational-expectations equilibrium is given by a policy function $ x(z_{t}) $ and corresponding expectation function $ E_{t}x_{t+1}(z_{t}) $ , respectively, which satisfy the equilibrium conditions such as Eqs. (1) through (4) and (6) described in Section 2.1.

Adam and Billi (2006, 2007) adopted the concept of the Markov perfect equilibrium (MPE) $ ^{5} $ for solving an equilibrium, whereas Billi (2013) introduced the new concept of SREE. The difference between the theorems is that the SREE explicitly uses stochastic rational expectations for calculating policy functions or best responses, while the MPE can include perfect foresight as well as stochastic rational expectations.

## (3) Discretization of the Expectations Function

To set up the model as a simple static one-period maximization problem in which the first order conditions (1) through (4) and (6) can be used to determine the updated policy functions, we transform the above expectations functions into discrete versions of those functions. $ ^{6} $ The state vector, z, is discretized into a grid of interpolation nodes $ \{z_{n} \in z \mid n = 1, \cdots, N\} $ , where N is the number of nodes. In particular, state vector $ z_{t} $ consists of two exogenous shocks $ u_{t} $ and $ g_{t} $ in this model, which are represented as $ \mathbf{z}(i, j) = [g(i), u(j)] $ by using pointwise multiplication, i.e., $ N \otimes N $ , and dropping subscript t from states $ z_{t} $ . Here, $ g(i) $ and $ u(j) $ are the values of exogenous shocks at the i-th and j-th interpolation nodes, respectively. Policy functions are evaluated at intermediate values resorting to linear interpolation such that $ \mathbf{x}(i, j) = \mathbf{x}(\mathbf{z}(i, j)) $ , where the matrix with pointwise elements, $ \mathbf{x}(i, j) $ , has the number of grids, $ N \otimes N $ . The expectations $ E_{t} x_{t+1} $ defined by (7) and (8) are evaluated at each interpolation node using the M node Gauss-Hermite quadrature scheme which is the approximation of normal distribution described in Chapter 7 of Judd (1998). $ ^{7} $ Using the notations of policy functions with pointwise elements $ x(i, j) $ and letting $ x^{e} $ denote one-period-ahead expectations $ E_{t} x_{t+1} $ , then the stochastic rational expectations can be rewritten as

$$ y^{e}(\boldsymbol{g}(i),\boldsymbol{u}(j))=\sum_{k=1}^{M}\sum_{l=1}^{M}\omega(k)\omega(l)y(\boldsymbol{u}^{e}(k,i),g^{e}(l,j)), $$
$$ g^{e}(l,j)=\rho_{g}g(j)+\varepsilon_{g}(l), $$

$$ u^{e}(k,i)=\rho_{u}u(i)+\varepsilon_{u}(k), $$

$$ for\ i,j=1,2,\cdots,N,\quad and\ k,l=1,2,\cdots,M. $$

where $ \omega(k) $ , $ \omega(l) $ and $ \varepsilon(k) $ , $ \varepsilon(l) $ are the k-th and l-th weights and k-th and l-th nodes of future shock innovations $ \varepsilon_{u,t+1} $ and $ \varepsilon_{g,t+1} $ calculated by the Gauss-Hermite quadrature scheme, respectively. Indexes k and l are integrated out from the expectations by summing up the interpolation nodes $ \varepsilon(k) $ , $ \varepsilon(l) $ of shock innovations on the right-hand side. On the other hand, the pointwise function of perfect foresight defined by (9) and (10) using future state vectors as the domain is given by

$$ y^{e}(g(i),u(j))=y(u^{e}(i),g^{e}(j)), $$

$$ u^{e}(i)=\rho_{u}u(i), $$

$$ g^{e}(j)=\rho_{g}g(j). $$

$$ for\ i,j=1,2,\cdots,N $$

The left-hand side in (12) is one period ahead of the expectations of the control variables, and the right-hand side is the policy function including one period ahead of the expectations of the exogenous shocks as the domain.

## (4) Static One-Period Problem of a DSGE Model Subject to the ZLB

Using discrete expectations functions (11) or (12), based on stochastic rational expectations or perfect foresight, we numerically determine out a fixed point, which indicates an equilibrium of the model, in the discrete space, $ N \otimes N $ , of policy functions. From the notation of the policy function and expectations function obtained by pointwise approximations, the prototypical new-Keynesian DSGE model with a standard Taylor monetary policy rule is transformed into a simple static one-period problem in which the first-order conditions are represented as

$$ y(g(i),u(j))=y^{e}(g(i),(j))-\sigma\bigg(i(g(i),u(j))-\pi^{e}(g(i),u(j)\bigg)+g(i), $$

$$ \pi(g(i),u(j))=\beta\pi^{e}(g(i),u(j))+\kappa y(g(i),u(j))+u(j), $$

$$ i(g(i),u(j))=\max\Big\{-r^{*},\phi_{\pi}\pi(g(i),u(j))+\phi_{y}y(g(i),u(j))\Big\}. $$