From 76176ed1365245607b0a0e1cbf8c29425a154949 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?=
 <sebastien.villemot@sciencespo.fr>
Date: Tue, 20 Jan 2015 18:46:25 +0100
Subject: [PATCH] =?UTF-8?q?R=C3=A9=C3=A9criture=20de=20Gal=C3=AD=20en=20lo?=
 =?UTF-8?q?g-d=C3=A9viation.=20Fichier=20MOD=20correspondant.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 basicnk.mod    |  39 ++++++++++++++
 dsge-intro.tex | 138 ++++++++++++++++++++++++++++++++++---------------
 2 files changed, 135 insertions(+), 42 deletions(-)
 create mode 100644 basicnk.mod

diff --git a/basicnk.mod b/basicnk.mod
new file mode 100644
index 0000000..2da38cf
--- /dev/null
+++ b/basicnk.mod
@@ -0,0 +1,39 @@
+var y i pi a n nu;
+varexo eps_a eps_i;
+parameters sigma beta theta epsilon alpha phi phi_pi phi_y rho_a kappa rho lambda zeta rho_nu;
+
+// Structural parameters
+sigma = 1;        // Relative risk aversion
+beta = 0.99;      // Discount factor
+theta = 2/3;      // Price duration
+epsilon = 6;      // Elasticity of substitution between goods
+alpha = 1/3;      // Capital share
+phi = 1;          // Frisch elasticity of labor supply
+phi_pi = 1.5;     // Monetary stance on inflation
+phi_y = 0.5/4;    // Monetary stance on output
+rho_a = 0.9;      // Autocorrelation of technology shock
+rho_nu = 0.5;     // Autocorrelation of monetary policy shock
+
+// Derived parameters
+rho = -log(beta);
+lambda = (1-theta)*(1-beta*theta)*(1-alpha)/theta/(1-alpha+alpha*epsilon);
+kappa = lambda*(sigma+(phi+alpha)/(1-alpha));
+zeta = lambda*(1+phi)/(1-alpha);
+
+model;
+y = y(+1) - 1/sigma*(i-pi(+1)-rho);
+pi = beta*pi(+1)+kappa*y-zeta*a;
+i = rho + phi_pi*pi + phi_y*y + nu;
+a = rho_a*a(-1)+eps_a;
+y = a + (1-alpha)*n;
+nu = rho_nu*nu(-1) + eps_i;
+end;
+
+shocks;
+var eps_a; stderr 1;
+var eps_i; stderr 0.025;
+end;
+
+steady;
+
+stoch_simul(order=1, irf=12) y pi i n;
diff --git a/dsge-intro.tex b/dsge-intro.tex
index 1a73346..3b65bde 100644
--- a/dsge-intro.tex
+++ b/dsge-intro.tex
@@ -195,7 +195,7 @@ $$\int_0^1 P_t(i) C_t(i) \,\mathrm{d}i + Q_t B_t \leq B_{t-1} + W_t N_t + T_t$$
 \item Prix, salaire et autres revenus sont donnés
 
 \item Pas de jeu de Ponzi: $\forall t,\; \lim_{T\rightarrow
-  \infty}\mathbb{E}_t\{B_T\}\geq 0$
+  \infty}\mathbb{E}_tB_T\geq 0$
 
 \item Fonction d'utilité:
 $$U(C_t, N_t) = \frac{C_t^{1-\sigma}}{1-\sigma} -
@@ -231,8 +231,8 @@ $$C_t^{-\sigma} = \beta \,  \mathbb{E}_t\left\{\underbrace{\frac{1}{Q_t}
 
 \begin{itemize}
 \item Version log-linéarisée:
-$$c_t = \mathbb{E}_t\{c_{t+1}\} - \frac{1}{\sigma}(i_t -
-\mathbb{E}_t\{\pi_{t+1}\} - \rho)$$
+$$\widehat{c}_t = \mathbb{E}_t\widehat{c}_{t+1} - \frac{1}{\sigma}(i_t -
+\mathbb{E}_t\pi_{t+1} - \rho)$$
 où:
 \begin{align*}
 i_t &= -\log Q_t & & \text{(taux d'intérêt nominal)} \\
@@ -248,8 +248,8 @@ i_t &= -\log Q_t & & \text{(taux d'intérêt nominal)} \\
   \frametitle{Arbitrage consommation/loisir}
   $$\frac{N_t^{\varphi}}{C_t^{-\sigma}} = \frac{W_t}{P_t}$$
   \begin{itemize}
-  \item Version log-linéarisée:
-$$\sigma\, c_t + \varphi\, n_t = w_t - p_t$$
+%  \item Version log-linéarisée:
+%$$\sigma\, c_t + \varphi\, n_t = w_t - p_t$$
 \item Chômage volontaire: on travaille moins après un choc de richesse positif
 \note{Mentionner Mortenssen-Pissarides}
   \end{itemize}
@@ -326,19 +326,25 @@ Cas particulier sans rigidités nominales ($\theta=0$):
 $$P_t^* = \mathcal{M}\,\psi_{t|t}$$
 \end{frame}
 
-\begin{frame}
+\begin{frame}[allowframebreaks]
   \frametitle{Courbe de Phillips}
   \begin{itemize}
   \item Condition d'optimalité log-linéarisée:
 $$p_t^* = (1-\beta\,\theta)\sum_{k=0}^{\infty}(\beta\,\theta)^k
-\,\mathbb{E}_t\left\{mc_{t+k|t} + p_{t+k}\right\}$$
-où $mc_{t+k|t}$ est le (log du) cout marginal réel
+\,\mathbb{E}_t\left\{\widehat{mc}_{t+k|t} + p_{t+k}\right\}$$
+où $\widehat{mc}_{t+k|t}$ est la (log-déviation du) cout marginal réel (spécifique à l'entreprise)
 \item Se réécrit:
-  $$\pi_t = \beta\,\mathbb{E}_t\{\pi_{t+1}\} + \lambda\,mc_t$$
-où:
-$$\lambda =
+  $$\pi_t = \beta\,\mathbb{E}_t\pi_{t+1} + \lambda\,\widehat{mc}_t$$
+où $\lambda =
 \frac{(1-\theta)(1-\beta\,\theta)(1-\alpha)}{\theta(1-\alpha+\alpha\,\varepsilon)}
-> 0$$
+> 0$ et où la (log-déviation du) cout marginal moyen de l'économie est:
+$$\widehat{mc}_t = \left(\sigma+\frac{\phi+\alpha}{1-\alpha}\right)\widehat{y}_t
+- \frac{1+\phi}{1-\alpha}\widehat{a}_t$$
+\item La courbe de Phillips peut donc se réécrire:
+  $$\pi_t = \beta\,\mathbb{E}_t\pi_{t+1} + \kappa\, \widehat{y}_t -
+  \zeta\,\widehat{a}_t $$
+    où $\kappa = \lambda\left(\sigma + \frac{\varphi+\alpha}{1-\alpha}\right) >
+    0$ et $\zeta = \lambda\frac{1+\phi}{1-\alpha} > 0$
   \end{itemize}
 \end{frame}
 
@@ -355,8 +361,8 @@ $$\lambda =
   \item D'où:
     $$C_t = Y_t$$
   \item L'équation d'Euler devient la courbe IS dynamique:
-    $$y_t = \mathbb{E}_t\{y_{t+1}\} - \frac{1}{\sigma}(i_t -
-    \mathbb{E}_t\{\pi_{t+1}\} - \rho)$$
+    $$\widehat{y}_t = \mathbb{E}_t\widehat{y}_{t+1} - \frac{1}{\sigma}(i_t -
+    \mathbb{E}_t\pi_{t+1} - \rho)$$
   \end{itemize}
 \end{frame}
 
@@ -371,65 +377,113 @@ N_t & = \int_0^1 N_t(i)\,\mathrm{d}i \\
   \end{align*}
   \bigskip
 S'approxime en:
-$$y_t = a_t + (1-\alpha)n_t$$
+$$\widehat{y}_t = \widehat{a}_t + (1-\alpha)\widehat{n}_t$$
 
 \note{Approximation du premier ordre autour de l'inflation zéro: le terme de
   dispersion des prix disparait}
 \end{frame}
 
+\begin{frame}
+  \frametitle{Politique monétaire}
+
+Le modèle est bouclé avec une règle de Taylor:
+  $$i_t = \rho + \phi_{\pi}\,\pi_t + \phi_y\, \widehat{y}_t + \nu_t$$
+où $\nu_t$ est le choc de politique monétaire (auto-corrélé)
+\end{frame}
+
+\begin{frame}
+  \frametitle{Récapitulatif}
+  \begin{itemize}
+  \item Courbe IS dynamique
+ \note{Courbe IS issue de l'arbitrage intertemporel des ménages}
+    $$\widehat{y}_t = \mathbb{E}_t\widehat{y}_{t+1} - \frac{1}{\sigma}(i_t -
+    \mathbb{E}_t\pi_{t+1} - \rho)$$
+  \item Courbe de Phillips
+\note{Courbe de Phillips issue du comportement de marge des entreprises}
+    $$\pi_t = \beta\,\mathbb{E}_t\pi_{t+1} + \kappa\,\widehat{y}_t -
+  \zeta \,\widehat{a}_t$$
+  \item Règle de Taylor
+$$i_t = \rho + \phi_{\pi}\,\pi_t + \phi_y\, \widehat{y}_t + \nu_t$$
+\item Chocs
+\begin{gather*}
+\widehat{a}_t = \rho_a\, \widehat{a}_{t-1} + \varepsilon^a_t \\
+\nu_t = \rho_{\nu}\,\nu_{t-1} + \varepsilon^i_t
+\end{gather*}
+\item Marché du travail
+\note{Équation optionnelle}
+$$\widehat{y}_t = \widehat{a}_t + (1-\alpha)\widehat{n}_t$$
+\end{itemize}
+\end{frame}
+
+\subsection{Dynamique du modèle}
+
+\begin{frame}
+  \frametitle{Calibration}
+  \framesubtitle{En trimestriel}
+\begin{tabular}{ll}
+$\sigma = 1$ & \\
+$\beta = 0.99$ & Taux d'intérêt réel annuel de 4\% \\
+$\theta = \frac{2}{3}$ & Durée des prix de 3 trimestres \\
+$\varepsilon = 6 $ & Marge de 18\% \\
+$\alpha = \frac{1}{3}$ & Part des revenus du capital dans la VA \\
+$\varphi = 1$ & \\
+$\phi_{\pi} = 1.5$ & \\
+$\phi_y = \frac{0.5}{4}$ & \\
+$\rho_a = 0.9$ & \\
+$\rho_{\nu} = 0.5$ &
+\end{tabular}
+\end{frame}
+
+\begin{frame}
+\frametitle{Glou}
+Discussion des anticipations rationnelles et du principe de Taylor
+\end{frame}
+
+\subsection{Réécriture en écart de production}
+
 \begin{frame}
   \frametitle{Réécriture en écart de production}
   \begin{itemize}
   \item On considère le modèle sans frictions nominales ($\theta=0$):
     \begin{description}[AAA]
-    \item[$y^n_t$] production (en log)
+    \item[$\widehat{y}^n_t$] production (en log-déviation)
     \item[$r^n_t$] taux d'intérêt réel (indépendant de la politique monétaire)
     \end{description}
-  \item Écart de production: $\tilde{y}_t = y_t - y^n_t$
+  \item Écart de production: $\tilde{y}_t = \widehat{y}_t - \widehat{y}^n_t$
   \item La courbe IS devient:
-    $$\tilde{y}_t = \mathbb{E}_t\{\tilde{y}_{t+1}\} - \frac{1}{\sigma}(i_t -
-    \mathbb{E}_t\{\pi_{t+1}\} - r_t^n)$$
+    $$\tilde{y}_t = \mathbb{E}_t\tilde{y}_{t+1} - \frac{1}{\sigma}(i_t -
+    \mathbb{E}_t\pi_{t+1} - r_t^n)$$
     où $r_t^n = \rho +
-    \sigma\,\psi^n_{ya}\,\mathbb{E}_t\{\Delta a_{t+1}\}$ et $\psi^n_{ya}=\frac{1+\varphi}{\sigma(1-\alpha)+\varphi+\alpha}$
+    \sigma\,\psi^n_{ya}\,\mathbb{E}_t\{\Delta \widehat{a}_{t+1}\}$ et $\psi^n_{ya}=\frac{1+\varphi}{\sigma(1-\alpha)+\varphi+\alpha}$
 
   \item La courbe de Phillips devient:
-    $$\pi_t = \beta\,\mathbb{E}_t\{\pi_{t+1}\} + \kappa\,\tilde{y}_t$$
-    où $\kappa = \lambda\left(\sigma + \frac{\varphi+\alpha}{1-\alpha}\right)$
+    $$\pi_t = \beta\,\mathbb{E}_t\pi_{t+1} + \kappa\,\tilde{y}_t$$
   \end{itemize}
 \end{frame}
 
-\begin{frame}
-  \frametitle{Politique monétaire}
-
-Le modèle est bouclé avec une règle de Taylor:
-  $$i_t = \rho + \phi_{\pi}\,\pi_t + \phi_y\, \tilde{y}_t + \varepsilon^i_t$$
-où $\varepsilon^i_t$ est le choc de politique monétaire
-\end{frame}
-
 \begin{frame}
   \frametitle{Récapitulatif}
   \begin{itemize}
   \item Courbe IS dynamique
- \note{Courbe IS issue de l'arbitrage intertemporel des ménages}
-    $$\tilde{y}_t = \mathbb{E}_t\{\tilde{y}_{t+1}\} - \frac{1}{\sigma}(i_t -
-    \mathbb{E}_t\{\pi_{t+1}\} - r_t^n)$$
+    $$\tilde{y}_t = \mathbb{E}_t\tilde{y}_{t+1} - \frac{1}{\sigma}(i_t -
+    \mathbb{E}_t\pi_{t+1} - r_t^n)$$
   \item Courbe de Phillips
-\note{Courbe de Phillips issue du comportement de marge des entreprises}
-    $$\pi_t = \beta\,\mathbb{E}_t\{\pi_{t+1}\} + \kappa\,\tilde{y}_t$$
-  \item Règle de Taylor
-$$i_t = \rho + \phi_{\pi}\,\pi_t + \phi_y\, \tilde{y}_t + \varepsilon^i_t$$
-\item Bouclage
+    $$\pi_t = \beta\,\mathbb{E}_t\pi_{t+1} + \kappa\,\tilde{y}_t$$
+  \item Règle de Taylor (maintenant spécifiée en écart de production)
+$$i_t = \rho + \phi_{\pi}\,\pi_t + \phi_y\, \tilde{y}_t + \nu_t$$
+\item Taux d'intérêt réel naturel
+$$r_t^n = \rho + \sigma\,\psi^n_{ya}\,\mathbb{E}_t\{\Delta \widehat{a}_{t+1}\}$$
+\item Chocs
 \begin{gather*}
-r_t^n = \rho + \sigma\,\psi^n_{ya}\,\mathbb{E}_t\{\Delta a_{t+1}\} \\
-a_t = \rho_a\, a_{t-1} + \varepsilon^a_t
+\widehat{a}_t = \rho_a\, \widehat{a}_{t-1} + \varepsilon^a_t \\
+\nu_t = \rho_{\nu}\,\nu_{t-1} + \varepsilon^i_t
 \end{gather*}
 \end{itemize}
 \end{frame}
 
-\subsection{Dynamique du modèle}
-
 \subsection{La politique monétaire optimale}
 
+
 \section{Le modèle Smets-Wouters}
 
 \section{Extensions principales}
-- 
GitLab