Pruning algorithm for second order approximation

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Pruning algorithm for second order approximation

Postby sfahr » Tue Apr 01, 2008 9:37 am

Dear all,
due to the ongoing difficulties with explosive simulations with second order approximations, I introduced the option for the pruning algorithm in Dynare 3.065 described in Kim, Kim, Schaumburg and Sims (2005): "Calculating and using second order accurate solutions of discrete time dynamic equilibrium models"

In order to use it correctly under Windows, please proceed as follows:
1. Download the simult_pruning.m file in the attachment to the Dynare directory, generally under ..\dynare_v3\matlab.
2. Rename the file simult_.m to simult_old.m
3. Rename the file simult_pruning.m to simult_.m
4. Just before the stoch_simul() command within your Dynare model file *.mod add the line

Code: Select all
options_.pruning=1;


If you want to compare to the standard simulation just take out the line or set options_.pruning=0;
5. Enjoy the simulation results

Just to let you know how the last lines of a mod-file might look like:
Code: Select all
model;
...
end;

initval;
...
end;

steady;

shocks;
var e_x=std_x^2;
end;

options_.pruning=1;
stoch_simul(irf=15, replic=100)y c w k;


A word of caution: Obviously, it is not assured that the new version of simult_.m is bug free, though Michel had a look at it. Counter check your results! This may be done by using smaller shocks and comparing the results with and without pruning. They should be similar. In addition, pruning is often necessary due to large shocks, which implies that even a second-order approximation may be not good enough and results may be inaccurate due to the distance from steady state.

Any further suggestions or found errors, please post on this forum.
Stephan
Attachments
simult_pruning.m
(2.84 KiB) Downloaded 473 times
sfahr
 
Posts: 4
Joined: Thu Nov 15, 2007 9:29 am

Re: Pruning algorithm for second order approximation

Postby macroguy » Wed Dec 22, 2010 1:43 am

"use it correctly under Windows". Any suggestions for Mac users?
macroguy
 
Posts: 4
Joined: Mon Oct 25, 2010 1:44 am

Re: Pruning algorithm for second order approximation

Postby SébastienVillemot » Tue Jan 11, 2011 11:53 am

Pruning is now implemented in Dynare unstable version, and will be included in the upcoming 4.2 release.

See http://www.dynare.org/DynareWiki/NewFeatures
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare contributions and examples

Who is online

Users browsing this forum: No registered users and 5 guests