trying to replicate Gali-Monacelli 2005

73 views
Skip to first unread message

bogmunds

unread,
Feb 19, 2014, 2:47:14 PM2/19/14
to iris-t...@googlegroups.com
Hello - i'm trying to replicate the GM 2005 open economy model but I am running into the following error that I'm having difficulty resolving. Any insight? (files attached).

Error:


Error using gm2005 (line 32)
IRIS Toolbox Error :: model.
*** Steady-state error in this equation in #1:
'LGDP_CAN_BAR=LGDP_CAN_BAR{-1}+rho/400+RES_LGDP_CAN_BAR;'.


Thanks!
GM_2005.model
gm2005.m

Jaromir Benes

unread,
Feb 19, 2014, 3:15:55 PM2/19/14
to bogmunds, the-iris-toolbox [discussion forum]
HI

There are two options/ways how to fix the problem:


1. Some of the model variables grow over time in steady state (in other words, the model has a balanced growth path). In that case, you have to use the option 'growth=' true in your sstate command to allow for that (by default, mainly for backward compatibility, the option 'growth=' is set to false, whereby the model is assumed to be stationary).

More specifically, change the line 31 in your gm2005.m file as follows
m = sstate(m,'growth=',true);


2. There is though a much cleaner, straightworward and elegant solution. Because the model is linear, you can declare it as such... on line 7:

m = model('GM_2005.model','linear=',true);

Linear models don't need their steady state (or balanced growth path) calculated before computing the first order solution. In IRIS, the steady state/balanced growth path for linear models is actually calculated on the basis of the solution (the transition matrix, the constant vectors, etc.)

You therefore simply swap the solution and steady-state blocks in your m-file:

% Solve the model. 
m = solve(m);

% Find the steady-state (no need to verify the steady state in linear models:)
m = sstate(m,);
disp(m);


You can choose any of these two solutions -- but you cannot obviously mix them together.


Also just to make sure you're aware of it. Because the model has a balanced growth path, the steady state for each individual variable is reported as a complex number: the real part is the steady state level at a particular (arbitrary) time along the BGP, whereas the imaginary part is the rate of difference along the BGP (i.e. x - x{t-1}):

get(m,'sstate')

(It has nothing to do with complex numbers themselves. It's just a way how to store and report two pieces of information -- level and growth -- using a single number).

Hope this helps.
Best,
Jaromir
  


--
You received this message because you are subscribed to the Google Groups "iris-toolbox-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iris-toolbox...@googlegroups.com.
To post to this group, send email to iris-t...@googlegroups.com.
Visit this group at http://groups.google.com/group/iris-toolbox.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages