Vlcek/Roger (2011) model

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!

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 (27.7 KB)
GNSS_BK_Basel_II_martios.mod (26.9 KB)

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 .

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 (26.6 KB)

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?

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

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

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*/

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.

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.

i modified your code

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

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?

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!

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 .

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?

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)

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

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

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 (180 KB)
datacolumn.m (10.5 KB)
newbankingSPV.mod (36 KB)

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.

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