Home

Awesome

DynareOBC: A toolkit for handling occasionally binding constraints with Dynare, by Tom Holden.

Note: DynareOBC currently only has limited support for Dynare 4.6.x. MLV simulation is not supported under Dynare 4.6.x and there may be other problems. I recommend sticking with Dynare 4.5.x for now.

Background

Please read the theory paper from here: https://github.com/tholden/dynareOBC/raw/master/TheoryPaperBody.pdf (Or here for citations: https://ideas.repec.org/p/zbw/esprep/130142.html )

And the computational paper from here: https://github.com/tholden/dynareOBC/raw/master/ComputationalPaper.pdf (Or here for citations: https://ideas.repec.org/p/zbw/esprep/130143.html )

A paper documenting the estimation procedure is available from here: https://github.com/tholden/EST-NLSS/raw/master/EstimationPaper.pdf (Or here for citations: http://dx.doi.org/10.5281/zenodo.50127 )

The code itself may be cited via the following DOI: http://dx.doi.org/10.5281/zenodo.50132

Alternatively, read the technical slides from here: https://github.com/tholden/dynareOBC/raw/master/TechnicalSlides.pdf

Or the non-technical slides from here: https://github.com/tholden/dynareOBC/raw/master/NonTechnicalSlides.pdf

Or the course slides from here: https://github.com/tholden/dynareOBC/raw/master/CourseSlides.pdf

Installation

  1. Download the latest release from: https://github.com/tholden/dynareOBC/releases
  2. Extract the release to a directory on a local drive.
  3. Make sure your MATLAB path does not contain any Dynare folders other than the matlab sub-folder of your Dynare install. You should never click "add with subfolders" when adding Dynare to your MATLAB path, else Dynare will perform poorly, and DynareOBC will not work at all.
  4. Add just the folder containing dynareOBC.m to your MATLAB path. Do not click with add-with subfolders!
  5. Relax, as DynareOBC updates itself and its dependencies each time it is run.

Requirements

Requirements (to be installed and added to your Matlab path):

Recommended additional installations:

Additional requirements for people using Windows, without administrative rights

If you are using Windows, and you do not have administrative rights on your own computer, you need to ask your system administrator to download and install the following standard redistributable packages, which provide system libraries used by code compiled with either Microsoft Visual C++, the Intel C Compiler, or the Intel Fortran Compiler.

If you are using a 64-bit version of MATLAB, please ask for the following to be installed:

If you are using a 32-bit version of MATLAB, please ask for the following to be installed:

Troubleshooting

If you have any strange errors, first try these steps:

  1. Delete all .mat files from the DynareOBC directory.
  2. Delete all .mex??? files from the Core sub-directory of your DynareOBC install (but not from its sub-directories).
  3. Delete your DynareOBC directory, and then go through the installation steps above again.

If after doing this, you suspect a bug, report it here: https://github.com/tholden/dynareOBC/issues

Basic Usage

Usage: dynareOBC FILENAME[.mod,.dyn] [OPTIONS]

DynareOBC executes instruction included in the conventional dynare mod file, FILENAME.mod.

Unlike dynare, DynareOBC can handle simulation of models containing non-differentiable functions. Note:

OPTIONS (NOT CASE SENSITIVE!) include:

See the Dynare reference manual for other available options.

Supported options inside the .mod file

Note that DynareOBC only supports some of the options of stoch_simul, and no warning is generated if it is used with an unsupported option. Currently supported options for stoch_simul are:

DynareOBC also supports a list of variables for simulation after the call to stoch_simul. When MLVSimulationMode>0, this list can include the names of model local variables. Any MLV included in this list will be simulated even if it does not meet the previous criteria.

Advanced Usage

Alternative usage: dynareOBC [AddPath|RmPath|TestSolvers] [OPTIONS]

Acknowledgements and copyright information

DynareOBC incorporates code:

Additionally, DynareOBC automatically downloads:

The original portions of DynareOBC are copyright (c) Tom Holden, 2016-2017.

DynareOBC is released under the GNU GPL, version 3.0 or later, available from https://www.gnu.org/copyleft/gpl.html

DynareOBC 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.

DynareOBC 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 dynareOBC. If not, see http://www.gnu.org/licenses/.