# HELP for “A Macroeconomic Model with Financial Panics” code

**URL:** <https://forum.dynare.org/t/help-for-a-macroeconomic-model-with-financial-panics-code/13378>\
**Category:** Replication Attempts\
**Created:** [8 March 2019 11:18 UTC](https://forum.dynare.org/t/help-for-a-macroeconomic-model-with-financial-panics-code/13378 "2019-03-08T11:18:05Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![swift](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@swift](https://forum.dynare.org/u/swift)\
**Post date:** [8 March 2019 11:18 UTC](https://forum.dynare.org/t/help-for-a-macroeconomic-model-with-financial-panics-code/13378/1 "2019-03-08T11:18:05Z")

</div>

NBER working paper “A Macroeconomic Model with Financial Panics” by Gertler M., Kiyotaki N. &Prestipino A. I can’t find code of the peper above, could anyone send me the code and data? Thank u.

---

<div class="post-metadata">

**Author:** ![mo123](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/ba9def/32.png) [@mo123](https://forum.dynare.org/u/mo123)\
**Post date:** [8 March 2019 12:44 UTC](https://forum.dynare.org/t/help-for-a-macroeconomic-model-with-financial-panics-code/13378/2 "2019-03-08T12:44:50Z")

</div>

This paper is forthcoming in RESTUD, which requires authors to make their code public, so the original code should be available sooner or later. Note that they solve the model using time iteration, so Dynare won’t be able to handle this.

---

<div class="post-metadata">

**Author:** ![swift](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@swift](https://forum.dynare.org/u/swift)\
**Post date:** [10 March 2019 12:21 UTC](https://forum.dynare.org/t/help-for-a-macroeconomic-model-with-financial-panics-code/13378/4 "2019-03-10T12:21:45Z")

</div>

Got. Thank you. That’s very helpful.

---

<div class="post-metadata">

**Author:** ![amyzhangmin](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/a6a055/32.png) [@amyzhangmin](https://forum.dynare.org/u/amyzhangmin)\
**Post date:** [17 June 2021 07:04 UTC](https://forum.dynare.org/t/help-for-a-macroeconomic-model-with-financial-panics-code/13378/5 "2021-06-17T07:04:50Z")

</div>

did you get the code? I am also attempting to replicate their model, can you share it with me?

---

<div class="post-metadata">

**Author:** ![amyzhangmin](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/a6a055/32.png) [@amyzhangmin](https://forum.dynare.org/u/amyzhangmin)\
**Post date:** [17 June 2021 07:07 UTC](https://forum.dynare.org/t/help-for-a-macroeconomic-model-with-financial-panics-code/13378/6 "2021-06-17T07:07:38Z")

</div>

Their paper has published at RES for long, but I still cannot find the replication code in either their websites or res website

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [17 June 2021 07:48 UTC](https://forum.dynare.org/t/help-for-a-macroeconomic-model-with-financial-panics-code/13378/7 "2021-06-17T07:48:14Z")

</div>

In this case, you may have to ask the journal.

---

<div class="post-metadata">

**Author:** ![Aldo](https://forum.dynare.org/user_avatar/forum.dynare.org/aldo/32/5490_2.png) [@Aldo](https://forum.dynare.org/u/Aldo)\
**Post date:** [20 June 2021 18:59 UTC](https://forum.dynare.org/t/help-for-a-macroeconomic-model-with-financial-panics-code/13378/8 "2021-06-20T18:59:34Z")

</div>

Hello

On Andrea Prestipino’s website there is a link to Replication Codes of “A Macroeconomic Model with Financial Panics”

[http://andreaprestipino.com/research.html](http://andreaprestipino.com/research.html)

Good luck

---

<div class="post-metadata">

**Author:** ![Bandel](https://forum.dynare.org/letter_avatar_proxy/v4/letter/b/6de8d8/32.png) [@Bandel](https://forum.dynare.org/u/Bandel)\
**Post date:** [2 February 2023 11:24 UTC](https://forum.dynare.org/t/help-for-a-macroeconomic-model-with-financial-panics-code/13378/9 "2023-02-02T11:24:52Z")

</div>

The codes have been deleted.Has anyone saved it before, can you share it？

---

<div class="post-metadata">

**Author:** ![Bandel](https://forum.dynare.org/letter_avatar_proxy/v4/letter/b/6de8d8/32.png) [@Bandel](https://forum.dynare.org/u/Bandel)\
**Post date:** [2 February 2023 11:27 UTC](https://forum.dynare.org/t/help-for-a-macroeconomic-model-with-financial-panics-code/13378/10 "2023-02-02T11:27:51Z")

</div>

HI，Did you find the code for this paper,could you please share me?

---

<div class="post-metadata">

**Author:** ![mhesam\_ahmdn](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/ac8455/32.png) [@mhesam\_ahmdn](https://forum.dynare.org/u/mhesam_ahmdn)\
**Post date:** [3 February 2023 00:16 UTC](https://forum.dynare.org/t/help-for-a-macroeconomic-model-with-financial-panics-code/13378/11 "2023-02-03T00:16:26Z")

</div>

Thank you for your answer. Do you know of an available tutorial for time iteration methods and/or other methods of solving dsge models that don’t do approximations like linearization around steady state? I have completed a quantitative economics course and studied value function iteration, time iteration method and other similair ones (based on julia quantecon) but havent ever seen an example of a large dsge model being solved using those methods to understand how it workd on large models so i have been stuck to the log-linearization around steady state method. If you have any tutorial/example you can link me to I will very much appreciate it.  
Also do these methods take much more time to implement than the typical dynare implementation for the typical dsge models use in papers? If no, why dont all the abled economics PhD students or the professors only use methods that do not approximate? What are the limitations?

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [5 February 2023 19:49 UTC](https://forum.dynare.org/t/help-for-a-macroeconomic-model-with-financial-panics-code/13378/12 "2023-02-05T19:49:06Z")

</div>

These global methods suffer from a curse of dimensionality with respect to the state variables. Large models are close to impossible to solve with global techniques in finite time. Think about discretizing the state space: take 1000 points for capital, 1000 for debt, 5 for TFP and 5 for the exogenous interest rate and you already have `1000*1000*5*5=25000000` points.

---

<div class="post-metadata">

**Author:** ![mhesam\_ahmdn](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/ac8455/32.png) [@mhesam\_ahmdn](https://forum.dynare.org/u/mhesam_ahmdn)\
**Post date:** [7 February 2023 07:48 UTC](https://forum.dynare.org/t/help-for-a-macroeconomic-model-with-financial-panics-code/13378/13 "2023-02-07T07:48:48Z")

</div>

Thank you for your answer.

---

<div class="post-metadata">

**Author:** ![TOMX](https://forum.dynare.org/letter_avatar_proxy/v4/letter/t/97f17d/32.png) [@TOMX](https://forum.dynare.org/u/TOMX)\
**Post date:** [7 April 2025 14:14 UTC](https://forum.dynare.org/t/help-for-a-macroeconomic-model-with-financial-panics-code/13378/14 "2025-04-07T14:14:01Z")

</div>

I think this replication package will still be needed. It is on Dr.Prestipino personal google homepage.

> **[ANDREA PRESTIPINO - Research](https://sites.google.com/andreaprestipino.com/andreaprestipino/research)**
>
> Publications
