Small open economy model

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.

Small open economy model

Postby rteconomics » Wed Apr 04, 2012 9:31 am

Hello,
I'm trying to run the attached code. It's a small open economy model with 2 frictions: capital adjustment costs and government reversal expenditure. I closed the model by specifying a foreign debt elastic interest rate.
When running the code, I get this error message: "numerical initial values incompatible with the following equations 22". It weird since I don't see why the initial values (calculated by hands) should be incompatible.

Could anyone please help me?
Many thanks!
RT
Attachments
newsalex.mod
(2.15 KiB) Downloaded 241 times
rteconomics
 
Posts: 41
Joined: Wed Jan 04, 2012 11:29 am

Re: Small open economy model

Postby bkjecn » Wed Apr 04, 2012 2:42 pm

Your steady state values don't solve the model, however the problem is not in equation 22. I don't know why it is giving that error, but if you replace 'initval' with 'steady_state_model' (see the documentation here http://www.dynare.org/manual/index_20.h ... _005fmodel if you are interested), and you will see that the residuals of equations 6-8 are not zero. I would focus on those equations...

After making the change, the output from Dynare in Matlab is

Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0.28083
Equation number 7 : 0.15556
Equation number 8 : 0.95483
Equation number 9 : 0
Equation number 10 : 0
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0
Equation number 14 : 0
Equation number 15 : 0
Equation number 16 : 0
Equation number 17 : 0
Equation number 18 : 0
Equation number 19 : 0
Equation number 20 : 0
Equation number 21 : 0
Equation number 22 : 0
Equation number 23 : 0


??? Error using ==> steady_ at 104
The steadystate values returned by newsalex_steadystate.m don't solve the static model!

Error in ==> steady at 54
steady_;

Error in ==> newsalex at 185
steady;

Error in ==> dynare at 120
evalin('base',fname) ;
bkjecn
 
Posts: 35
Joined: Thu Oct 13, 2011 3:02 am

Re: Small open economy model

Postby kyri82 » Wed Apr 04, 2012 2:46 pm

You have some negative values at steady-state, is that normal? What is variable d? it is negative at steady-state.
kyri82
 
Posts: 141
Joined: Thu Feb 10, 2011 6:14 pm
Location: Toulouse - France

Re: Small open economy model

Postby rteconomics » Wed Apr 04, 2012 3:37 pm

Hi Kyri82, well I think (but I'm not sure) it is possible to have negative values since d is the net foreign position of the government. Am I wrong?
rteconomics
 
Posts: 41
Joined: Wed Jan 04, 2012 11:29 am

Re: Small open economy model

Postby kyri82 » Wed Apr 04, 2012 3:38 pm

Thats true but if you express your variables in logs then it cannot be so...
kyri82
 
Posts: 141
Joined: Thu Feb 10, 2011 6:14 pm
Location: Toulouse - France

Re: Small open economy model

Postby rteconomics » Wed Apr 04, 2012 3:41 pm

Hi bkjecn,
Thanks for your reply!!
Those equations are:

6) Production function: y=a*k^(alpha)*h^(1-alpha);
7) Marginal productivity of capital: rk=a*alpha*k^(alpha-1)*h^(1-alpha);
8) Marginal productivity of labor: w=a*(1-alpha)*k^(alpha)*h^(-alpha);

I think the issue is with a (the TFP process): a=rhoa*a(-1)+ea;
I specified the steady state value to zero and the steady state of equations 6, 7, and 8 as:

y=k^(alpha)*h^(1-alpha);
rk=alpha*k^(alpha-1)*h^(1-alpha);
w=(1-alpha)*k^(alpha)*h^(-alpha);

For some reason this is wrong but I can't see why...
rteconomics
 
Posts: 41
Joined: Wed Jan 04, 2012 11:29 am

Re: Small open economy model

Postby rteconomics » Wed Apr 04, 2012 3:43 pm

Kyri82, you're right... but the model is not in logs (in the sense that it's not the log-linearized version) and that's why I'm not sure.
rteconomics
 
Posts: 41
Joined: Wed Jan 04, 2012 11:29 am

Re: Small open economy model

Postby rteconomics » Wed Apr 04, 2012 3:43 pm

Kyri82, btw THANKS for your help!!
rteconomics
 
Posts: 41
Joined: Wed Jan 04, 2012 11:29 am

Re: Small open economy model

Postby kyri82 » Wed Apr 04, 2012 4:04 pm

If it is not in logs then it is fine. No problem and I hope you will sort it out!
kyri82
 
Posts: 141
Joined: Thu Feb 10, 2011 6:14 pm
Location: Toulouse - France

Re: Small open economy model

Postby bkjecn » Wed Apr 04, 2012 5:12 pm

If the steadystate value of 'a' is zero, then the steadystate value of equations 6-8 is zero. They are all multiplied by 'a'. I think right now your model implies a zero steady state for output.
bkjecn
 
Posts: 35
Joined: Thu Oct 13, 2011 3:02 am

Re: Small open economy model

Postby rteconomics » Wed Apr 04, 2012 8:35 pm

Hi,
Actually I tried also with a=1 in the steady state (which implies a positive value of y) but it doesn't work..
rteconomics
 
Posts: 41
Joined: Wed Jan 04, 2012 11:29 am

Re: Small open economy model

Postby flyingpig » Thu Apr 05, 2012 3:06 pm

bkjecn wrote:Your steady state values don't solve the model, however the problem is not in equation 22. I don't know why it is giving that error, but if you replace 'initval' with 'steady_state_model' (see the documentation here http://www.dynare.org/manual/index_20.h ... _005fmodel if you are interested), and you will see that the residuals of equations 6-8 are not zero. I would focus on those equations...

After making the change, the output from Dynare in Matlab is

Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0.28083
Equation number 7 : 0.15556
Equation number 8 : 0.95483
Equation number 9 : 0
Equation number 10 : 0
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0
Equation number 14 : 0
Equation number 15 : 0
Equation number 16 : 0
Equation number 17 : 0
Equation number 18 : 0
Equation number 19 : 0
Equation number 20 : 0
Equation number 21 : 0
Equation number 22 : 0
Equation number 23 : 0


??? Error using ==> steady_ at 104
The steadystate values returned by newsalex_steadystate.m don't solve the static model!

Error in ==> steady at 54
steady_;

Error in ==> newsalex at 185
steady;

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



I also have a model which residuals are not all zeros. What does these residuals mean, please tell me!! Thank you!!!
flyingpig
 
Posts: 17
Joined: Mon Mar 05, 2012 8:59 am

Re: Small open economy model

Postby bkjecn » Thu Apr 05, 2012 3:54 pm

rteconomics: you have to change the model so that the steady state of 'a' actually is something other than zero. One way to do this would be to say that log(a) = rho * log(a(-1)) + e where 'e' is a shock. Then 'a' is always positive and the steady state is 1.

flyingpig: if you take all of your equations and write them so that they are of the form '0 = equation', the residual is the value of the right-hand side when you plug in the values you gave the model for steady-state values. These all have to be zero for the steady-state values to actually satisfy the equations of the model. If you have non-zero residuals, then you failed to solve for the steady-state values.
bkjecn
 
Posts: 35
Joined: Thu Oct 13, 2011 3:02 am

Re: Small open economy model

Postby rteconomics » Thu Apr 05, 2012 7:19 pm

bkjecn: thanks! Today I (actually my co-author) fixed it! THANKS again for everything!
rteconomics
 
Posts: 41
Joined: Wed Jan 04, 2012 11:29 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 4 guests

cron