DynareWiki

We want to build a database of example MOD files, with the following objectives:

Here is a check list for every MOD file to be included in the database:

Sources

There already exist a lot of MOD files available on the web. The three main sources are:

Some of these files are not working with Dynare 4, others are not documented, others have no explicit copyright/license. The first step of the project would be to go through all these existing MOD files, fix these issues, and when possible include them in the database.

The second step of the project would be to create MOD files from scratch for models that are described in famous academic papers, and for which there is currently no implementation. When possible, the MOD file should replicate the results of the papers. A list of such papers follows:

[TO BE COMPLETED]

Copyright and license issues

In order to redistribute our database of examples with Dynare, some legal conditions need to be met. The MOD files need either to be in the public domain, or, if they are copyrighted, they must be licensed under a free license.

The copyright holder is the person who "owns" the piece of code. If is generally the person or the group of people who wrote the code. See this for more information.

For MOD files written by members of the Dynare team, the copyright holder will be "Dynare Team".

For MOD files written by other people, there are three options:

Note that, when the MOD file implements a model described in a paper, then the copyright holder is not the author of paper: it is the person who wrote the MOD file. Similarly, when somebody implements an algorithm described by a research paper, the copyright holder of the code is the programmer, not the researcher. Nevertheless, it is important that the research paper is cited in the MOD file, both for courtesy and for clarity.

License

If the MOD file is in the public domain, there is no need to state the license under which the MOD file is redistributed, because there is no usage restriction on the file. There should only be a comment such as: "This file is in the public domain. Author: ...".

If the MOD file is copyrighted, then it is necessary to state the licensing terms. Our preferred free license is the GNU General Public License (GPL), version 3. Other free licenses are listed there.

By default, when the author has given no explicit license in the MOD file, then no usage of the MOD file is authorized without permission. It is therefore necessary in those case to contact the author and kindly ask her if she is willing to give up its copyright to Dynare Team, or at least to distribute her file under the GPL.

Example

Here is what a MOD file copyrighted by Dynare Team could look like:

/*
 * A very basic RBC model, simulated in a deterministic setup.
 * Reference: Villemot & al. (2009), "My first DSGE model", Journal of Stupid Economics, vol. 1, pp. 111-116
 */

/*
 * Copyright (C) 2009 Dynare Team
 *
 * This file is part of Dynare.
 *
 * Dynare is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Dynare is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 */

var c k;
varexo x;

parameters alph gam delt bet aa;
alph=0.5;
gam=0.5;
delt=0.02;
bet=0.05;
aa=0.5;

model;
c + k - aa*x*k(-1)^alph - (1-delt)*k(-1);
c^(-gam) - (1+bet)^(-1)*(aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam);
end;

initval;
x = 1;
k = ((delt+bet)/(1.0*aa*alph))^(1/(alph-1));
c = aa*k^alph-delt*k;
end;

steady;

check;

shocks;
var x;
periods 1;
values 1.2;
end;

simul(periods=200);

rplot c;
rplot k;

DynareWiki: ExamplesDatabase (last edited 2010-02-01 14:52:21 by SébastienVillemot)