0% found this document useful (0 votes)
20 views

DSGE

1) DSGE models are dynamic stochastic general equilibrium models that model macroeconomic variables as arising from the optimization decisions of economic agents (households and firms) within a competitive environment subject to shocks. 2) A basic DSGE model includes households that consume, supply labor, and save; firms that produce goods, hire labor, and set prices; and a monetary authority that sets interest rates. 3) Households maximize utility subject to a budget constraint. Firms maximize profits subject to demand and nominal rigidities like price stickiness. The monetary authority follows a policy rule like Taylor rule.

Uploaded by

Abane Jude yen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

DSGE

1) DSGE models are dynamic stochastic general equilibrium models that model macroeconomic variables as arising from the optimization decisions of economic agents (households and firms) within a competitive environment subject to shocks. 2) A basic DSGE model includes households that consume, supply labor, and save; firms that produce goods, hire labor, and set prices; and a monetary authority that sets interest rates. 3) Households maximize utility subject to a budget constraint. Firms maximize profits subject to demand and nominal rigidities like price stickiness. The monetary authority follows a policy rule like Taylor rule.

Uploaded by

Abane Jude yen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

Outline Basic DSGE Further readings Dynare

Dynamic Stochastic General Equlibrium


(DSGE) Modeling

March 16, 2021


Outline Basic DSGE Further readings Dynare

Outline

What is DSGE?
Basic building blocks of the model
Using Dynare
Outline Basic DSGE Further readings Dynare

Outline

Lucas (1973) on imperfect information, and subsequent


research, provided fertile ground for examining the
centrality of nominal rigidities in macroeconomics.
The real business cycle (RBC) revolution, inspired by the
neoclassical paradigm, finds an explanation in productivity
dynamics (Kydland and Prescott, 1982).
Integrating nominal rigidities in the RBC model gave birth
to what we know as the New Keynesian Dynamic
Stochastic General Equilibrium (NK DSGE) model.
Outline Basic DSGE Further readings Dynare

Introduction to DSGE modelling


What is DSGE
Outline Basic DSGE Further readings Dynare

Introduction to DSGE modelling


Why Dynamic
Outline Basic DSGE Further readings Dynare

Introduction to DSGE modelling


Why Stochastic
Outline Basic DSGE Further readings Dynare

Introduction to DSGE modelling


What is General Equilibrium
Outline Basic DSGE Further readings Dynare

What is DSGE

They make three strategic modeling choices:


1 The behavior of agents is formally derived from
microfoundations (microfounded). Agents are assumed to
behave optimally and rationally.
2 The underlying economic environment is that of a
competitive economy, but with a number of essential
distortions added: nominal rigidities, monopoly power,
information problems, etc.
3 The model is thought and estimated as a system, rather
than equation by equation.
Outline Basic DSGE Further readings Dynare

Why DSGE modeling?

A DSGE model is a VAR model with optimization-based


constraints (economic foundations).
You like VAR? You will like DSGE.
Isolating micro-parameters in VAR modeling is
quasi-impossible.
You should like DSGE
Structural microfounded shocks cannot be identified in
VAR models.
Can you love DSGE?
Outline Basic DSGE Further readings Dynare

Why we need DSGE?

The economy is thought as an interlinked system,


excluding single equation methodologies (OLS, IV etc).
Although it is possible to build an empirical methodology to
estimate an economy thought as a system (VAR, SUR
etc.), only DSGE modeling allows for a clear assessment
and identification of structural shocks and structural
parameters.
Outline Basic DSGE Further readings Dynare

Why we need DSGE?

DSGE models also allow to simulate calibrated


microfounded models (calibration can be base on the
literature or a previous estimation) without any available
data.
Policy assessment based on microeconomic behaviors
and interlinkages, with or without data, is easier through
DSGE models.
To date, there is no simpler alternative.
Outline Basic DSGE Further readings Dynare

A baseline DSGE model


Outline Basic DSGE Further readings Dynare

Baseline framework

The model of Galı́ (2015) consists of economic agents of 3


types:
Houesehols:
Purchase goods for consumption, hold money and bonds,
supply labor, and maximize the expected present value of
utility.
Firms:
Hire labor, produce and sell differentiated products in
monopolistically competitive goods markets, and maximize
profits.
Central bank:
Controls the nominal rate of interest.
Outline Basic DSGE Further readings Dynare

Basic buliding blocks


Households

Households maximise present discounted value of expected


utility from now until infinite future, subject to budget
constraints.
Households are characterised by:
Utility maximizations
Consumption smoothing
Forming habits.
Supplying labour servicesand demanding goods and
services from firms
Participate in the financial market (saving and borrowing
behaviours).
Outline Basic DSGE Further readings Dynare

Basic buliding blocks


Households

Preferences of the representative household are defined


over a composite consumption good Ct , and leisure 1 − Nt ,
where Nt is the time devoted to market employment.
Standard (CRRA) utility function:
1+ η
1 χNt
Ut = C 1− σ − (1)
1−σ t 1+η

Budget constraint

Pt Ct + Rt Bt + Mt = Bt−1 + Wt Nt + Mt−1 (2)


Outline Basic DSGE Further readings Dynare

Basic buliding blocks


Households

General solution for stochastic infinitely lived horizon case


is given as:
 
0 0 1 + it
U (Ct ) = βEt U (Ct+1 )
1 + π t +1

This gives the dynamic IS curve.


It is also known as the Consumption Euler equation.
Outline Basic DSGE Further readings Dynare

Basic buliding blocks


Households - Idea?

 
1 + it
U 0 (Ct ) = βEt U 0 (Ct+1 )
1 + π t +1

Higher interest rates reduce consumption. i.e.:


it ↑−→ U 0 (Ct ) ↑−→ Ct ↓
Higher expected future inflation increases. i.e.:
consumption.
Et πt+1 ↓−→ U 0 (Ct ) ↓−→ Ct ↑
Outline Basic DSGE Further readings Dynare

Basic buliding blocks


Firms

Firms maximise present discounted value of expected profit


from now until infinite future, subject to demand curve, nominal
price rigidity and labour supply curve.
Firms are characterized by:
maximizing profit.
Nominal rigidities (wages and prices).
Demand of labour and supply of goods and services.
Outline Basic DSGE Further readings Dynare

Basic buliding blocks


Firms - Idea?

Assuming Calvo price setting:


Proportion of firms (1 − ω ) able to change their price in a
period.
Proportion of firms (ω ) unable to change their price in a
period
Solving the full the solution we obtain:

1
wt = x̂t
α
where
αω
x̂t = (π̂t − βEt π̂t+1 )
(1 − ω )(1 − βω )
This is known as the New Keynesian Philips curve or the
Forward-looking Philips curve.
Outline Basic DSGE Further readings Dynare

Basic buliding blocks


Firms - Idea?

when ω = 0, we have perfect price flexibility and when


ω = 1 we have price inflexibility.
When inflation is expected to rise in future, firms set high
prices now, choking supply. i.e.:
(π̂t − βEt π̂t+1 ) < 0 −→ π̂t < 0
Higher expected future inflation chokes supply.
Et π̂t+1 ↑−→ P̂it ↑−→ x̂t ↓
Outline Basic DSGE Further readings Dynare

Basic buliding blocks


Monetary authority

Sets the interest rate.


Simplest case is simple rule like the Taylor’s rule.
Interest rate reacts to inflation, with shocks.

iˆt = δπ̂t + νt
Outline Basic DSGE Further readings Dynare

Basic buliding blocks


Moving forward

This basic framework can be extended to include the following:


the structure of the financial markets (financial
intermediation).
the operation of different input and output markets
(Tradable and non-tradable goods; intermediate and final
goods producers etc).
the integration of the economy to the international financial
or asset markets.
Outline Basic DSGE Further readings Dynare

Basic buliding blocks


Selected books

Woodford, 2003. Interest and Prices - Foundations of a


Theory of Monetary Policy, Princeton University Press.
Galı́, 2015. Monetary policy, inflation and the business
cycle: an introduction to the New Keynesian framework,
Princeton University Press. Second Edition.
Walsh, 2017. Monetary theory and policy, MIT Press.
Fourth Edition.
Outline Basic DSGE Further readings Dynare

Basic buliding blocks


Reference models

Gertler, Gali, and Clarida, 1999. The science of


monetary policy: a New Keynesian perspective,
Journal of Economic Literature
Kydland, Finn. E. and Edward C. Prescott (1982) Time to
Build and Aggregate fluctuations. Econometrica, Vol. 50,
No. 6, pp. 1345-70.
Smets, F., and Wouters, R. (2007). Shocks and frictions
in US business cycles: A Bayesian DSGE approach.
American economic review, 97(3), 586-606.
Smets, F., and Wouters, R. (2003). An estimated DSGE
model of the euro area. Journal of the European
economic association, 1(5), 1123-1175.
Outline Basic DSGE Further readings Dynare

Basic buliding blocks


Reference models

Christiano, Lawrence, Martin Eichenbaum, and


Charles L. Evans (2005) Nominal rigidities and the
Dynamic Effects of a Shock to Monetary Policy.
Journal of Political Economy, Vol. 113, No. 1: 1-45.
Gertler, Mark and Nobuhiro Kiyotaki (2011) Financial
Intermediation and Credit Policy in Business Cycle
Analysis.In Handbook of Monetary Economics, Vol. 3A,
edited by Benjamin M. Friedman and Michael Woodford.
Elsevier.
Colciago, Andrea (2011) Rule-of-Thumb Consumers Meet
Sticky Wages. Journal of Money, Credit and Banking, Vol.
43, No. 2-3, 325-353.
Dagher, Jihad, Jan Gottschalk, and Rafael Portillo (2010)
Oil windfalls in Ghana: A DSGE Approach. IMF Working
Paper WP/10/116.
Outline Basic DSGE Further readings Dynare

Dynare

Dynare is preprocessor and a collection of Matlab routines,


which solves DSGE models.
A suite of programs for the simulation and estimation of
rational expectation models, developed by a group of
leading applied DSGE researchers headed by Michel
Juillard since 1994.
Widely used by central banks, IMF, academics research
and in teaching graduate students
The Dynare home page is http://www.dynare.org/, here you
can download it
instructions on how to install Dynare can be found in the
manual (Chapter 2, Installation and configuration).
Dynare is open source!!!
Outline Basic DSGE Further readings Dynare

As a Modeler...

You tell Dynare what the variables, shocks and parameters


of your model
You write down the model equations
You tell Dynare to find the steady state
Dynare (log)linearizes the model around the steady state...
and solves the recursive equilibrium laws of motion of the
linearized model
Finally, the model is analyzed via impulse responses,
stochastic simulations and moments
Outline Basic DSGE Further readings Dynare

What Dynare do

Computes the steady state of the D(S)GE model.


Computes the solution of deterministic models.
Computes the first and second order approximation of
linear/non-linear stochastic models.
Estimates the parameters of DSGE models using MLE or
Bayesian methods.
Computes optimal policy for LQ economies.
Simple regression and useful checking tool.
No or little programming skills required.
Outline Basic DSGE Further readings Dynare

Dynare environment

Labeling block:
Endogenous variables written in ”var”
Exogenous variables written in ”varexo”
parameters written in ”parameters”
Parameter values block: Assign values to parameters
You may also find it useful to give some parameter
transformations. e.g. beta is a parameter, and you define
steady state real interest rate: rr = 1/beta − 1
Outline Basic DSGE Further readings Dynare

Dynare environment

Model block:
The model block starts with
model;
and ends with
end;
Between ’model’ and ’end’ you write down the necessary
equations:
defining the dynamic equilibrium of the model firstorder
conditions
constraints
Remember: you need as many equations as there are
variables
Outline Basic DSGE Further readings Dynare

Dynare environment

Time indices are given in parenthesis


Xt+1 is written as X (+1)
Xt−1 is written as X (−1).
Xt is written as X with no time index.
Note in Dynare, the time index refers to the period when the
value of the variable is determined.
Outline Basic DSGE Further readings Dynare

Linearization

In the long-run the model in on the steady state. We want


to evaluate what occurs after a shock:
If the economy goes back to the steady state (stability).
and how (path followed by the variables after the shock in
backing to the steady state.
Linearize the model, consider a linear approximation
(Taylor expansion) of the non-linear model around the
steady state and compute the effects of small
perturbations around steady state.
Our results are good is we are in the neighborhood of the
steady state (small perturbations).
Outline Basic DSGE Further readings Dynare

Linearization and log-linearization

Dynare linearizes the model around the steady state.


Advantages of log-linearization: We are dealing with
percentage deviations from the steady state (or the
balanced growth path).

log(Y ) − log(Yss ) = %deviationfromthesteadystate


.
Log-deviations (or percentage deviations) are easy to
interpret (is a deviation ’small’ or ’large’?).
Similar measures are used in empirical examination of the
data (e.g. applying HP filter to log(GDP)).
Outline Basic DSGE Further readings Dynare

Log-linearization: A useful trick

A useful trick: Write down the model in terms of logarithmic


transformations of the original variables.
When Dynare linearizes the model in terms of the
logarithmic transformations, it log-linearizes the model in
terms of the original variables.
Outline Basic DSGE Further readings Dynare

Dynare program blocks

Initialization block: Dynare has to solve for the steady


state. This can be the most diffcult part (since it is a true
non-linear problem). So good initial conditions are
important.
Random shock block: Indicate the standard deviation for
the exogenous innovation.
Outline Basic DSGE Further readings Dynare

Initialization block

It is often useful to give Dynare an initial guess of the


steady state values, after the command.
initial;
Dynare finds the steady state with the command.
steady;
Outline Basic DSGE Further readings Dynare

Random shock block

shock;
var a;
we shock only one ’variable’ (the TFP shock a)
stderr 0.007; the standard error of the TFP shock is 0.007.
If there are several shocks, say e z and e c, you have to be
more careful: stderr e z0.007; stderr e c0.002;
More generally, if there are several shocks, you may want to
give the variance-covariance matrix of the shocks;
Outline Basic DSGE Further readings Dynare

Stochastic simulation (IRF)

stoch simul(order = 1, irf = 100)lylhlclilkz;


order=1 means that Dynare takes a first order Taylor
approximation around the steady state (order = 2) =>
second order approximation,.
irf = 100 means that you want Dynare to compute the
impulse responses for 100 periods

Dynare computes the moments of the endogenous


variables mean, standard deviation, variance, skewness,
kurtosis (contemporaneous) cov-matrix autocorrelations.
The list of variables, we want to Dynare to analyze is ly lh
lc li lk z.
Notice that z ≡ log(Zt ) − log(Z ) = log(Zt ), since Z = 1 and
log(Z ) = 0 (a useful normalization)..
Outline Basic DSGE Further readings Dynare

Stochastic simulation (IRF)

Alternatively we can write:


stoch simul(order = 1, periods = 1000, irf = 100);
Now Dynare simulates the model for 1000 periods, and
computes the moments based on the simulated data
Outline Basic DSGE Further readings Dynare

Complete structure of the model block

var; (list of endogenous variables);


varexo; (list of shocks) ;
parameters; (parameters + parameter values +
transformations);
model;
end;
initial; (initial guesses for computing the steady state)
steady; (compute the steady state)
shocks; (the shock structure of the model )
var; (what variables are shocked)
stderr; (the standard error of the shocks)
end;
stoch simul(order=1,irf=100) ly lh lc li lk z; (analyzing the
model)
Outline Basic DSGE Further readings Dynare

Getting the results

Save the file as [Name of the file].mod


For example bondzie.mod
You run the model by writing to the Matlab command
window dynare bonzie.mod
Outline Basic DSGE Further readings Dynare

Dynare output

When you type: dynare bondzie.mod


The output is shown on the screen, and in separate figures
(impulse responses).
Output includes
Policy and transition functions
Moments of the endogenous variables: mean, variance,
standard deviation, skewness, kurtosis.
matrix of contemporaneous correlations
coefficients of autocorrelation
Impulse responses
If you have included the periods option in stoch simul the
output also includes the results (time paths of endogenous
variables) from the stochastic simulation.
Outline Basic DSGE Further readings Dynare

Configuration message
Outline Basic DSGE Further readings Dynare

Steady state values

The term constant is the steady state


Outline Basic DSGE Further readings Dynare

Model summary
Outline Basic DSGE Further readings Dynare

Shock co-variance
Outline Basic DSGE Further readings Dynare

Policy transition functions

Transition functions: how the period t values of the state


variables depend on t − 1 values of the state variables, and
the shock
Policy functions: how the period t values of the other
variables depend on t − 1 values of the state variables, and
the shock.
Columns: period t values of the variables.
Rows: period t − 1 values of the state variables + the
shock (e)
The term constant is the steady state (of log
transformation).
Outline Basic DSGE Further readings Dynare

Policy transition functions


Outline Basic DSGE Further readings Dynare

Theoretical moments
Outline Basic DSGE Further readings Dynare

Correlation Matrix
Outline Basic DSGE Further readings Dynare

Autocorrelation
Outline Basic DSGE Further readings Dynare

Impulse response functions


Outline Basic DSGE Further readings Dynare

Storing Output

The output is shown on the screen, and in separate figures


(impulse responses).
Output is also stored in a separate structure, called oo .
The structure oo contains (for example)
the steady state (oo .steady state )
the variance-covariance matrix (oo .var)
the autocorrelations (oo .autocorr)
impulse responses (oo .irfs)
coefficient of the policy and transition functions (oo .dr)
Results (time paths of endogenous variables) from
stochastic simulations (oo .endo simul)

You might also like