Perfect foresight and solver instead of stoch stimul for carbon tax policy

Hi, I am having an issue with replacing stoch_stimul with a perfect_foresight command.

If the carbon tax increases overtime rather than being temporary, inflation goes down. If I have tax as a demand shock as it reduces output and inflation so phie>0 should mitigate inflation fall however to do this I need to use perfect_foresight command rather than stoch_stimul as the shock is not temporary.

I am trying to use perfect_foresight_setup and solver however i am having trouble saving the data as IRFs. What can I do to replace the stoch_stimul and plot inflation over the period? I have commented out the attempt at the bottom of the code.

Thank you

plot_envnew.mod (6.1 KB)
console_env.m (3.6 KB)


the script consol_env (used to generate a file loaded in the mod file) is not working because file_steady_env function is missing. Can you post the missing file?


Sorry about that

find_steady_env.m (910 Bytes)

I modified the mod file to produce an IRF for inflation (with a shock on vtau in period one). I changed the number of periods for the perfect foresight (40 is probably too short, the simulation is done under the assumption that the economy is back to the steady state in the last period). After the call to perfect_foresight_solver I put the generated paths in a dseries object and call the plot command:

irfs_vtau = dseries(transpose(oo_.endo_simul), '0Q4', M_.endo_names);

You can modify the shocks block to add an expected path for the exogenous variable.


plot_envnew.mod (5.6 KB)

Not knowing the model, I cannot say.


P.S. Unrelated, are you sure that in the Taylor rule the current interest rate should depend on the expected interest rate (instead of the lagged interest rate)?

Why already has that discussion in various iterations of the file. In a general equilibrium model, there is not a one-to-one mapping from parameters to the model solution. It’s not a priori evident what the effect of a change in phie on inflation should be, particularly if the Taylor rule is more complicated. The feedback of the interest rate on Carbon will affect e.g. output, which in turn enters the Taylor rule. That results in non-trivial feedback loops.