# Pruning implementation for Dynare 4.0.4?

**URL:** <https://forum.dynare.org/t/pruning-implementation-for-dynare-4-0-4/1096>\
**Category:** Dynare help (legacy posts)\
**Created:** [2 July 2009 21:28 UTC](https://forum.dynare.org/t/pruning-implementation-for-dynare-4-0-4/1096 "2009-07-02T21:28:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidamdur](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/9de053/32.png) [@davidamdur](https://forum.dynare.org/u/davidamdur)\
**Post date:** [2 July 2009 21:28 UTC](https://forum.dynare.org/t/pruning-implementation-for-dynare-4-0-4/1096/1 "2009-07-02T21:28:45Z")

</div>

Does anyone have (or know of) an implementation of Chris Sims’ pruning algorithm that runs in Dynare 4.0.4? I’m interested in a modification of simult\_.m along these lines:

> [@Pruning algorithm for second order approximation](https://forum.dynare.org/t/pruning-algorithm-for-second-order-approximation/632/1):
>
> 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: Download the simult\_pruning.m file in the attachment to the Dynare directory, generally under …\dynare\_v3…

The above implementation was for 3.065 but doesn’t seem to run in 4.0.4. Any pointers appreciated.

Thanks,  
Dave

---

<div class="post-metadata">

**Author:** ![sfahr](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@sfahr](https://forum.dynare.org/u/sfahr)\
**Post date:** [6 July 2009 18:27 UTC](https://forum.dynare.org/t/pruning-implementation-for-dynare-4-0-4/1096/2 "2009-07-06T18:27:55Z")

</div>

Hi Dave,  
pleas try the attached file. Hopefully it works. Please let me know if it works.  
Stephan  
[simult\_pruning4.m](https://forum.dynare.org/uploads/default/original/1X/92f563420742b6290954504195ae87db686b647f.m) (4.84 KB)

---

<div class="post-metadata">

**Author:** ![davidamdur](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/9de053/32.png) [@davidamdur](https://forum.dynare.org/u/davidamdur)\
**Post date:** [7 July 2009 14:55 UTC](https://forum.dynare.org/t/pruning-implementation-for-dynare-4-0-4/1096/3 "2009-07-07T14:55:24Z")

</div>

This worked beautifully. I counter-checked my results with and without pruning as you described in your earlier post, and they are similar for small shocks. For larger shocks, pruning lets me produce stable IRFs. Very very helpful. Thanks so much!

Dave
