Finn(1995) energy shock IRF result

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.

Finn(1995) energy shock IRF result

Postby taihana » Mon Jun 24, 2013 2:32 am

Dear all

I am running the paper of "A Theory of the Capacity Utilization/Inflation Relationship" of Mary G. Finn(1995), but i took out the money balances of the model , and keeping the other features the same.
It can also refer to the Mary G. Finn(2000) energy shock model.

It can successfully be run by dynare, unfortunately there is a problem in the figures of impulse response function.
the technology shocks (code: ea) impulse response for the output (yh) it has to be positive, and the energy shocks (code: eo) impulse response for the output (yh) it has to be negative . But in my code run out all in the opposite result.
By the way, My dynare version is 4.3.2.

Hope some of you can help me to fix this problem.
I appreciate for your attention about my question.

Thank you

Code: Select all
//total 11 endo
var yh c n w k rk u i o a po ;

//total 2 exo
varexo ea eo;

//total param
parameters delta beta varphi alpha omega0 omega1 upsilon0  upsilon1 rhoa rhoo
 uS nS_nS ruS poS rkS po_rk ch_yh i_yh  poo_yh  iS ;

delta=0.025;
beta=0.99 ;
varphi=0.32;
alpha=0.7;
omega0=0.04;
omega1=1.25;
upsilon0=0.01;
upsilon1=1.66;
rhoa=0.9 ;
rhoo=0.9 ;
uS=0.82;
poS=1;
nS_nS=0.3;
ruS=0.3;
rkS=0.3;
po_rk=0.3;
ch_yh=0.3;
i_yh=0.183;
poo_yh=0.043;
iS=0.183;

model;
//1oil  --o
o-k=upsilon1*u;

//2capital accumulation --i
k(+1)=delta*i+(1-delta)*k-delta*omega1*u;

//3HH FOC labor supply --w n
nS_nS*n = c-w ;

//4HH FOC capital  --rk k
(1/beta)*(c(+1)-c)=ruS*(rk(+1)+u(+1))-delta*omega1*u(+1)-poS*(upsilon0/upsilon1)*(uS^upsilon1)*(po(+1)+upsilon1*u(+1));

//5HH FOC utilizaton rate -- u
rk = (1/rkS)*omega0*(uS^(omega1-1))*((omega1-1)*u)+po_rk*upsilon0*(uS^(upsilon1-1))*(po+(upsilon1-1)*u);

//6production function --yh
yh=alpha*a+alpha*n+(1-alpha)*u+(1-alpha)*k;

//7Firm FOC capital
rk=yh-k-u;

//8Firm FOC labor
w=yh-n;

//9resource constraint  --c
yh= ch_yh*c+i_yh*i+poo_yh*(po+o);

//10shocks tech --a
a=rhoa*a(-1)+ea ;

//11shocks oil --o
po=rhoo*po(-1)+eo ;

end;

initval;
yh=0;
c=0;
n=0;
w=0;
k=0;
rk=0;
u=0;
i=0;
o=0;
a=0;
po=0;
end;

shocks;
var ea;
stderr 1;
var eo;
stderr 1;
end;

steady;

check;

stoch_simul(periods=1000); dynasave('modelfinn.mat');
taihana
 
Posts: 3
Joined: Mon Jun 24, 2013 2:01 am

Re: Finn(1995) energy shock IRF result

Postby jpfeifer » Mon Jun 24, 2013 6:55 am

Your timing for capital (not predetermined) and the law of motion for capital look strange (at least compared to the 1995 version). Check the timing and the equations.
Have you been able to replicate the original paper before changing the model?
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Finn(1995) energy shock IRF result

Postby taihana » Mon Jun 24, 2013 10:56 am

Dear jpfeifer

Thanks for your reply.

This model was same from the Finn(2000) "Perfect competition and the effects of energy price increases on economic activity", except the household utility function is refer as Finn(1995).
(In the attached file is my derivations of the model, which please kindly will be convenience for you to understand. )

>>>Your timing for capital (not predetermined) and the law of motion for capital look strange (at least compared to the 1995 version).

Well, i have check the log linearization of law of motion ,and i didn't find where the problem is.

This afternoon i found a mistake in the former code (//3HH FOC labor supply nS_nS*n = c-w ),the mistake is i ignore nS_nS a minus there. And after i correct it , it comes error in dynare.
There are 4 eigenvalue(s) larger than 1 in modulus
for 5 forward-looking variable(s)

The rank conditions ISN'T verified!

??? Error using ==> print_info at 43
Blanchard Kahn conditions are not satisfied: indeterminacy

Error in ==> stoch_simul at 81
print_info(info, options_.noprint);

Error in ==> testfinn2000 at 207
info = stoch_simul(var_list_);

Error in ==> dynare at 120
evalin('base',fname) ;


Therefore, i have rearrange the correct codes for you below, it will be easy to campare with the derivations in the attach files.

Again, thankful for spend time to solve these problems .

Diana

Code: Select all
//total 11 endo
var yh c n w k rk u i o a po ;

//total 2 exo
varexo ea eo;

//total param
parameters delta beta varphi alpha omega0 omega1 upsilon0  upsilon1 rhoa rhoo
 uS ruS poS rkS po_rk ch_yh i_yh  poo_yh  nS ;

delta=0.025;
beta=0.99 ;
varphi=0.32;
alpha=0.7;
omega0=0.04;
omega1=1.25;
upsilon0=0.01;
upsilon1=1.66;
rhoa=0.9 ;
rhoo=0.9 ;
uS=0.82;
poS=1;
ruS=0.2;
rkS=0.2;
po_rk=0.2;
ch_yh=0.2;
i_yh=0.183;
poo_yh=0.043;
nS=0.3;

model;
//1oil  --o(eq21)
o-k=upsilon1*u;

//2capital accumulation --i(eq23)
k(+1)=delta*i+(1-delta)*k-delta*omega1*u;

//3shocks oil --o(eq24)
po=rhoo*po(-1)+eo ;

//4HH FOC labor supply --w n (eq25)
0 =nS*n+ (1-nS)*(c-w) ;

//5HH FOC capital  --rk k (eq26)
(1/beta)*(c(+1)-c)=ruS*(rk(+1)+u(+1))-delta*omega1*u(+1)-poS*(upsilon0/upsilon1)*(uS^upsilon1)*(po(+1)+upsilon1*u(+1));

//6HH FOC utilizaton rate -- u(eq28)
rk = (1/rkS)*omega0*(uS^(omega1-1))*((omega1-1)*u)+po_rk*upsilon0*(uS^(upsilon1-1))*(po+(upsilon1-1)*u);

//7production function --yh(eq29)
yh=alpha*(a+n)+(1-alpha)*(u+k);

//8shocks tech --a(eq30)
a=rhoa*a(-1)+ea ;

//9Firm FOC capital (eq31)
rk=yh-k-u;

//10Firm FOC labor (eq32)
w=yh-n;

//11resource constraint  --c(eq33)
yh= ch_yh*c+i_yh*i+poo_yh*(po+o);

end;

initval;
yh=0;
c=0;
n=0;
w=0;
k=0;
rk=0;
u=0;
i=0;
o=0;
a=0;
po=0;
end;

shocks;
var ea;
stderr 1;
var eo;
stderr 1;
end;

steady;

check;

stoch_simul(periods=1000); dynasave('modelfinn.mat');
Attachments
0624finnEN.pdf
(123.65 KiB) Downloaded 126 times
taihana
 
Posts: 3
Joined: Mon Jun 24, 2013 2:01 am

Re: Finn(1995) energy shock IRF result

Postby jpfeifer » Mon Jun 24, 2013 1:30 pm

As I said, your timing for capital does not obey Dynare's timing convention. Use
Code: Select all
predetermined_variables k;
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Finn(1995) energy shock IRF result

Postby taihana » Mon Jun 24, 2013 2:29 pm

Dear jpfeifer

Finally, i understand what you have been saying to me, because this is my first year about learning the dynare techniques and researching about DSGE. Sorry for misunderstanding of your reply.

Now i can successfully run this code in dynare by adding your suggestion.
However, it seems that the figures of the impulse response function for the oil shocks (eo) is unreasonable.

Because in the paper of Finn(1995) , Finn considers that the increase in oil price(po) declines in both oil usage(o) and capital utilization rate (u), the reductions in u and labor (n) imply a decrease on y.
I have attach a pdf file for the figures of the impulse response function of oil shock run out by dynares.

Hence, Is there anything wrong about the codes?
I would like to ask you How can i fix about this problem?

Thank you so much for helping me a lot.

Diana
Attachments
oil shock.pdf
(121.46 KiB) Downloaded 141 times
taihana
 
Posts: 3
Joined: Mon Jun 24, 2013 2:01 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests