Skip to content

Commit

Permalink
Cosmetical changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wmutschl committed Apr 26, 2024
1 parent d64b1a4 commit 6c8404c
Show file tree
Hide file tree
Showing 31 changed files with 62 additions and 59 deletions.
2 changes: 1 addition & 1 deletion exam/midterm_exam_ss2022.tex
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ \subsection*{Exercises}
Write a Dynare mod file for this model.

\item
Derive the steady state analytically and include these in a {\texttt{steady{\_}state{\_}model}} block.
Derive the steady-state analytically and include these in a {\texttt{steady{\_}state{\_}model}} block.
If you struggle to do that, use an \texttt{initval} block.

\item
Expand Down
2 changes: 1 addition & 1 deletion exercises/an_schorfheide_identif_bk.tex
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ \subsection*{Exercises}
\item Provide intuition behind each equation of the model.
How are nominal price rigidities modelled?\\\emph{Hint: Have a look at the relevant parts of the underlying paper.}

\item Write a Dynare mod file for this model. Derive the steady state of all model variables analytically and include these in a \texttt{steady\_state\_model} block.
\item Write a Dynare mod file for this model. Derive the steady-state of all model variables analytically and include these in a \texttt{steady\_state\_model} block.

\item Explain how theoretical moments are computed based on the first-order policy function.

Expand Down
2 changes: 1 addition & 1 deletion exercises/case_study_ascari_sbordone_2014.tex
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

\item The labor disutility parameter, which is unspecified in the paper is set so that labor is 1/3 in the benchmark case.

\item The technology parameter, which is also left unspecified in the published version, is set to 1 in steady state.
\item The technology parameter, which is also left unspecified in the published version, is set to 1 in steady-state.

\end{itemize}

Expand Down
8 changes: 4 additions & 4 deletions exercises/log_linearization_solution.tex
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
around which the perturbation solution is computed.

\item No, variables in model C behave as the log of variables in model B.
In addition, in model B, variables have distinct steady state values depending on the parameters of the model,
while in model C, the steady state of all variables is zero.
In addition, in model B, variables have distinct steady-state values depending on the parameters of the model,
while in model C, the steady-state of all variables is zero.
If, however, we would add hat variables to model B,
then the hat variables would be equivalent between model variants.

\item The exponential transform enables one to write variables in terms of log deviations from their steady state:
\item The exponential transform enables one to write variables in terms of log deviations from their steady-state:
\begin{align*}
x_t = e^{log(x_t)} = e^{log(x_t) - log(x) + log(x)} = x e^{log(x_t)-log(x)} = x e^{\hat{x}_t}
\end{align*}
Expand All @@ -35,7 +35,7 @@
\begin{align*}
1 = \beta E_t \left[ \left(\frac{c e^{\hat{c}_{t+1}}}{c e^{\hat{c}_t}}\right)^{-\tau} \frac{1}{\gamma z e^{\hat{z}_{t+1}}} \frac{R e^{\hat{R}_t}}{\pi e^{\hat{\pi}_{t+1}}} \right]
\end{align*}
Note that equation \eqref{eq:AS_B1} in steady state is equal to $1 = \beta \frac{1}{\gamma z}\frac{R}{\pi}$.
Note that equation \eqref{eq:AS_B1} in steady-state is equal to $1 = \beta \frac{1}{\gamma z}\frac{R}{\pi}$.
So we can simplify the previous equation to get equation \eqref{eq:AS_C1}:
\begin{align*}
1 &= \mathbb{E}_t \left[e^{-\tau \hat{c}_{t+1} + \tau \hat{c}_{t} + \hat{R}_{t} - \hat{z}_{t+1} - \hat{\pi}_{t+1} }\right]
Expand Down
2 changes: 1 addition & 1 deletion exercises/nk_model_algebra.tex
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@
\begin{align}
R_t = R \left(\frac{\Pi_t}{\Pi^*}\right)^{\psi_\pi} \left(\frac{y_t}{y}\right)^{\psi_y} e^{\nu_t} \label{eq:NewKeynesian.MonetaryPolicyRule}
\end{align}
where $R$ denotes the nominal interest rate in steady state,
where $R$ denotes the nominal interest rate in steady-state,
$\psi_\pi$ the sensitivity parameter to inflation deviations,
$\psi_y$ the feedback parameter of the output gap
and $\nu_t$ an exogenous deviation to the rule.
Expand Down
2 changes: 1 addition & 1 deletion exercises/nk_model_algebra_solution.tex
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
\paragraph{First-order condition with respect to $i_t$}
Setting the derivative of $\pounds^{HH}$ with respect to $i_t$ to zero yields directly equation \eqref{eq:NewKeynesian.EulerInvestment}
\begin{align*}
1 = q_t \left( 1 - \frac{\phi_i}{2} \left(\frac{i_t}{i_{t-1}-1}\right)^2 - \phi_i \left(\frac{i_t}{i_{t-1}}-1\right)\left(\frac{i_t}{i_{t-1}}\right) \right)
1 = q_t \left( 1 - \frac{\phi_i}{2} \left(\frac{i_t}{i_{t-1}}-1\right)^2 - \phi_i \left(\frac{i_t}{i_{t-1}}-1\right)\left(\frac{i_t}{i_{t-1}}\right) \right)
+ \beta E_t \frac{\lambda_{t+1}}{\lambda_t} q_{t+1} \phi_i \left(\frac{i_{t+1}}{i_{t}}-1\right)\left(\frac{i_{t+1}}{i_{t}}\right)^2
\end{align*}
\emph{Interpretation:}
Expand Down
2 changes: 1 addition & 1 deletion exercises/nk_preprocess_steady.tex
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
\end{longtable}

\noindent
Write a Dynare mod file for this model and compute the steady state of the model either analytically using a \texttt{steady\_state\_model} block
Write a Dynare mod file for this model and compute the steady-state of the model either analytically using a \texttt{steady\_state\_model} block
or numerically using an \texttt{initval} block.
\noindent Additionally, for reporting purposes, add the following equations:
\begin{align*}
Expand Down
2 changes: 1 addition & 1 deletion exercises/nk_preprocess_steady_solution.tex
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
\begin{align*}
{\widetilde{p}} = \left(\frac{1-{{\theta}}\, {{\Pi}}^{{{\epsilon}}-1}}{1-{{\theta}}}\right)^{\frac{1}{1-{{\epsilon}}}}
\end{align*}
Now we are able to evaluate \eqref{eq:NewKeynesian.PriceDistortionLoM} in steady state, which becomes:
Now we are able to evaluate \eqref{eq:NewKeynesian.PriceDistortionLoM} in steady-state, which becomes:
\begin{align*}
{p^*} = ({{\widetilde{p}}})^{-{{\epsilon}}} \,\frac{1-{{\theta}}}{1-{{\theta}}\, {{\Pi}}^{{{\epsilon}}}}
\end{align*}
Expand Down
4 changes: 2 additions & 2 deletions exercises/nk_simulations_solution.tex
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
In other words, when inflation rises, the central bank rises the nominal interest rate more than one-to-one.
This guarantees that the real interest rate eventually rises with inflation.
The increase in the real interest rate creates a counter-effect to inflation,
since a higher real interest rate causes a fall in the output gap and in deviations of the marginal cost from the steady state.
since a higher real interest rate causes a fall in the output gap and in deviations of the marginal cost from the steady-state.
This is the underlying economic principle behind the ability of monetary policy to anchor inflation expectations.
\end{itemize}
Note that in the mod file, we focus on the hat variables which are defined as \textbf{log deviations from steady-state}.
This is useful for interpreting the Impulse Response Functions as Dynare plots these in \textbf{deviation from steady-state}.
So for hat variables this corresponds (at \texttt{order=1}) to \textbf{percentage deviations} from the original level variables from steady state.
So for hat variables this corresponds (at \texttt{order=1}) to \textbf{percentage deviations} from the original level variables from steady-state.

\paragraph{Technology shock}
The positive unit shock on total factor productivity has on impact a positive effect on output and consumption,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The key difference between stochastic and deterministic models stems from the role of uncertainty.
In a deterministic world we have perfect knowledge about all future events including policy actions.
Given some initial data we can derive optimal trajectories leading to a steady state which generates the highest outcome, e.g. total utility flows.
Given some initial data we can derive optimal trajectories leading to a steady-state which generates the highest outcome, e.g. total utility flows.
Contrary to that, in a stochastic setting there is always some randomness involved.
That is, the agents do not know if or when a shock will hit the economy.
They do, however, build (mathematical) expectations because the probability distribution of those shocks is known to the agents.
Expand Down
2 changes: 1 addition & 1 deletion progs/dynare/an_schorfheide_identif_bk.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RA ${r_{A}}$ (long_name='annualized steady-state real interest rat
PA ${\pi^{(A)}}$ (long_name='annualized target inflation rate')
GAMQ ${\gamma^{(Q)}}$ (long_name='quarterly steady-state growth rate of technology')
NU ${\nu}$ (long_name='inverse of elasticity of demand in Dixit Stiglitz aggregator')
GBAR ${\bar{g}}$ (long_name='steady state government spending process')
GBAR ${\bar{g}}$ (long_name='steady-state government spending process')
;


Expand Down
2 changes: 1 addition & 1 deletion progs/dynare/an_schorfheide_loglinear.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ RA ${r_{A}}$ (long_name='annualized steady-state real interest rat
PA ${\pi^{(A)}}$ (long_name='annualized target inflation rate')
GAMQ ${\gamma^{(Q)}}$ (long_name='quarterly steady-state growth rate of technology')
NU ${\nu}$ (long_name='inverse of elasticity of demand in Dixit Stiglitz aggregator')
GBAR ${\bar{g}}$ (long_name='steady state government spending process')
GBAR ${\bar{g}}$ (long_name='steady-state government spending process')
;

model;
Expand Down
2 changes: 1 addition & 1 deletion progs/dynare/an_schorfheide_nonlinear.mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ RA ${r_{A}}$ (long_name='annualized steady-state real interest rat
PA ${\pi^{(A)}}$ (long_name='annualized target inflation rate')
GAMQ ${\gamma^{(Q)}}$ (long_name='quarterly steady-state growth rate of technology')
NU ${\nu}$ (long_name='inverse of elasticity of demand in Dixit Stiglitz aggregator')
GBAR ${\bar{g}}$ (long_name='steady state government spending process')
GBAR ${\bar{g}}$ (long_name='steady-state government spending process')
;


Expand Down
2 changes: 1 addition & 1 deletion progs/dynare/an_schorfheide_nonlinear_exp.mod
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RA ${r_{A}}$ (long_name='annualized steady-state real interest rat
PA ${\pi^{(A)}}$ (long_name='annualized target inflation rate')
GAMQ ${\gamma^{(Q)}}$ (long_name='quarterly steady-state growth rate of technology')
NU ${\nu}$ (long_name='inverse of elasticity of demand in Dixit Stiglitz aggregator')
GBAR ${\bar{g}}$ (long_name='steady state government spending process')
GBAR ${\bar{g}}$ (long_name='steady-state government spending process')
;

model;
Expand Down
2 changes: 1 addition & 1 deletion progs/dynare/nk.mod
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ RHONU = 0.5;

@#if USE_INITVAL==1
%-------------------------------------------------------------------------%
% computations: steady state with initval block
% computations: steady-state with initval block
%-------------------------------------------------------------------------%
% note that you can compute simple expressions in the initval block and also
% re-use computed variables in subsequent initial values of other variables,
Expand Down
4 changes: 2 additions & 2 deletions progs/matlab/Brock_Mirman_ss.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
% computes the steady-state of the Brock and Mirman (1972) model analytically
% =========================================================================
% INPUTS
% - SS : vector with initial steady state values in declaration order
% - SS : vector with initial steady-state values in declaration order
% (usually empty, but might be useful for initial values
% or to update endogenous parameters)
% - params : vector with values for the parameters in declaration order
% ----------------------------------------------------------------------
% OUTPUTS
% - SS : vector with computed steady state values in declaration order
% - SS : vector with computed steady-state values in declaration order
% - params : vector with updated values for the parameters in declaration order
% - error_indicator: 0 if no error when computing the steady-state
% =========================================================================
Expand Down
2 changes: 1 addition & 1 deletion progs/matlab/perturbation_solver_LRE.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
nspred = M_.nspred; % number of state variables: predetermined and mixed
dr_order_var = oo_.dr.order_var; % declaration order to DR order
lead_lag_incidence = M_.lead_lag_incidence; % lead_lag_incidence matrix with information about columns in dynamic Jacobian matrix
steady_state = oo_.steady_state; % steady state of endogenous in declaration order
steady_state = oo_.steady_state; % steady-state of endogenous in declaration order
exo_steady_state = oo_.exo_steady_state; % steady-state of exogenous variables

%%%%%%%%%%%%%%%%%%%%
Expand Down
2 changes: 1 addition & 1 deletion progs/matlab/perturbation_solver_dynare_order1.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
nsfwrd = M_.nsfwrd; % number of jumper variables: mixed and forward
dr_order_var = oo_.dr.order_var; % declaration order to DR order
lead_lag_incidence = M_.lead_lag_incidence; % lead_lag_incidence matrix with information about columns in dynamic Jacobian matrix
steady_state = oo_.steady_state; % steady state of endogenous in declaration order
steady_state = oo_.steady_state; % steady-state of endogenous in declaration order
exo_steady_state = oo_.exo_steady_state; % steady-state of exogenous variables

%%%%%%%%%%%%%%%%%%%%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ TARGET_ZSHARE = 0.20840121;
l = 0.2;

%-------------------------------------------------------------------------%
% computations: steady state and calibration of endogenous parameters
% computations: steady-state and calibration of endogenous parameters
%-------------------------------------------------------------------------%
steady_state_model;
pz = 0; % no policy regime
Expand Down Expand Up @@ -86,6 +86,15 @@ A = a;
ZSTAR = DELTA_M*m - z; % implicit rest of the world emission share
TARGET_INTENSITY = z/y;
CARBON_TAX = pz;

log_y = log(y);
log_c = log(c);
log_iv = log(iv);
log_l = log(l);
log_mc = log(mc);
log_z = log(z);
log_u = log(u);
log_pz = log(pz);
end;
steady;
save_params_and_steady_state('ann_dio_2015_calib_no_policy.inc');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ change_type(var) TARGET_GSHARE;
@#include "ann_dio_2015_modeleqs.inc"

%-------------------------------------------------------------------------%
% calibration via new steady state
% calibration via new steady-state
%-------------------------------------------------------------------------%
load_params_and_steady_state('ann_dio_2015_calib_no_policy.inc'); % start from no policy calibration

Expand Down
26 changes: 13 additions & 13 deletions progs/replications/Ascari_Sbordone_2014/Ascari_Sbordone_2014.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
* It provides a replication of the main results of the original paper
* in Section 3 (the New Keynesian model with trend inflation). It replicates the Figures:
* - Figure 7: The Cost of Price dispersion
* - Figure 8: Trend Inflation and Steady State Variables
* - Figure 8: Trend Inflation and Steady-State Variables
* - Figure 11: The Determinacy Region and Trend Inflation
* - Figure 13: Impulse Response Functions to a 1 Percent Positive Technology Shock
* - Figure 14: Impulse Response Functions to a 1 Percent Positive Monetary Policy Shock
*
* Moreover, it replicates the business cycle moments reported on p. 717.
*
* This mod-file shows how to access steady state variables in order to plot steady state
* This mod-file shows how to access steady-state variables in order to plot steady-state
* dependences on parameters.
* It also shows how to manually do a stability mapping be iterating over a grid on the parameter space.
*
Expand All @@ -27,7 +27,7 @@
* - Following the approach of the published replication files by the authors, the labor disutility parameter, which
* is unspecified in the paper is set so that labor is 1/3 in the benchmark case; this normalization is relevant
* for the definition of welfare
* - The technology parameter, which is also left unspecified in the published version is set to in steady state, which
* - The technology parameter, which is also left unspecified in the published version is set to in steady-state, which
* is the natural normalization also used in the official replication files
* - For the business cycle moments, the technology shock variance is actually 0.45^2 (not 0.45 as reported in the paper), i.e.
* it is consistent with the number reported in Smets/Wouters (2007). Moreover, business cycle moments rely on a Taylor rule
Expand Down Expand Up @@ -106,31 +106,31 @@ parameters trend_inflation
theta $\theta$ (long_name='Calvo parameter')
sigma $\sigma$ (long_name='Risk aversion')
epsilon $\varepsilon$ (long_name='Elasticity of substitution')
Pi_bar ${\bar \pi}$ (long_name='gross quarterly steady state inflation')
Pi_bar ${\bar \pi}$ (long_name='gross quarterly steady-state inflation')
rho_v ${\rho_\nu}$ (long_name='autocorrelation of monetary shock')
rho_a ${\rho_a}$ (long_name='autocorrelation of technology shock')
rho_zeta ${\rho_\zeta}$ (long_name='autocorrelation of preference shock')
phi_pi ${\phi_\pi}$ (long_name='Taylor rule feedback inflation')
phi_y ${\phi_y}$ (long_name='Taylor rule output')
Y_bar ${\bar Y}$ (long_name='steady state output, set in steady state model block')
Y_bar ${\bar Y}$ (long_name='steady-state output, set in steady-state model block')
var_rho ${\varrho}$ (long_name='degree of indexing')
i_bar ${\bar i}$ (long_name='steady state interest rate, set in steady state model block')
i_bar ${\bar i}$ (long_name='steady-state interest rate, set in steady-state model block')
d_n ${d_n}$ (long_name='labor disutility parameter')
rho_i ${\rho_i}$ (long_name='interest rate smoothing parameter')
;


%fix labor to 1/3 in zero trend inflation steady state with Frisch elasticity of 1#
%fix labor to 1/3 in zero trend inflation steady-state with Frisch elasticity of 1#
beta_ss = 0.99;
alpha_ss = 0;
theta_ss = 0.75;
epsilon_ss = 10;
sigma_ss = 1; %different utility than log case implies that model utility function and its steady state must be manually changed
sigma_ss = 1; %different utility than log case implies that model utility function and its steady-state must be manually changed
phi_par_ss=1;
var_rho_ss = 0;
trend_inflation_ss=0;

%%compute labor disutility parameter under benchmark of 0 steady state
%%compute labor disutility parameter under benchmark of 0 steady-state
%%inflation
Pi_bar = (1+0/100)^(1/4); %set Pi_bar to reflect quarterly inflation
p_star_ss=((1-theta_ss*Pi_bar^((epsilon_ss-1)*(1-var_rho_ss)))/(1-theta_ss))^(1/(1-epsilon_ss));
Expand Down Expand Up @@ -483,10 +483,10 @@ verbatim;
xlabel('Trend Inflation')

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%% Generate Figure 8: Trend Inflation and Steady State Variables
%%%%%% Generate Figure 8: Trend Inflation and Steady-State Variables
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

figure('Name','Trend Inflation and Steady State Variables')
figure('Name','Trend Inflation and Steady-State Variables')
trend_inflation_vector=0:0.5:8;
utility=NaN(length(trend_inflation_vector),1);
output=NaN(length(trend_inflation_vector),1);
Expand All @@ -509,15 +509,15 @@ verbatim;
subplot(1,3,1)
plot(trend_inflation_vector,(output-output(1,1))*100)
xlabel('Trend Inflation')
ylabel('Steady state output')
ylabel('Steady-state output')
subplot(1,3,2)
plot(trend_inflation_vector,(ave_markup-ave_markup(1,1))*100,'-',trend_inflation_vector,(marg_markup-marg_markup(1,1))*100,'--',trend_inflation_vector,(price_adjust_gap-price_adjust_gap(1,1))*100,'.')
xlabel('Trend Inflation')
ylabel('SS price adj. gap, marg. and ave. markup')
subplot(1,3,3)
plot(trend_inflation_vector,(utility-utility(1,1))./abs(utility(1,1))*100)
xlabel('Trend Inflation')
ylabel('Steady state welfare')
ylabel('Steady-state welfare')

end;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% fix labor to 1/3 to compute labor disutility parameter under benchmark of
% zero trend inflation steady state with Frisch elasticity of 1
% zero trend inflation steady-state with Frisch elasticity of 1
N_SS = 1/3;
BETA_SS = 0.99;
ALPHA_SS = 0;
Expand Down
Loading

0 comments on commit 6c8404c

Please sign in to comment.