## A Decentralized DSGE Model

In previous articles, we went through a simple DSGE model. We computed first order conditions and steady-state equations and we ran a simulation in Dynare. Maybe some of you were confused by one thing: there was no firm in the model. We had only a representative household, we even had a production function, but this function was a part of a household budget constraint. Isn’t this strange? Where is the firm? And where is a profit maximization task? We will discuss it in this article. We will define a new DSGE model which contains both firm and household. Then we will solve it and we will run a new simulation in Dynare.

There are several ways how to define the environment of the model. This is the “standard” way which you may know from the basic economics courses: There are households and firms in the model. The households provide labour and savings to the firms and firms provide consumer goods to the households. Transactions are made on labour, capital and consumption goods markets. This is the case which we are analyzing in this article.

We could use a different definition. The household can perform the functions of the firm: it can employ adult members of the family as workers and consume the produced goods. The savings of the household are used as capital.

We could also assume that the economy contains an element which is called a benevolent social planner. The social planner has no connection to socialism, communism or any other totalitarian regime. In DSGE models, the social planner is only a formal assumption which makes the solution of the model easier. The solution of the model is exactly the same for both versions. The social planner dictates the choices of consumption to maximize the household utility. This is why we call the planner benevolent. It’s only desire is the household’s welfare.

## Running Simple DSGE Model in Dynare III – Further Analysis

Last time we analyzed the steady-state of our model. We have developed equations which we can use to calculate the steady-state values for given parameters values. Today, we use these equations to see how could changes in parameters values affect the variables values. We can use the Octave (or Matlab) script which we developed last time. We just do minor updates. We select one variable and we assign a range of value instead of single value to this variable.

Let’s take parameter $\psi$. We would expect that lower values of this parameter would mean that the household would work more and also consume more because its willingness to work would increase. Let’s test our theory. We will examine an interval between 1.0 and 1.8. We will ask Octave to generate a vector of values between these two boundaries. We will to it by this command:

psi=1.0:0.001:1.8;

The value in the middle sets a size of space between these two values. In fact, this values defines the size of the vector. The value 0.001 is small enough to provide us a smooth plot. We also substitute all *, / and ^ operators with .*, ./ and .^. The standard operators without dots are used to operations with two numbers, two vectors or two matrices. But in our case, we want to multiply (or divide or power) all values of the vector by a single value. This is completely different operation than multiplying two vectors or two matrices. That’s why we use the operators with dots.

## Running simple DSGE model in Dynare

Dynare is quite sophisticated software for economic simulation. It is mainly used for estimating of Dynamic Stochastic General Equilibrium Models (DSGE models). DSGE models are considered as the state-of-the-art of economic simulations and predictions and they are used by plenty of central banks and ministries of finance all over the world.

You can find a lot of articles about DSGE models on the internet. Most of them are really sophisticated, however, they are usually written for people with good knowledge of mathematical optimization and RBC models theory. I would like to write this article as Dynare tutorial for people with limited knowledge of both economic models and mathematical optimization.