Input exogenous variables

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.

Input exogenous variables

Postby hk » Thu Jun 15, 2006 10:05 am

Dear all,

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;

parameters beta, rho, beta, alpha, delta, theta, psi, tau;

alpha = 0.36;
rho = 0.95;
tau = 0.025;
beta = 0.99;
delta = 0.025;
psi = 0;
theta = 2.95;

phi = 0.1;

model;
c*theta*h^(1+psi)=(1-alpha)*y;
k = beta*(((exp(b)*c)/(exp(b(+1))*c(+1)))
*(exp(b(+1))*alpha*y(+1)+(1-delta)*k));
y = exp(a)*(k(-1)^alpha)*(h^(1-alpha));
k = exp(b)*(y-c)+(1-delta)*k(-1);
a = rho*a(-1)+tau*b(-1) + e;
b = tau*a(-1)+rho*b(-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 = phi*0.009*0.009;
//var e, u = phi*0.009*0.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
**********************************
hk
 
Posts: 2
Joined: Thu Jun 15, 2006 8:23 am

Postby MichelJuillard » Sat Jun 17, 2006 2:21 pm

There are three problems:

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

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

3) You won't see the effect of the deterministic shocks, unless you ask for forecast. For example:
forecast(periods=40);

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Thank you very much.

Postby hk » Thu Jun 22, 2006 10:33 am

Dear Professor Juillard,

Thanks for your answer.
This program worked, thank to your reply. I succeded in inputing the exogenous variable.
I do appreciate your help.

Your Sincerely,
Naohisa
hk
 
Posts: 2
Joined: Thu Jun 15, 2006 8:23 am

Re: Input exogenous variables

Postby diego.gomes » Fri Nov 23, 2012 8:08 pm

MichelJuillard wrote:There are three problems:



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



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



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

forecast(periods=40);



Best



Michel


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?
diego.gomes
 
Posts: 17
Joined: Sun Oct 28, 2012 7:37 pm

Re: Input exogenous variables

Postby SébastienVillemot » Mon Jan 07, 2013 4:32 pm

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


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.
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 7 guests