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;

parameters.m (1.05 KB)

temptaud.mod (4.74 KB)

Just wanted to bump this thread for whenever you have time in case it was getting lost!

I cannot run it.

[quote]Undefined function or variable ‘b0’.

Error in temptaud (line 238)

set_param_value(‘b0’,b0);

[/quote]

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;

You did not post the benchmark.mod that you are calling at the end.

Yikes, I shouldn’t be multitasking!

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

benchmark.mod (4.46 KB)

Sorry, but what exactly is the question? Which variables should I look at. What is the puzzling result?

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!

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.

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?

You mean when people perfectly anticpate the future change?

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!

First, initialize the tax rate to the initial value:

```
initval;
tax_rate= 0;
...
end;
```

Depending on your exercise, you want to put

```
steady;
```

after this to start at the steady state conditional on this tax rate.

Then define the permanent new tax level using

```
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:

```
shocks;
var tax;
periods 1:n_initial;
values 0;
end;
```