Page 1 of 1

Temporary tax shocks

PostPosted: Sun Jan 11, 2015 5:58 am
by macroresearch123
Hey Johannes,

When you have time, there's a question regarding to a temporary tax shock that I'm trying to introduce in a paper that I returned to after some months -- it's the one you've seen last year when I asked questions about the steady state. (Long story short, I found a great way to compute steady states using a combination of knitro and matlab with explicit jacobians.)

Here's the odd part. While I've looked online and I seemed to follow the basics for introducing temporary shocks (in my model, periods 1 -500 out of the total simulated 1000), I get a result that doesn't make sense. Since it's a paper on externalities in general equilibrium, I consider a temporary environmental tax of 20% -- but it seems to induce values for energy inputs that are higher than my benchmark with a flat 5% tax.

In case you want to run the file, just copy the following into a script after adjusting for 'yourfolder':
clear all; close all; clc;
cd 'yourfolder'
% Load parameters
P = parameters; %make sure these are updated
%rename for convenience
iota=P.iota; theta_e=P.theta_e; theta_k=P.theta_k; theta_h=P.theta_h; gamma=P.gamma;
alpha=P.alpha; mu=P.mu; phi=P.phi; psi=P.psi; chi_h=P.chi_h; chi_e=P.chi_e; beta=P.beta;
theta=P.theta; delta=P.delta; nu=P.nu; xi=P.xi; eta=P.eta; ga=P.ga; ge=P.ge;
tau_c=P.tau_c; tau_x=P.tau_x; tau_h=P.tau_h; tau_k=P.tau_k; tau_marg=P.tau_marg; tau_d=P.tau_d;
rho_k=P.rho_k; rho_e=P.rho_e; rho_s=P.rho_s; rho_p=P.rho_p; rho_taud=P.rho_taud;
sig_k=P.sig_k; sig_e=P.sig_e; sig_s=P.sig_s; sig_p=P.sig_p; sig_taud=P.sig_taud;

%save in location of dynare file
cd 'yourfolder'
save parameterfile iota theta_e theta_k theta_h gamma alpha mu phi psi chi_h chi_e beta ...
theta delta nu xi eta ga ge tau_c tau_x tau_h tau_k tau_marg tau_d...
rho_k rho_e rho_s rho_p rho_taud sig_k sig_s sig_e sig_p sig_taud;

Re: Temporary tax shocks

PostPosted: Tue Jan 20, 2015 8:13 pm
by macroresearch123
Just wanted to bump this thread for whenever you have time in case it was getting lost!

Re: Temporary tax shocks

PostPosted: Thu Jan 22, 2015 1:11 pm
by jpfeifer
I cannot run it.
Undefined function or variable 'b0'.

Error in temptaud (line 238)
set_param_value('b0',b0);

Re: Temporary tax shocks

PostPosted: Sat Jan 24, 2015 6:00 am
by macroresearch123
Thank you for the reply! Apparently I copied an incomplete version of the parameter list in my initial post. Here's the complete set. However, if it's easier or more convenient for you just to jot down the highlights about how to do temporary shocks (e.g., for taxes), that would be just as good!


clear all; close all; clc;
cd 'yourfolder';
P = parameters;
iota=P.iota; theta_e=P.theta_e; theta_k=P.theta_k; theta_h=P.theta_h; gamma=P.gamma;
alpha=P.alpha; mu=P.mu; phi=P.phi; psi=P.psi; chi_h=P.chi_h; chi_e=P.chi_e; beta=P.beta;
theta=P.theta; delta=P.delta; nu=P.nu; xi=P.xi; eta=P.eta; ga=P.ga; ge=P.ge;
tau_c=P.tau_c; tau_x=P.tau_x; tau_h=P.tau_h; tau_k=P.tau_k; tau_marg=P.tau_marg; tau_d=P.tau_d;
rho_k=P.rho_k; rho_e=P.rho_e; rho_s=P.rho_s; rho_p=P.rho_p; rho_taud=P.rho_taud;
sig_k=P.sig_k; sig_e=P.sig_e; sig_s=P.sig_s; sig_p=P.sig_p; sig_taud=P.sig_taud;
b0=P.b0; b1=P.b1; zeta=P.zeta;

cd 'yourfolder'
save parameterfile iota theta_e theta_k theta_h gamma alpha mu phi psi chi_h chi_e beta ...
theta delta nu xi eta ga ge tau_c tau_x tau_h tau_k tau_marg tau_d...
rho_k rho_e rho_taud sig_k sig_e sig_taud b0 b1 zeta;
dynare benchmark.mod;

Re: Temporary tax shocks

PostPosted: Wed Jan 28, 2015 7:19 am
by jpfeifer
You did not post the benchmark.mod that you are calling at the end.

Re: Temporary tax shocks

PostPosted: Thu Jan 29, 2015 11:29 pm
by macroresearch123
Yikes, I shouldn't be multitasking!

Here's that remaining file and it should be set.

Re: Temporary tax shocks

PostPosted: Fri Jan 30, 2015 7:51 am
by jpfeifer
Sorry, but what exactly is the question? Which variables should I look at. What is the puzzling result?

Re: Temporary tax shocks

PostPosted: Tue Feb 03, 2015 4:13 am
by macroresearch123
I wasn't sure how to do temporary tax shocks. For permanent (tax) shocks, I make the tax stochastic, but for the temporary ones I couldn't find much documentation about it. If you could either qualitatively describe how, or if there's some recommended code, that would be great!

Re: Temporary tax shocks

PostPosted: Thu Feb 05, 2015 7:47 am
by jpfeifer
Could you please exactly describe the context (stochastic or deterministic) and the experiment you try to conduct. If you go for a stochastic model, you need to specify a stationary stochastic process and the temporary tax will jump up and converge back following this process. There is no way you can set it to e.g. 1 for 20 periods and to 0 afterwards. This is only possible in deterministic/perfect foresight simulations where you can exactly specify the path for the exogenous variables.

Re: Temporary tax shocks

PostPosted: Mon Feb 09, 2015 7:18 pm
by macroresearch123
OK, I was under the impression that's what a permanent tax shock would look like. That is, what I already had was a stochastic process (AR 1) for environmental tax rates.

Then how would I want to introduce a change in a tax half way into the model; for example, 40 periods, in period 20, a parameter (tau_d) goes from .05 to .2?

Re: Temporary tax shocks

PostPosted: Wed Feb 11, 2015 5:07 pm
by jpfeifer
You mean when people perfectly anticpate the future change?

Re: Temporary tax shocks

PostPosted: Sat Feb 14, 2015 8:04 am
by macroresearch123
Yes, that would be the perfect foresight feature -- how would I implement it? Apologies for not replying earlier -- while I'm working on this paper frequently, don't always remember to check the forum!

Re: Temporary tax shocks

PostPosted: Thu Feb 19, 2015 9:19 am
by jpfeifer
First, initialize the tax rate to the initial value:
Code: Select all
initval;
tax_rate= 0;
...
end;

Depending on your exercise, you want to put
Code: Select all
steady;

after this to start at the steady state conditional on this tax rate.
Then define the permanent new tax level using
Code: Select all
endval;
tax= 0.1;
...
end;
steady;

This yields a tax rate that is 0 in the initial period and 0.1 afterwards. But you want the tax rate to only change after some time. Thus, reset the tax rate to 0 in the first n_initial periods:
Code: Select all
shocks;
var tax;
periods 1:n_initial;
values 0;
end;