# Gertler&Karadi (2011) credit policy implementation

**URL:** <https://forum.dynare.org/t/gertler-karadi-2011-credit-policy-implementation/6222>\
**Category:** Replication Attempts\
**Created:** [20 May 2017 10:58 UTC](https://forum.dynare.org/t/gertler-karadi-2011-credit-policy-implementation/6222 "2017-05-20T10:58:14Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keynesian94](https://forum.dynare.org/letter_avatar_proxy/v4/letter/k/f4b2a3/32.png) [@Keynesian94](https://forum.dynare.org/u/Keynesian94)\
**Post date:** [20 May 2017 10:58 UTC](https://forum.dynare.org/t/gertler-karadi-2011-credit-policy-implementation/6222/1 "2017-05-20T10:58:14Z")

</div>

Hi,  
I’m relatively new to dynare, so I was hoping to get some help from this forum.  
I’m currently implementing a countercyclical capital requirement into Gertler & Karadi (2011). I downloaded the mod file from the macro model database, but I can’t get the credit policy to run inside dynare.

EDIT: I’ve just tried running it using the Model Database procedure (in which you can select the model, shocks etc.)  
The problem is that I HAVE to choose a monetary policy rule, and theirs is not on the list.  
Eventually, I want to change some of the equations of the model, and see how the results are different between a situation WITH and WITHOUT the credit policy. Any suggestions?  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![federico](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/c2a13f/32.png) [@federico](https://forum.dynare.org/u/federico)\
**Post date:** [22 May 2017 12:29 UTC](https://forum.dynare.org/t/gertler-karadi-2011-credit-policy-implementation/6222/2 "2017-05-22T12:29:01Z")

</div>

Hi,

In Peter Keradi’s website you can find their original code.

Hope it helps

Federico

---

<div class="post-metadata">

**Author:** ![Keynesian94](https://forum.dynare.org/letter_avatar_proxy/v4/letter/k/f4b2a3/32.png) [@Keynesian94](https://forum.dynare.org/u/Keynesian94)\
**Post date:** [22 May 2017 12:39 UTC](https://forum.dynare.org/t/gertler-karadi-2011-credit-policy-implementation/6222/3 "2017-05-22T12:39:59Z")

</div>

Thanks for your reply!  
I also tried to work with their code. My problem is that ‘‘content’’ is there, but the .mod files are empty.  
I do not understand how to run the code from the different files (which are .m files, like DSGE\_SteadyState.m)  
I guess I have to combine them somehow?

---

<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:** [22 May 2017 15:46 UTC](https://forum.dynare.org/t/gertler-karadi-2011-credit-policy-implementation/6222/4 "2017-05-22T15:46:15Z")

</div>

Have you looked into the replication folder of the MMB?

---

<div class="post-metadata">

**Author:** ![federico](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/c2a13f/32.png) [@federico](https://forum.dynare.org/u/federico)\
**Post date:** [22 May 2017 16:47 UTC](https://forum.dynare.org/t/gertler-karadi-2011-credit-policy-implementation/6222/5 "2017-05-22T16:47:18Z")

</div>

If I remember correctly, there is a folder  
called “dynare” that contains the files that you need.

Otherwise there are several matlab function (mainly FA\_func and FA\_main) that should  
create the dynare file that you need.

---

<div class="post-metadata">

**Author:** ![Keynesian94](https://forum.dynare.org/letter_avatar_proxy/v4/letter/k/f4b2a3/32.png) [@Keynesian94](https://forum.dynare.org/u/Keynesian94)\
**Post date:** [24 May 2017 13:28 UTC](https://forum.dynare.org/t/gertler-karadi-2011-credit-policy-implementation/6222/6 "2017-05-24T13:28:07Z")

</div>

Thanks! I figured it out.  
Indeed, the FA\_Main file contains the elements to run it, I just hadn’t figured out that you should _run_ it in matlab instead of dynare.

---

<div class="post-metadata">

**Author:** ![cmarch](https://forum.dynare.org/user_avatar/forum.dynare.org/cmarch/32/7827_2.png) [@cmarch](https://forum.dynare.org/u/cmarch)\
**Post date:** [11 May 2019 17:17 UTC](https://forum.dynare.org/t/gertler-karadi-2011-credit-policy-implementation/6222/7 "2019-05-11T17:17:48Z")

</div>

Good evening,

Unfortunately, it seems embarassingly difficult to find out any full derivation of the pricing block in Gertler and Karadi “A Model of Unconventional Monetary Policy” (2011). I am writing a model with a very similar pricing block as theirs, namely competitive wholesale sector - monopolistic retail sector, nonlinearised, i.e. with recursive auxiliary pricing variables, price dispersion and the like.  
They appear to be very hard to find, since the monopolistic wholesale-competitive retail is far more common. I have implemented the Gertler and Karadi pricing block and it appears to work, yet I would like to look into the equations more in depth. I have tried to contact the authors, in vain, though.  
Do you happen to know derivations for this kind of setup?

---

<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:** [11 May 2019 18:32 UTC](https://forum.dynare.org/t/gertler-karadi-2011-credit-policy-implementation/6222/8 "2019-05-11T18:32:14Z")

</div>

No, unfortunately I am not aware of anything like this.

---

<div class="post-metadata">

**Author:** ![cmarch](https://forum.dynare.org/user_avatar/forum.dynare.org/cmarch/32/7827_2.png) [@cmarch](https://forum.dynare.org/u/cmarch)\
**Post date:** [11 May 2019 19:27 UTC](https://forum.dynare.org/t/gertler-karadi-2011-credit-policy-implementation/6222/9 "2019-05-11T19:27:52Z")

</div>

Thanks anyway! I will keep searching 🙂

---

<div class="post-metadata">

**Author:** ![Robert](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.dynare.org/u/Robert)\
**Post date:** [27 March 2023 13:41 UTC](https://forum.dynare.org/t/gertler-karadi-2011-credit-policy-implementation/6222/10 "2023-03-27T13:41:05Z")

</div>

Hi @cmarch, I am currently trying to make sense of the pricing conditions (model/code) of the same Gertler Karadi (2011) framework for the wholesale sector (i.e. retail output). Can you guide me into a certain direction to derive the necessary pricing conditions? I have a feeling I might have write a separate post, but this would already help me massively. Thanks!  
Rob

---

<div class="post-metadata">

**Author:** ![cmarch](https://forum.dynare.org/user_avatar/forum.dynare.org/cmarch/32/7827_2.png) [@cmarch](https://forum.dynare.org/u/cmarch)\
**Post date:** [27 March 2023 14:30 UTC](https://forum.dynare.org/t/gertler-karadi-2011-credit-policy-implementation/6222/11 "2023-03-27T14:30:01Z")

</div>

Hi Robert,

I suggest you have a look at Appendix B here

[Jaqi\_Li\_Banking\_DSGE.pdf](https://forum.dynare.org/uploads/short-url/v15GfEeektnDGBtUq1VBxejEl6M.pdf) (693.9 KB)

It arguably contains the most detailed step-by-step derivation.

---

<div class="post-metadata">

**Author:** ![Robert](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.dynare.org/u/Robert)\
**Post date:** [27 March 2023 16:09 UTC](https://forum.dynare.org/t/gertler-karadi-2011-credit-policy-implementation/6222/12 "2023-03-27T16:09:56Z")

</div>

Thanks Camilo, I will give it a go! At the moment I am a bit lost, where all the conditions come from. Hopefully, the document you sent me will clear things up. Thanks.
