ZLB + deterministic model + permanent tax change

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

ZLB + deterministic model + permanent tax change

Postby fabioit » Wed Jul 27, 2016 3:29 pm

Dear Prof. Pfeifer,

I am working with a stochastic model with temporary fiscal policy change that uses Iacoviello's OccBin to implement the ZLB. I was wondering, is there a way to implement the ZLB in a deterministic model with permanent fiscal policy change?
I have also seen that the unstable 4.5 dynare version features "perfect_foresight_solver: new option lmmcp" which seems to be useful in that sense; is it the case? how?

Best,

Fabio
fabioit
 
Posts: 20
Joined: Fri Jul 08, 2016 10:21 am

Re: ZLB + deterministic model + permanent tax change

Postby jpfeifer » Thu Jul 28, 2016 6:56 am

------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: ZLB + deterministic model + permanent tax change

Postby fabioit » Thu Jul 28, 2016 1:33 pm

Dear Prof Pfeifer,

I have tried Gali_2015_chapter_5_commitment_ZLB.mod and it worked fine.
I have adapted my model using it as a reference.
Hence I was trying to test the ZLB first (with the "ut" shock) and then I would have included the permanent change in taxes once confident it worked.
Once run, it reports the following error:

Code: Select all
Error using get_complementarity_conditions (line 59)
Complementarity condition
Error in initialize_stacked_problem (line 24)
        [lb,ub,pfm.eq_index] =
        get_complementarity_conditions(M,options.ramsey_policy);
Error in solve_stacked_problem (line 21)
    initialize_stacked_problem(endogenousvariables, options, M, steadystate);
Error in perfect_foresight_solver_core (line 101)
                        solve_stacked_problem(oo_.endo_simul, oo_.exo_simul,
                        oo_.steady_state, M_, options_);
Error in perfect_foresight_solver (line 61)
oo_ = perfect_foresight_solver_core(M_,options_,oo_);
Error in dmpZLB (line 317)
perfect_foresight_solver;
Error in dynare (line 223)
evalin('base',fname) ;


I attached the my model for clarity,
dmpZLB.mod
NK with labour mkt frictions and ZLB
(6.83 KiB) Downloaded 99 times
(which of course works when run without ZLB, even when using dynare 4.5).

Could you spot what is the issue? Is it anything that can be fixed?

Thank you very much for the great support,

Fabio
fabioit
 
Posts: 20
Joined: Fri Jul 08, 2016 10:21 am

Re: ZLB + deterministic model + permanent tax change

Postby jpfeifer » Thu Jul 28, 2016 2:13 pm

The crash comes from the bug that will be fixed via https://github.com/DynareTeam/dynare/pull/1248/commits/018550401be1282c56277e355ae609123fa77282, but is not yet merged. You could adjust the function in your Dynare accordingly. It would tell you
Code: Select all
Complementarity condition r > 0: variable r is not recognized
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: ZLB + deterministic model + permanent tax change

Postby fabioit » Thu Jul 28, 2016 2:43 pm

Thank you!
I changed the .m file accordingly and my model too (there was a typo, with "r>0" instead of "R>0").
It failed to solve the perfect foresight model and the graphical output were the 4 variables' IRFs which however were flat.
Output:
Simulation of the perfect foresight model failed!
Switching to a homotopy method...

Iter. | Lambda | status | Max. residual
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 | 0.50000 | failed | 4.993363e-01
2 | 0.25000 | failed | 2.495016e-01
3 | 0.12500 | failed | 1.248216e-01
4 | 0.06250 | failed | 6.230218e-02
5 | 0.03125 | failed | 3.085383e-02
6 | 0.01563 | failed | 1.524102e-02
7 | 0.00781 | failed | 7.526070e-03
8 | 0.00391 | failed | 3.665926e-03
9 | 0.00195 | failed | 1.908192e-03
10 | 0.00098 | failed | 9.348322e-04
11 | 0.00049 | succeeded | 8.810390e-09
12 | 0.00098 | succeeded | 8.235924e-09
13 | 0.00146 | succeeded | 7.385603e-09
14 | 0.00244 | failed | 9.739783e-04
15 | 0.00195 | failed | 4.839970e-04
16 | 0.00171 | failed | 2.423056e-04
17 | 0.00159 | succeeded | 7.947054e-09
18 | 0.00171 | failed | 1.209527e-04
19 | 0.00165 | succeeded | 7.317452e-09
20 | 0.00171 | failed | 6.066198e-05
21 | 0.00168 | failed | 3.036521e-05
22 | 0.00166 | succeeded | 7.747872e-09
23 | 0.00168 | succeeded | 6.277519e-09
24 | 0.00169 | succeeded | 8.542693e-09
25 | 0.00172 | failed | 3.018651e-05
26 | 0.00171 | succeeded | 1.510728e-08
27 | 0.00172 | succeeded | 1.207161e-08
28 | 0.00174 | failed | 1.518680e-05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Failed to solve perfect foresight model


Do you have any clue about to proceed, if possible?

Best,

Fabio
fabioit
 
Posts: 20
Joined: Fri Jul 08, 2016 10:21 am

Re: ZLB + deterministic model + permanent tax change

Postby jpfeifer » Thu Jul 28, 2016 3:05 pm

Does your model work without the occasionally binding constraint?
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: ZLB + deterministic model + permanent tax change

Postby fabioit » Thu Jul 28, 2016 3:14 pm

Actually I haven't managed to make this model work with that one either... there are no errors but the constraint doesn't bind when it should (ie when it is hit by a strong demand shock).
I previously successfully used the OccBin package in another model though.
Attachments
runsimm_NKDMP.m
to run it
(5.14 KiB) Downloaded 68 times
NKDMP.mod
no ZLB
(5.23 KiB) Downloaded 72 times
NKDMP_ZLB.mod
ZLB
(2.83 KiB) Downloaded 79 times
fabioit
 
Posts: 20
Joined: Fri Jul 08, 2016 10:21 am

Re: ZLB + deterministic model + permanent tax change

Postby jpfeifer » Thu Jul 28, 2016 3:29 pm

Occbin linearizes the model. Perfect foresight in contrast solves the nonlinear model. Therefore my question was whether you can solve the model in Dynare using the perfect foresight solver when ignoring that interest rates cannot go negative.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: ZLB + deterministic model + permanent tax change

Postby fabioit » Thu Jul 28, 2016 3:42 pm

I just tried and the answer is no. When commenting out the ZLB bits, the "demand shock" produces no effect. The message remains that it has switched to homotopy method because perfect foresight failed.

Thank you
fabioit
 
Posts: 20
Joined: Fri Jul 08, 2016 10:21 am

Re: ZLB + deterministic model + permanent tax change

Postby jpfeifer » Thu Jul 28, 2016 4:04 pm

That suggests that the underlying model's nonlinearity creates a problem for the solver. With a linear approximation, the stability is essentially guaranteed by extrapolating the local stability properties at the steady state. This does not happen here. You might want to try a smaller shock that keeps you in potentially in the stability region.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: ZLB + deterministic model + permanent tax change

Postby fabioit » Thu Jul 28, 2016 4:32 pm

I tried even with minimal shocks, but the outcome is always the same. Thank you for your support.
fabioit
 
Posts: 20
Joined: Fri Jul 08, 2016 10:21 am

Re: ZLB + deterministic model + permanent tax change

Postby jpfeifer » Thu Jul 28, 2016 4:36 pm

Given that you have permanent shocks, can you do a steady state transition without any shocks?
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: ZLB + deterministic model + permanent tax change

Postby fabioit » Thu Jul 28, 2016 4:53 pm

I tried with the initval and endval blocks:
Code: Select all
initval;
C               =1.05961;
R               =1.0101;
pibar           =1;
F               =3.8835;
K               =3.8835;
s               =0.833333;
pstar           =1;
l               =1.07497;
x               =0.1;
Q               =0.296039;
J               =0.142857;
V               =98.805;
U               =98.7892;
mm              =0.99;
f               =3.30469;
vartheta        =1;
tight           =11.163;
Y               =1.07497;
v               =0.337793;
wbar            =0.984429;
u               =0;
taun            =0;
irpef           =0;
eps_taun =0;
//R_ann=4*R;
end;
steady(solve_algo=4, maxit=1000);

endval;
C               =1.05961;
R               =1.0101;
pibar           =1;
F               =3.8835;
K               =3.8835;
s               =0.833333;
pstar           =1;
l               =1.07497;
x               =0.1;
Q               =0.296039;
J               =0.142857;
V               =98.805;
U               =98.7892;
mm              =0.99;
f               =3.30469;
vartheta        =1;
tight           =11.163;
Y               =1.07497;
v               =0.337793;
wbar            =0.984429;
u               =0;
taun            =0;
irpef           =0;
eps_taun = .1;
//R_ann=4*R;
end;
steady(solve_algo=4, maxit=1000);

shocks;
var eps_ut;
periods 1:9;
values 0;
end;



perfect_foresight_setup(periods=50);
perfect_foresight_solver(lmmcp);


figure
subplot(2,2,1)
plot(0:12,oo_.endo_simul(strmatch('C',M_.endo_names,'exact'),M_.maximum_lag+1:M_.maximum_lag+13),'-x')
axis([0 12 -15 5])

subplot(2,2,2)
plot(0:12,oo_.endo_simul(strmatch('pibar',M_.endo_names,'exact'),M_.maximum_lag+1:M_.maximum_lag+13),'-x')
axis([0 12 -25 5])

subplot(2,2,3)
plot(0:12,oo_.endo_simul(strmatch('R',M_.endo_names,'exact'),M_.maximum_lag+1:M_.maximum_lag+13),'-x')
axis([0 12 -2 6])

subplot(2,2,4)
plot(0:12,oo_.endo_simul(strmatch('taun',M_.endo_names,'exact'),M_.maximum_lag+1:M_.maximum_lag+13),'-')
axis([0 12 -6 6])


With small shocks, perfect foresight works, with stronger ones, homotopy does. However, the IRFs' plots always appear flat, as if no change happened at all
fabioit
 
Posts: 20
Joined: Fri Jul 08, 2016 10:21 am

Re: ZLB + deterministic model + permanent tax change

Postby jpfeifer » Thu Jul 28, 2016 5:13 pm

That is because of your scaling of the x-axis. When using
Code: Select all
rplot C;

you will see the movement.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: ZLB + deterministic model + permanent tax change

Postby fabioit » Thu Jul 28, 2016 5:31 pm

Great! It looks like my target is really close, thank you again!
So now that we're sure it works without ZLB, my aim is to give the model a shock strong enough to lead the nominal interest rate down to zero and while the ZLB binds, simulate a cut in the labour tax. This is usually deflationary (even if the last output I found with the perfect foresight shows a positive peak in R), so the behaviour should be interesting, since the ZLB doesn't allow further cuts in the nominal interest rate (R).

How is it done, if possible?
fabioit
 
Posts: 20
Joined: Fri Jul 08, 2016 10:21 am

Next

Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests