\documentclass[11pt]{article}
\usepackage{amsmath, amssymb}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{float}
\usepackage{natbib}
\bibliographystyle{agsm}
\begin{document}
\title{Running the Ramsey Policy on a Non-Linear\\ Gali \& Monacelli (2005) Model using Dynare}
\author{Justas Dainauskas\footnote{University of York, Department of Economics and Related Studies, Heslington, York, YO10 5DD, United Kingdom. E-Mail:
jd1090@york.ac.uk}}
\maketitle
\section{The Model}
Consider the ubiquitous \cite{GaliMonacelli(2005)} model of a small open economy in its non-linear form. The only real difference here is that the capital stock is present in the model and the dynamics of inflation are summarised in a recursive way similar to the \texttt{NK\_baseline.mod} in the dynare example folder. The trade balance is specified in a slightly different way, but it makes no real difference. There are no additional frictions introduced into the model and the notation used is consistent with \cite{GaliMonacelli(2005)} as much as possible, so all of the equilibrium conditions are standard:
\begin{equation}
Y_t=C_t+I_t+NX_t
\end{equation}
\begin{equation}
NX_t=X_t-M_t
\end{equation}
\begin{equation}
X_t=\alpha\left(\frac{P_{H,t}}{E_tP_{F,t}}\right)^{-\eta}C_t^*
\end{equation}
\begin{equation}
M_t=\alpha\left(\frac{E_tP_{F,t}}{P_t}\right)^{-\eta}C_t
\end{equation}
\begin{equation}
C_{H,t}=(1-\alpha)\left(\frac{P_{H,t}}{P_{t}}\right)^{-\eta}C_t
\end{equation}
\begin{equation}
C_{F,t}=\alpha\left(\frac{E_tP_{F,t}}{P_{t}}\right)^{-\eta}C_t
\end{equation}
\begin{equation}
C_t+I_t+\mathbb{E}_t\left[D_{t+1} \mathit{\Lambda}_{t,t+1} \mathit{\Pi}_{t+1}\right]=\frac{D_t}{P_t}+\frac{W_tN_t}{P_t}+\frac{R_tK_{t-1}}{P_t}+\frac{\mathit{\Xi}_t}{P_t}
\end{equation}
\begin{equation}
\mathit{\Xi}_t=P_{H,t}Y_t-W_tN_t-R_tK_{t-1}
\end{equation}
\begin{equation}
\mathbb{E}_t\left[\mathit{\Lambda}_{t,t+1}\right]=\exp(-i_t)
\end{equation}
\begin{equation}
\mathbb{E}_t\left[\mathit{\Pi}_{t+1}\right]=\mathbb{E}_t\left[\frac{P_{t+1}}{P_t}\right]
\end{equation}
\begin{equation}
\frac{W_t}{P_t}=\frac{N^\varphi}{\mathbb{U}_{c,t}}
\end{equation}
\begin{equation}
\mathbb{U}_{c,t}=C^{-\sigma}
\end{equation}
\begin{equation}
\mathbb{E}_t\left[\mathit{\Lambda}_{t,t+1}\mathit{\Pi}_{t+1}\right]=\beta\left[\frac{\mathbb{U}_{c,t+1}}{\mathbb{U}_{c,t}}\right]
\end{equation}
\begin{equation}
\frac{R_{t+1}}{P_{t+1}}=\mathbb{E}_t\left[\left(\frac{\mathbb{U}_{c,t+1}}{\mathbb{U}_{c,t}}\right)\left(\frac{1}{\beta}-(1-\delta)\right)\right]
\end{equation}
\begin{equation}
Y=\frac{A_tK_{t-1}^\gamma N_t^{1-\gamma}}{\mathit{\Theta}_t}
\end{equation}
\begin{equation}
\frac{W_t}{P_t}=(1-\gamma)MC_t\left(\frac{Y_t}{N_t}\right)
\end{equation}
\begin{equation}
\frac{R_t}{P_t}=\gamma MC_t\left(\frac{Y_t}{K_{t-1}}\right)
\end{equation}
\begin{equation}
K_t=(1-\delta)K_{t-1}+I_t
\end{equation}
\begin{equation}
MC_t=\frac{1}{P_tA_t}\left(\frac{R_t}{\gamma}\right)^\gamma\left(\frac{W_t}{1-\gamma}\right)^{1-\gamma}
\end{equation}
\begin{equation}
P_{H,t}=\left[(1-\pi)\,\hat{P}_{H,t}^{1-\varepsilon}+\pi\,P_{H,t-1}^{1-\varepsilon}\right]^{\frac{1}{1-\varepsilon}}
\end{equation}
\begin{equation}
\hat{P}_{H,t}=\frac{P_t \mathit{\Phi}_{t,1}}{\mathit{\Phi}_{t,1}}
\end{equation}
\begin{equation}
\mathit{\Phi}_{t,1}=\left(\frac{\varepsilon}{\varepsilon-1}\right)Y_t \mathbb{U}_{c,t} MC_{t}+\theta\beta\,\mathbb{E}_t \left[\mathit{\Pi}_{t+1}^\varepsilon\,\mathit{\Phi}_{t+1,1}\right]
\end{equation}
\begin{equation}
\mathit{\Phi}_{t,2}=Y_t \mathbb{U}_{c,t}+\theta\beta\,\mathbb{E}_t\left[\mathit{\Pi}_{t+1}^{\varepsilon-1}\,\mathit{\Phi}_{t+1,2}\right]
\end{equation}
\begin{equation}
\mathit{\Theta}_{t}=\pi\mathit{\Pi}_{H,t}^\varepsilon\mathit{\Theta}_{t-1}+(1-\pi)\left(\frac{\widehat{P}_{H,t}}{P_{t}}\right)^{-\varepsilon}
\end{equation}
\begin{equation}
\mathbb{E}_t\left[\mathit{\Pi}_{H,t+1}\right]=\mathbb{E}_t\left[\frac{P_{t+1}}{P_t}\right]
\end{equation}
\begin{equation}
\mathbb{U}_{c,t}^*=C^{* -\sigma}
\end{equation}
\begin{equation}
P_t=\left[(1-(1-\mu)\alpha)\,(P_{H,t})^{1-\eta}+(1-\mu)\alpha(P_{F,t})^{1-\eta}\right]^{\frac{1}{1-\eta}}
\end{equation}
\begin{equation}
Q_t=\frac{\mathbb{U}_{c,t}^*}{\mathbb{U}_{c,t}}
\end{equation}
\begin{equation}
E_t=\frac{Q_t P_t}{P_{F,t}}
\end{equation}
\begin{equation}
\log(A_t)=\rho_a\,\log(A_{t-1})+e_{a,t},\,\,\,\,\,\rho_a\in(0,1),\,\,\,\,\,e_{a,t} \sim\,iid(0,\sigma_{a}^2)
\end{equation}
\begin{equation}
\log(C_t^*)=(1-\rho_{c})\log(C)+\rho_{c}\,\log(C_{t-1}^*)+e_{c,t},\,\,e_{c,t} \sim\,iid(0,\sigma_{c}^2)
\end{equation}
And for non-Ramsey policy case, the single mandate Taylor rule:
\begin{equation}
i_t=-\log(\beta)+\phi\,\log(\mathit{\Pi}_{t})
\end{equation}
Given the assumption that the policy \texttt{instrument} is $i_t$ and the \texttt{planner\_objective} is given by the CRRA preferences:
\begin{equation}
\frac{C_t^{1-\sigma}}{1-\sigma}-\frac{N_t^{1+\varphi}}{1+\varphi}
\end{equation}
\section{Conditional Steady State}
Derivations of the real variable steady state values must be conditional on the instrument used for the Ramsey policy, which is chosen to be the nominal interest rate $i_t$. The nominal instrument affects the demand side of the economy via the Euler equation. Specifically, it is the reciprocal of the stochastic discount factor:
$$\mathit{\Lambda}=\exp(-i)$$
The stochastic discount factor affects the CPI inflation:
$$\mathit{\Pi}=\frac{\beta}{\mathit{\Lambda}}$$
The specification of the price levels is less clear, because the steady state must be consistent with any value of the instrument, which means that there may be non-zero inflation steady state. This implies that the price level is rising over time. For this reason, I specify the CPI level as equivalent to the CPI inflation rate (which implicitly assumes that the CPI level in the previous period is always equal to unity and I'm not sure how to specify this in any other way):
$$P\equiv\mathit{\Pi}$$
Then it follows that the real marginal costs of production must equal to the inverse mark-up:
$$MC=\frac{1}{PA}\left(\frac{R}{\zeta}\right)^\zeta\left(\frac{W}{(1-\zeta)}\right)^{1-\zeta}=\frac{\varepsilon-1}{\varepsilon}$$
$$\mathit{\Phi}_{1}=\mathit{\Phi}_{2}=\frac{Y C^{-\sigma}}{1-\mathit{\Pi}\pi\beta}$$
$$\widehat{P}_H=\frac{\mathit{P \Phi}_{1}}{\mathit{\Phi}_{2}}\equiv \mathit{\Pi}$$
Then note that the trade balance holds in the steady state:
$$X=M=\alpha C\Rightarrow NX=0$$
Where the above follows from the symmetry of preferences and the consumption risk-sharing relationship:
$$Q=\left(\frac{C}{C^*}\right)^{\sigma}\equiv\frac{E P_F}{P}=1 \Rightarrow C=C^*$$
Therefore the aggregate resource constraint is given by:
$$Y=C+I$$
Where aggregate investment is obtained from the capital accumulation equation:
$$I=\delta K$$
In order to find the market clearing steady state of capital stock, consider the demand and supply schedules of capital:
$$R=\frac{1-\beta(1-\delta)}{\beta}$$
$$R=\frac{\zeta MC Y}{K}\equiv \left(\frac{\varepsilon-1}{\varepsilon}\right)\frac{\zeta Y}{K}$$
Then solving the above two equations for capital stock gives:
$$K=\left[\left(\frac{\varepsilon-1}{\varepsilon}\right)\left(\frac{\zeta\beta}{1-\beta(1-\delta)}\right)\right]Y\equiv\mathit{\Delta}_1 Y$$
Then substitute the above into the production function and solve for output:
$$Y=K^\zeta N^{1-\zeta}\equiv N \mathit{\Delta}_1^{\frac{\zeta}{1-\zeta}}$$
Then the aggregate investment is equivalent to:
$$I=\delta K=\delta \mathit{\Delta}_1 Y= \delta N \mathit{\Delta}_1^{\frac{1}{1-\zeta}}$$
Substituting out output and investment from the aggregate budget constraint identifies the steady state of aggregate consumption:
$$C=Y-I=N\left[\mathit{\Delta}_1^{\frac{\zeta}{1-\zeta}}+\delta \mathit{\Delta}_1^{\frac{1}{1-\zeta}}\right]\equiv \mathit{\Delta}_2 N$$
The labour demand schedules defines real wage:
$$\frac{W}{P}=\left(\frac{\varepsilon-1}{\varepsilon}\right)(1-\zeta)\mathit{\Delta}_1^{\frac{\zeta}{1-\zeta}}$$
Thus the aggregate hours can therefore be identified from the inverse labour supply schedule:
$$\frac{W}{P}=N^\varphi C^\sigma$$
$$\Rightarrow \left(\frac{\varepsilon-1}{\varepsilon}\right)(1-\zeta)\mathit{\Delta}_1^{\frac{\zeta}{1-\zeta}}=N^{\varphi+\sigma} \mathit{\Delta}_2^\sigma$$
$$\Rightarrow N=\left[\mathit{\Delta}_2^{-\sigma}\left(\frac{\varepsilon-1}{\varepsilon}\right)(1-\zeta)\mathit{\Delta}_1^{\frac{\zeta}{1-\zeta}}\right]^{\frac{1}{\varphi+\sigma}}$$
Then the consumption allocation between the domestic goods and foreign goods is given by:
$$C_H=(1-\alpha)C$$
$$C_F=\alpha C$$
And finally, the amount of assets held by the domestic households in the steady state is obtained from the budget constraint:
$$PC+PI+\beta D=D+WN+RK+\mathit{\Xi}$$
$$\mathit{\Xi}=P_H Y-W N-RK$$
$$(\beta-1)D=0$$
$$\Rightarrow D=0$$
\section{Dynare Code}
See \texttt{GM\_2005.mod} attached.
\bibliography{references}
\end{document}