I tried to input deterministic shocks using the command “shocks” by changing the “example1.mod”. This is following code. However, this code didn’t work. Please tell me that the way of inputing determistic shocks (exogenous variables) in stochastic simulation.

Best Wishes,

*************************************************************// example 1 from Collard’s guide to Dynare
var y, c, k, a, h, b;
varexo u;
varexo_det e;

model;
cthetah^(1+psi)=(1-alpha)y;
k = beta(((exp(b)c)/(exp(b(+1))c(+1))) (exp(b(+1))alphay(+1)+(1-delta)k));
y = exp(a)(k(-1)^alpha)(h^(1-alpha));
k = exp(b)(y-c)+(1-delta)k(-1);
a = rhoa(-1)+taub(-1) + e;
b = taua(-1)+rhob(-1) + u;
end;

initval;
y = 1.08068253095672;
c = 0.80359242014163;
h = 0.29175631001732;
k = 5;
a = 0;
b = 0;
e = 0;
u = 0;
end;

shocks(shock_file=shocks1);
//var e; stderr 0.009;
//var u; stderr 0.009;
//var e, u = phi0.0090.009;
//var e, u = phi0.0090.009;
var e;
periods 1:5;
values 0.01;
end;

stoch_simul(linear);

Naohisa Hirakata
Macro Modelling
Research and Statistics Department
Bank of Japan
TEL: +81-3-3279-1111 (ext. 3847)
FAX: +81-3-5255-6758
EMAIL: naohisa.hirakata@boj.or.jp

You refer to file shocks1, but don’t seem to use it. Drop the shock_fille option

You need at least one stochastic shock. Declare some stdandard deviation for u

You won’t see the effect of the deterministic shocks, unless you ask for forecast. For example:

forecast(periods=40);

Best

Michel[/quote]

Michel, I did what you said. When I simulate the stochastic model with and without the deterministic shock, the chart generated by the forecast command looks different.

But, the time series for the exogenous variables in both cases are exactly the same. Why does it happens?

[quote=“diego.gomes”]
But, the time series for the exogenous variables in both cases are exactly the same. Why does it happens?[/quote]

You mean the stochastic exogenous, or the deterministic exogenous? Because if it’s the former, then this is normal, because stochastic and deterministic exogenous shocks are independent with each other.