# Vlcek/Roger (2011) model

**URL:** <https://forum.dynare.org/t/vlcek-roger-2011-model/3052>\
**Category:** Dynare help (legacy posts)\
**Created:** [2 April 2013 10:39 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052 "2013-04-02T10:39:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![somekindofgrinder](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/ac91a4/32.png) [@somekindofgrinder](https://forum.dynare.org/u/somekindofgrinder)\
**Post date:** [2 April 2013 10:39 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/1 "2013-04-02T10:39:53Z")

</div>

Good evening everybody.  
I am looking for the code of the model described in the paper of Vlcek/Roger (2011) (“Macroeconomic Costs of Higher Bank Capital and Liquidity Requirements”) in Dynare.  
I am requesting this code in order to locate the exact expressions of the framework. More specifically,I have the Dynare code of the Gerali et al (2010) model and I am looking to augment it with the extra equations describing government consumption,liquidity and bond riskiness and then find the steady state.  
I have made an effort myself,but the addition of the extra equations and parameters has moved the steady state far from the Gerali model steady state.  
If it is helpful,I will both versions of the codes later in the day,so hopefully one can tell me what can be done (apart from checking the residuals of the equations-I have done that already and tried changing some of the calibrated parameters but residuals do not drop and convergence does not occur).

Desperately looking to hearing from you!

---

<div class="post-metadata">

**Author:** ![somekindofgrinder](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/ac91a4/32.png) [@somekindofgrinder](https://forum.dynare.org/u/somekindofgrinder)\
**Post date:** [15 April 2013 19:17 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/2 "2013-04-15T19:17:07Z")

</div>

Ok,so its time I shared a bit of my code. Hopefully someone will have an idea of what is going wrong.

I now try to build the Vlcek/Roger model through the Gerali framework starting by simply adding a liquidity parameter to no more than 3-4 equations.  
I then set the liquidity parameter to zero. Obviously this means that since all other parameters are the same,both models are the same and both models should converge.  
However,this does not occur with the liquidity variant!!! (The pure Gerali model runs no matter the residuals).  
Can someone please share a bit of his knowledge on the subject?

Thank you in advance.  
[GNSS\_BK\_Basel\_II\_VR\_variant.mod](https://forum.dynare.org/uploads/default/original/2X/a/ab329cc4a86b71708d95e32b258fa96c7f520cdf.mod) (27.7 KB)  
[GNSS\_BK\_Basel\_II\_martios.mod](https://forum.dynare.org/uploads/default/original/2X/b/bb55b516ff80ce7315b4f692d00f1553fb5579a7.mod) (26.9 KB)

---

<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:** [16 April 2013 09:34 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/3 "2013-04-16T09:34:43Z")

</div>

Hi,  
I know very well both Gerali and Vlceck/Roger model.  
I dowload the two files in attachment see if i can help.  
I very busy right now (like everyone else of course) so i can’t promise anythings .

---

<div class="post-metadata">

**Author:** ![somekindofgrinder](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/ac91a4/32.png) [@somekindofgrinder](https://forum.dynare.org/u/somekindofgrinder)\
**Post date:** [25 April 2013 10:07 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/4 "2013-04-25T10:07:44Z")

</div>

Good morning to you all.  
My question is not going to be a strictly technical one (it might need a bit of macro insight).  
So,I finally created a version resembling the Vlcek/Roger model from the Gerali model posted above that converges without problems (thanks to federico!)  
Not all is going well though.  
First of all,the increase of the liquidity ratio in the model (eta) results in an increase of the interest ratio spread (spr\_b)and the economy’s output (y1),which contradicts the original Gerali model (and the corresponding bibliography).  
Second, the theoretical standard deviation of the output also increases when the capital ratio (vb\_ss) and/or the liquidity ratio increases ,which also does not occur in the original Gerali model.

The models are calibrated as closely as possible.  
Any ideas about why this happens?  
I would be grateful if someone could help me solve this and maybe this could prove useful to others wanting to have a similar model for their experiments.  
[GNSS\_P3\_version2.mod](https://forum.dynare.org/uploads/default/original/2X/2/2a306c96df5b5277270b2db6ce39ebf36438f397.mod) (26.6 KB)

---

<div class="post-metadata">

**Author:** ![somekindofgrinder](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/ac91a4/32.png) [@somekindofgrinder](https://forum.dynare.org/u/somekindofgrinder)\
**Post date:** [27 June 2013 09:32 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/5 "2013-06-27T09:32:54Z")

</div>

Greetings to all.

Continuing the work on this model, I would like to ask a further question.  
What is the correct way of modelling the impact of a NEGATIVE shock to the output?  
To proxy this, I simply changed the sign of the most predominant shock to the output (e\_Ae = the output coefficient shock/tech shock) to a negative one.  
However,results of the steady state variables and their volatilities did not change.

So,I guess my method is not correct.  
Any ideas?

---

<div class="post-metadata">

**Author:** ![hrdg](https://forum.dynare.org/letter_avatar_proxy/v4/letter/h/e95f7d/32.png) [@hrdg](https://forum.dynare.org/u/hrdg)\
**Post date:** [27 June 2013 09:51 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/6 "2013-06-27T09:51:28Z")

</div>

hi, your negative shock way sounds OK, can you post your code?

Vlcek/Roger (2011) model:the increase of the liquidity ratio in the model (eta) results in an increase of the economy’s output (y1), have you solved this problem?  
i find some contradictions in Vlcek/Roger (2011) model,  
1.if not funding outside,namely changing the assets portfolio, the increase in Bond should cause the decrease in Loan, but not the exact quantity in the Vlcek/Roger (2011) model  
2.if funding outside, the increase in Bond should cause (or be cause by) the capital and deposite increase, but not the case in the Vlcek/Roger (2011) model,

and the modeling is not working by his formula, in your opinion, what should be done ?

thank your for your code! it’s not easy

---

<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:** [27 June 2013 14:34 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/7 "2013-06-27T14:34:47Z")

</div>

The way in which you model the negative tech shock is fine.  
The fact that the volatilities and the SS are not affect is good too.  
The term e\_ae does not affect the SS and if i understood correctly you do not change the size of the shock.  
The only thing you should see are the IRFs in the opposite direction

---

<div class="post-metadata">

**Author:** ![hrdg](https://forum.dynare.org/letter_avatar_proxy/v4/letter/h/e95f7d/32.png) [@hrdg](https://forum.dynare.org/u/hrdg)\
**Post date:** [4 July 2013 11:57 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/8 "2013-07-04T11:57:09Z")

</div>

hello， exp(K\_b) should be dropped？ or the interest rate should be like (exp(r\_bh) +1)  
/\* Overall activity\*/

exp(j\_b) = + exp(r\_bh) \* exp(b\_h)  
+ exp(r\_be) \* exp(b\_e)  
+ exp(r\_t) \* exp(B)_eta  
- exp(r\_d) \* exp(d\_b)  
- exp(K\_b)- k\_kb/2 \* ( ((exp(K\_b) / (exp(B))) - exp(v\_b) ) ^2) \* exp(K\_b);  
%%% /OVERALL BANK PROFITS/ /_ 268-271 adjustment cost for the bank\*/

---

<div class="post-metadata">

**Author:** ![somekindofgrinder](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/ac91a4/32.png) [@somekindofgrinder](https://forum.dynare.org/u/somekindofgrinder)\
**Post date:** [4 July 2013 22:46 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/9 "2013-07-04T22:46:34Z")

</div>

Indeed both these models are a bummer. The only thing that I can answer you with a great deal of certainty is that the only way to make the output drop when the capital or liquidity increases is finding the correct value for the pi\_share.

Either way,I still have problems with these models myself. Now I cannot raise the vi\_ss from 0,09 to lets say 0,14! It screws the convergence.  
It only works for small incremental changes.  
After a year or so, I think that only the authors could provide reasonable insight-though all papers are obscure and the Vlcek/Roger model was morevoer written in IRISToolbox.

---

<div class="post-metadata">

**Author:** ![hrdg](https://forum.dynare.org/letter_avatar_proxy/v4/letter/h/e95f7d/32.png) [@hrdg](https://forum.dynare.org/u/hrdg)\
**Post date:** [5 July 2013 15:11 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/10 "2013-07-05T15:11:02Z")

</div>

Thank you so much!!  
maybe i can help you with this problem(if my comprehensive is OK ):"Now I cannot raise the vi\_ss from 0,09 to lets say 0,14! It screws the convergence."  
see your PM, i am not sure my way is ok, give me some advice.

---

<div class="post-metadata">

**Author:** ![hrdg](https://forum.dynare.org/letter_avatar_proxy/v4/letter/h/e95f7d/32.png) [@hrdg](https://forum.dynare.org/u/hrdg)\
**Post date:** [13 July 2013 03:40 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/11 "2013-07-13T03:40:13Z")

</div>

i modified your code

```auto
varexo_det eta ;
shocks;
var eta;
periods	1	2	3	4	5	6	7	8 9:60;//1	2	3	4	5	6	7	8 9:60;
values 0.2	0.21	0.22	0.23	0.24	0.25	0.26	0.27 0.27;
end;
```

use y instead of all y1, and delete following lines

```auto
exp(c_i) + 
exp(q_h) * (exp(h_i) - exp(h_i(-1))) + 
( 1 + exp(r_bh(-1))) * exp(b_i(-1)) / exp(pi) = 
exp(w_i) * exp(l_i) + exp(b_i) ; %%%
```

but in oo\_.forecast.Mean, the result is not like roger, can you help?

---

<div class="post-metadata">

**Author:** ![rickardo](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/9e8a1a/32.png) [@rickardo](https://forum.dynare.org/u/rickardo)\
**Post date:** [15 July 2013 13:30 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/12 "2013-07-15T13:30:24Z")

</div>

Hi all,

I apologize if these few questions appear overly simplistic

I am in the process of running the Gerali (2010) model - and have derived all equations, however I find some differences between the code posted on here and what I have.

Is it possible to gain clarification around

1: why in both the patient and impatient households, the shocks are multiplied by a parameter J (0.203) - as I saw no reference to this in the paper itself.  
2: exp(y1) or the variable y1 seems to be a modified version of y - is this supposed to be a Steady State value of y or something else?  
3. lastly - some variables in the steady state seem to be provided that are not particularly mentioned in the paper - such as r\_d\_ss, r\_t\_ss - where do these equations come from?

Thank you for the help!

---

<div class="post-metadata">

**Author:** ![somekindofgrinder](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/ac91a4/32.png) [@somekindofgrinder](https://forum.dynare.org/u/somekindofgrinder)\
**Post date:** [15 July 2013 16:05 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/13 "2013-07-15T16:05:15Z")

</div>

Good evening.  
I have to note that this is not the default Gerali calibration.  
J is the housing parameter,which affects qh=housing wealth.  
y1 is the intermediate output. You may also find it as y\_e=enterpreneurial output  
r\_d\_ss and r\_t\_ss are steady state values of the deposit and the policy rate,respectively.  
You can calculate them by modifying the respective markups .

---

<div class="post-metadata">

**Author:** ![rickardo](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/9e8a1a/32.png) [@rickardo](https://forum.dynare.org/u/rickardo)\
**Post date:** [19 September 2013 12:22 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/14 "2013-09-19T12:22:38Z")

</div>

Hi all,

I was just wondering if anyone has been able to replicate that IRFs in Gerali following a financial (negative capital) shock?

I have played around with the code however are there any major adjustments that must be made besides including the shock into the Bank liabilities?

---

<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:** [19 September 2013 15:22 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/15 "2013-09-19T15:22:18Z")

</div>

At page 135 of Gerali’s paper in the footnote they say

“We modify the model introducing, in the corresponding accumulation equation, the possibility of  
an unexpected contraction in bank capital Kb\_t . The persistence of the shock is 0.95; the other parameters  
are set at the median of their posterior distribution.”

Basicly you have to modify bank capital accumulation equation in this way

K^(b)_t = (1 - delta\_b)\* epsilon\_kb\*K^(b)_(t-1) + j^(b)\_(t-1)

---

<div class="post-metadata">

**Author:** ![rickardo](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/9e8a1a/32.png) [@rickardo](https://forum.dynare.org/u/rickardo)\
**Post date:** [20 September 2013 04:02 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/16 "2013-09-20T04:02:36Z")

</div>

Oh I see, thank you so much!

Should there also be the shock on the liabilities side of the Bank balance sheet? that is

exp(b\_h) + exp(b\_e) + eps\_K\_b = exp(d\_b) + exp(K\_b) ;

I have found all the other impulses to match the Gerali model, however for some reason am finding a positive output shock

---

<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:** [20 September 2013 07:24 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/17 "2013-09-20T07:24:28Z")

</div>

Ths shock on the balance sheet is used by the authors when they estimated the model .  
Its presence seems to improve a lot the estimation (try by yourself).  
But when they simulate the negative capital banking shock they simulate the model using the calibrated parameters at the posterior mean and then they include  
a capital shock like my previous post

Hope it helps

---

<div class="post-metadata">

**Author:** ![Ale\_e\_Andre](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/e47774/32.png) [@Ale\_e\_Andre](https://forum.dynare.org/u/Ale_e_Andre)\
**Post date:** [23 September 2013 17:37 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/18 "2013-09-23T17:37:52Z")

</div>

Hi everybody.  
I am trying to modify the Gerali’s paper by introducing an SPV involved in a securitization process. I used the same approach of the paper.  
I slightly modified the program “GNSS\_P3\_version2.mod” posted by somekindofgrinder, but after running Dynare I have this error:

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached  
Error in computing likelihood for initial parameter values  
??? Error using ==\> print\_info at 57  
Impossible to find the steady state. Either the model doesn’t have a  
steady state, there are an infinity of steady states, or the guess values  
are too far from the solution

Error in ==\> initial\_estimation\_checks at 69  
print\_info(info, DynareOptions.noprint)

Error in ==\> dynare\_estimation\_1 at 169  
oo\_ =  
initial\_estimation\_checks(objective\_function,xparam1,dataset\_,M\_,estim\_params\_,options\_,bayestopt\_,oo\_);

Error in ==\> dynare\_estimation at 70  
dynare\_estimation\_1(var\_list,dname);

Error in ==\> newbankingSPV at 819  
dynare\_estimation(var\_list\_);

Error in ==\> dynare at 120  
evalin(‘base’,fname) ;

The question is:  
do you think that there is a bug in my program, as well as in my theoretical model, or the only problem stays in wrong initial values?  
I am a beginner of Dynare, so I really appreaciate all kind of hints.

Thank you very much in advance for an eventual reply.

I attach the file .mod, the m. file with data and a short note to explain what I have done.  
[NotesBanking\_SPV.pdf](https://forum.dynare.org/uploads/default/original/2X/4/4d4637e57049f1e72aab270ae37d116d6307772d.pdf) (180 KB)  
[datacolumn.m](https://forum.dynare.org/uploads/default/original/2X/e/eefe675addcf81570030407609a9d628683c1a73.m) (10.5 KB)  
[newbankingSPV.mod](https://forum.dynare.org/uploads/default/original/2X/7/765aecb52e18d6e61f2a9ab966eddca60857d811.mod) (36 KB)

---

<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:** [24 September 2013 13:08 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/19 "2013-09-24T13:08:38Z")

</div>

I don’t have time to go deep in the equations of your model but just look at the code I hve a couple of remarks

First of all, before embarking in the estimation, calibrate your model in order to check if you obtained coherent results.  
If you remove % from the 787 line you can see by yourself the problem.

Another remarks. Where are the observables equations?  
you have to define not only the observable variables but also the observable equation to estimate your model.

---

<div class="post-metadata">

**Author:** ![Ale\_e\_Andre](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/e47774/32.png) [@Ale\_e\_Andre](https://forum.dynare.org/u/Ale_e_Andre)\
**Post date:** [25 September 2013 19:39 UTC](https://forum.dynare.org/t/vlcek-roger-2011-model/3052/20 "2013-09-25T19:39:18Z")

</div>

Thanks a lot Federico! I’ll try to fix my mistakes.

[Next page](https://forum.dynare.org/t/vlcek-roger-2011-model/3052.md?page=2)
