Skip to content

Extending the Dolo or Dynare languages

npalmer edited this page Jan 21, 2015 · 1 revision

Extending the Dolo or Dynare languages

Dynare models are described in text files, that list all equations of the model, as well as the according paramater values. This has proven extremely useful to separate the model design from the implementation of its solution.

Inspired by these approach, dolo uses simple yaml files to represent models that can be solved on a small state-space. Several types of models can be solved with different characteristics (discrete states/continuous states, etc.). The up-to-date classification is available here. A given type of model contains several types of equations (transition and transition equations for instance). See for example the rbc model.

The open question is whether an heterogeneous agents model can be described generically by a small number of equation types. For instance there can be equations for the individual optimization program and some others for the aggregate equilibrium equations. If a general enough description can be found (in other words a model API), then it becomes easy to extend the yaml descriptions to a broader class of models and possibly to reuse dolo's compiler logic.

The important part here is really the model definition. Once we have it, it could as well be implemented by extending Dynare's language to allow for other types of blocks in addition to the model one.

Here are some mock examples of what a yaml file for heterogeneous agents could look like. They are inspired by current Dolo syntax that is comparatively easier to extend. All following examples consist in an agent problem and in another file containing the market equilibrium.

General comments:

A heterogeneous agents model consists in:

  • description of heterogeneity
    • idiosyncratic shocks
    • heterogeneous parameters
    • population dynamics (entry, exit, exogenous or endogenous)
  • individual choice problems of the DTCSCC sort
    • a way to solve it
  • central market conditions
    • need new syntax for indexed variables
    • agregators ?
  • solution assumption:
    • invariant equilibrium
    • bounded rationality to limit the size of the state space

A question that was discussed during the meeting was how to deal with OLG models or with models involving discrete choices. It looks like both would involve agents switching between categories and as a result some kind of transition of agents between groups, which requires extra-thought. In the former case, it is possible to consider the age of an individual as an idiosyncratic state, in which case each always always remains of the same type.