Skip to content

Commit 21da758

Browse files
committed
Changed exogenous timing assumption again, eliminated one SS bug and changed installation dependency resolution.
1 parent 559be46 commit 21da758

31 files changed

+513
-4901
lines changed

pymaclab.wpu

Lines changed: 399 additions & 4794 deletions
Large diffs are not rendered by default.

pymaclab/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def db_graph(dbase,tseries):
4444
P.show()
4545

4646
def newMOD(txtfile=None,dbase=None,initlev=3,mesg=False,ncpus=ncpus,\
47-
mk_hessian=True,use_focs=False,ssidic=None,sstate=None,vtiming={'exo':[-1,0],'endo':[-1,0],'iid':[0,1],'con':[0,1]}):
47+
mk_hessian=True,use_focs=False,ssidic=None,sstate=None,vtiming={'exo':[0,1],'endo':[-1,0],'iid':[1,2],'con':[0,1]}):
4848
'''
4949
Model's second intialisation method called by newMOD() function call. The model's
5050
__init__() method only creates the instance and adds information, but does no
@@ -62,7 +62,7 @@ def newMOD(txtfile=None,dbase=None,initlev=3,mesg=False,ncpus=ncpus,\
6262
sys.exit()
6363
# Create a new vtiming so that users can pass only one or two keys at instantiation of model
6464
# Clearly then vtiming2 represents the standard values which can get updated using vtiming
65-
vtiming2={'exo':[-1,0],'endo':[-1,0],'iid':[0,1],'con':[0,1]}
65+
vtiming2={'exo':[0,1],'endo':[-1,0],'iid':[1,2],'con':[0,1]}
6666
vtiming2.update(vtiming)
6767
modobj = macrolab.DSGEmodel(txtfile,dbase=dbase,initlev=initlev,mesg=mesg,ncpus=ncpus,\
6868
mk_hessian=mk_hessian,use_focs=use_focs,\

pymaclab/dsge/_dsge.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class __Derivatives(object):
111111

112112
# Initializes the absolute basics, errors difficult to occur
113113
def __init__(self,ffile=None,dbase=None,initlev=2,mesg=False,ncpus='auto',mk_hessian=True,\
114-
use_focs=False,ssidic=None,sstate=None,vtiming={'exo':[-1,0],'endo':[-1,0],'iid':[0,1],'con':[0,1]}):
114+
use_focs=False,ssidic=None,sstate=None,vtiming={'exo':[0,1],'endo':[-1,0],'iid':[1,2],'con':[0,1]}):
115115
jobserver.wait()
116116
if sstate != None:
117117
self._sstate = deepcopy(sstate)
@@ -725,7 +725,7 @@ def def_differ_periods(self):
725725
elif vtiming['iid'][0] == 0:
726726
iid_0 = [x[0].split('(')[0]+'(t)' for x in self.vardic['iid']['var']]
727727
elif vtiming['iid'][0] > 0:
728-
iid_0 = [x[0].split('(')[0]+'(t+'+str(vtiming['iid'][0])+')' for x in self.vardic['iid']['var']]
728+
iid_0 = ['E(t)|'+x[0].split('(')[0]+'(t+'+str(vtiming['iid'][0])+')' for x in self.vardic['iid']['var']]
729729
# For future
730730
if vtiming['iid'][1] < 0:
731731
iid_1 = [x[0].split('(')[0]+'(t-'+str(abs(vtiming['iid'][1]))+')' for x in self.vardic['iid']['var']]

pymaclab/dsge/inits/_inits.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
# Import of Translator Class for translating between different model formats
2929
from pymaclab.dsge.translators.translators import Translators
30+
from pymaclab.dsge.translators import dynarepp_to_pml
3031

3132
# Import refactored DSGE model initialisor class and the dynarepp flag
3233
import pymaclab.dsge.inits._set_flags

pymaclab/dsge/parsers/_dsgeparser.py

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ def populate_model_stage_one(self, secs):
243243
i1=i1+1
244244
if anyssi_found:
245245
self.ssidic = deepcopy(ssidic)
246-
ssili.sort()
247246
self.ssili = deepcopy(ssili)
248247
# Save for template instantiation
249248
self.template_paramdic['ssidic'] = deepcopy(ssidic)
@@ -262,7 +261,6 @@ def populate_model_stage_one(self, secs):
262261
elif use_focs and anyssi_found:
263262
self._use_focs = deepcopy(use_focs)
264263
self._ssidic = deepcopy(ssidic)
265-
ssili.sort()
266264
self.ssili = deepcopy(ssili)
267265
# Save for template instantiation
268266
self.template_paramdic['ssys_list'] = False
@@ -277,8 +275,7 @@ def populate_model_stage_one(self, secs):
277275
# Save for template instantiation
278276
self.template_paramdic['ssidic'] = False
279277
self.template_paramdic['ssys_list'] = False
280-
self.template_paramdic['use_focs'] = False
281-
278+
self.template_paramdic['use_focs'] = False
282279
return self
283280

284281

@@ -1080,12 +1077,6 @@ def bb_chron_str(self,str1='',bb_int=1,vtype='all'):
10801077
for varo in var_li:
10811078
if vtype != 'all' and varo[1][0] != vtype:
10821079
continue
1083-
elif vtype != 'all' and varo[1][0] != vtype:
1084-
continue
1085-
elif vtype != 'all' and varo[1][0] != vtype:
1086-
continue
1087-
elif vtype != 'all' and varo[1][0] != vtype:
1088-
continue
10891080
varn = varo[0]
10901081
ma = mregv1b.search(varn)
10911082
starts = ma.start()
@@ -1990,21 +1981,21 @@ def mksigmat(self, secs):
19901981

19911982
def mkeqtype(self):
19921983
lsys = self.llsys_list
1993-
tup1 = ('{-1,1}|None','iid|exo','{-1,1}')
1984+
tup1 = ('{-1,1}|None','exo|iid','{-1,1}')
19941985
tup2 = ('{-1,1}|None','all','{-1,1}')
19951986
tup3 = ('{-1,1}','all','{-1,1}')
19961987
err_indx = []
19971988
det_indx = []
19981989
exp_indx = []
19991990
for x,y in zip(lsys,range(len(lsys))):
2000-
if self.vreg(('{-1,1}','all','{-1,1}'),x,False,'max'):
2001-
exp_indx.append(y)
2002-
elif self.vreg((None,'exo|iid','{-1,1}'),x,False,'max'):
2003-
if len(self.vreg((None,'exo|iid','{-1,1}'),x,True,'max'))==\
1991+
if self.vreg(('{-1,1}|None','exo|iid','{-1,1}'),x,False,'max'):
1992+
if len(self.vreg(('{-1,1}|None','exo|iid','{-1,1}'),x,True,'max'))==\
20041993
len(self.vreg(('{-1,1}|None','all','{-1,1}'),x,True,'max')):
20051994
err_indx.append(y)
20061995
else:
20071996
det_indx.append(y)
1997+
elif self.vreg(('{-1,1}','all','{-1,1}'),x,False,'max'):
1998+
exp_indx.append(y)
20081999
else:
20092000
det_indx.append(y)
20102001

@@ -2105,7 +2096,7 @@ def mk_mssidic_subs(self):
21052096
str_tmp = ma.group()
21062097
tmp_list[i1][1] = tmp_list[i1][1].replace(str_tmp,'('+sub_dic[str_tmp]+')')
21072098
locals().update(self.paramdic)
2108-
tmp_dic = {}
2099+
tmp_dic = {}
21092100
tmp_dic[tmp_list[i1][0]] = eval(tmp_list[i1][1].replace('EXP(','np.exp(').replace('LOG(','np.log('))
21102101
locals().update(tmp_dic)
21112102
# Update ssidic
@@ -2121,7 +2112,6 @@ def mk_mssidic_subs(self):
21212112
for i1,keyo in enumerate([x[0] for x in self.ssili]):
21222113
if keyo in self.ssidic.keys() and str(self.ssidic[keyo]) != self.ssili[i1][1]:
21232114
self.ssili[i1][1] = str(self.ssidic[keyo])
2124-
self.ssili.sort()
21252115
return self
21262116

21272117
#This function is needed in population stage 1, at the end
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
def translate(secs=None,fpath=None,dyn_vtimings={'exo':[-1,0],'endo':[-1,0],'iid':[0,1],'con':[0,1]}):
1+
def translate(secs=None,fpath=None,dyn_vtimings={'exo':[-1,0],'endo':[-1,0],'iid':[0,1],'con':[0,1]},vardic={}):
22
from pymaclab.modfiles.templates import mako_pml_template
33

4+
if vardic != {}:
5+
secs['vardic'] = vardic
6+
else:
7+
secs['vardic'] = {}
48
# Render the template to be passed to dynare++
59
modstr = mako_pml_template.render(**secs)

pymaclab/dsge/translators/translators.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from pymaclab.dsge.translators import pml_to_dynarepp
33
from pymaclab.dsge.translators import dynarepp_to_pml
44
from pymaclab.dsge.translators import pml_to_pml
5-
from pymaclab.dsge.parsers._dsgeparser import ff_chron_str
5+
from pymaclab.dsge.parsers._dsgeparser import ff_chron_str, bb_chron_str
66

77

88
class Translators(object):
@@ -22,6 +22,8 @@ def pml_to_dynarepp(self,template_paramdic=None,fpath=None,focli=None):
2222
varli = set([x[1][0] for x in vreg(patup,focli[i1],True,'max')])
2323
if varli.intersection(compset) != set([]) and 'exo' in varli:
2424
focli[i1] = ff_chron_str(other,str1=focli[i1],ff_int=1,vtype='exo')
25+
else:
26+
focli[i1] = bb_chron_str(other,str1=focli[i1],bb_int=1,vtype='iid')
2527
template_paramdic = deepcopy(self.template_paramdic)
2628
template_paramdic['focs_dynare'] = focli
2729

pymaclab/modfiles/models/abcs_rbcs/cooley_hansen_cia_cf.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ None
4545
[2] @inv_bar = SS{@inv(t)};
4646

4747
# Production function and derivatives
48-
[3] @F(t) = lam(t-1)*k(t-1)**theta*h(t)**(1-theta);
48+
[3] @F(t) = lam(t)*k(t-1)**theta*h(t)**(1-theta);
4949
[4] @F_bar = SS{@F(t)};
5050
[5] @Fk(t) = DIFF{@F(t),k(t-1)};
5151
[6] @Fk(t+1) = FF_1{@Fk(t)};
@@ -69,16 +69,16 @@ None
6969
[4] w(t)-@Fh(t) = 0;
7070

7171
# The MRS between consumption and leisure
72-
[5] (B/(w(t)*p(t)))+(betta/mg(t)) = 0;
72+
[5] (B/(w(t)*p(t)))+(betta/E(t)|mg(t+1)) = 0;
7373

7474
# The asset equation for bonds
7575
[6] betta*(w(t)/E(t)|w(t+1))*(1+E(t)|r(t+1)-delta)-1 = 0;
7676

7777
# The evolution of technology
78-
[7] LOG(lam(t))-gamma*LOG(lam(t-1))-epsg(t) = 0;
78+
[7] LOG(E(t)|lam(t+1))-gamma*LOG(lam(t))-E(t)|epsg(t+1) = 0;
7979

8080
# The evolution of the money growth rate
81-
[8] LOG(mg(t))-(1-pi_bar)*LOG(mg_bar)-pi_bar*LOG(mg(t-1))-epsu(t) = 0;
81+
[8] LOG(E(t)|mg(t+1))-(1-pi_bar)*LOG(mg_bar)-pi_bar*LOG(mg(t))-E(t)|epsu(t+1) = 0;
8282

8383

8484
%Steady States [Closed Form]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

pymaclab/modfiles/models/abcs_rbcs/cooley_hansen_cia_linear.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,22 @@ None
6969
r_bar*k_bar*k(t-1)-(1-delta)*k_bar*k(t-1) = 0;
7070

7171
# Definition of r(t)
72-
[2] r(t)-lam(t-1)-(theta-1)*k(t-1)+(theta-1)*h(t) = 0;
72+
[2] r(t)-lam(t)-(theta-1)*k(t-1)+(theta-1)*h(t) = 0;
7373

7474
# Definition of w(t)
75-
[3] w(t)-lam(t-1)-theta*k(t-1)+theta*h(t) = 0;
75+
[3] w(t)-lam(t)-theta*k(t-1)+theta*h(t) = 0;
7676

7777
# The MRS condition
78-
[4] p(t)+w(t)-pi_bar*mg(t-1) = 0;
78+
[4] p(t)+w(t)-pi_bar*mg(t) = 0;
7979

8080
# The Euler asset equation
8181
[5] w(t)+betta*r_bar*E(t)|r(t+1)-E(t)|w(t+1) = 0;
8282

8383
# The law of motion of technology
84-
[6] lam(t)-gamma*lam(t-1)-epsg(t) = 0;
84+
[6] E(t)|lam(t+1)-gamma*lam(t)-E(t)|epsg(t+1) = 0;
8585

8686
# The law of motion of money growth
87-
[7] mg(t)-pi_bar*mg(t-1)-epsu(t) = 0;
87+
[7] E(t)|mg(t+1)-pi_bar*mg(t)-E(t)|epsu(t+1) = 0;
8888

8989

9090
%Variance-Covariance Matrix++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

pymaclab/modfiles/models/abcs_rbcs/cooley_hansen_cia_seignorage_ces_cf.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ None
4848
%Variable Substitution Non-Linear System++++++++++++++++++++++++++++++++++++++++++++++++
4949

5050
# Production function and derivatives
51-
[3] @F(t) = lam(t-1)*k(t-1)**theta*h(t)**(1-theta);
51+
[3] @F(t) = lam(t)*k(t-1)**theta*h(t)**(1-theta);
5252
[4] @F_bar = SS{@F(t)};
5353
[5] @Fk(t) = DIFF{@F(t),k(t-1)};
5454
[6] @Fk(t+1) = FF_1{@Fk(t)};
@@ -66,7 +66,7 @@ None
6666
[1] betta*(w(t)/E(t)|w(t+1))*(1+E(t)|r(t+1)-delta)-1 = 0;
6767

6868
# Cash-in-advance constraint for G
69-
[2] p(t)*g(t-1)-(1-(1/mg(t))) = 0;
69+
[2] p(t)*g(t)-(1-(1/mg(t))) = 0;
7070

7171
# The economy's budget constraint
7272
[3] k(t)+(1/p(t))-w(t)*h(t)-r(t)*k(t-1)-(1-delta)*k(t-1) = 0;
@@ -81,10 +81,10 @@ None
8181
[6] w(t)-@Fh(t) = 0;
8282

8383
# The evolution of technology
84-
[7] LOG(lam(t))-gamma*LOG(lam(t-1))-epsz(t) = 0;
84+
[7] LOG(E(t)|lam(t+1))-gamma*LOG(lam(t))-E(t)|epsz(t+1) = 0;
8585

8686
# The evolution of government expenditures
87-
[8] LOG(g(t))-(1-pi_bar)*LOG(g_bar)-pi_bar*LOG(g(t-1))-epsg(t) = 0;
87+
[8] LOG(E(t)|g(t+1))-(1-pi_bar)*LOG(g_bar)-pi_bar*LOG(g(t))-E(t)|epsg(t+1) = 0;
8888

8989

9090
%Steady States [Closed Form]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

pymaclab/modfiles/models/abcs_rbcs/cooley_hansen_cia_seignorage_ces_linear.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ None
4646
%Variable Substitution Non-Linear System++++++++++++++++++++++++++++++++++++++++++++++++
4747

4848
# Production function and derivatives
49-
[3] @F(t) = lam(t-1)*k(t-1)**theta*h(t)**(1-theta);
49+
[3] @F(t) = lam(t)*k(t-1)**theta*h(t)**(1-theta);
5050
[4] @F_bar = SS{@F(t)};
5151
[5] @Fk(t) = DIFF{@F(t),k(t-1)};
5252
[6] @Fk(t+1) = FF_1{@Fk(t)};
@@ -82,7 +82,7 @@ None
8282
[1] w(t)+r_bar*betta*E(t)|r(t+1)-E(t)|w(t+1) = 0;
8383

8484
# CIA constraint
85-
[2] p_bar*g_bar*(p(t)+g(t-1))-(1/mg_bar)*mg(t) = 0;
85+
[2] p_bar*g_bar*(p(t)+g(t))-(1/mg_bar)*mg(t) = 0;
8686

8787
# Budget constraint
8888
[3] k_bar*k(t)-(1/p_bar)*p(t)-w_bar*h_bar*(w(t)+h(t))...
@@ -93,16 +93,16 @@ None
9393
-(B/(w_bar*p_bar))*(w(t)+p(t)) = 0;
9494

9595
# Definition of r(t)
96-
[5] r(t)-lam(t-1)-(theta-1)*k(t-1)+(theta-1)*h(t) = 0;
96+
[5] r(t)-lam(t)-(theta-1)*k(t-1)+(theta-1)*h(t) = 0;
9797

9898
# Definition of w(t)
99-
[6] w(t)-lam(t-1)-theta*k(t-1)+theta*h(t) = 0;
99+
[6] w(t)-lam(t)-theta*k(t-1)+theta*h(t) = 0;
100100

101101
# Law of motion productivity
102-
[7] lam(t)-gamma*lam(t-1)-epsz(t) = 0;
102+
[7] E(t)|lam(t+1)-gamma*lam(t)-E(t)|epsz(t+1) = 0;
103103

104104
# Law of motion government spending
105-
[8] g(t)-pi_bar*g(t-1)-epsg(t) = 0;
105+
[8] E(t)|g(t+1)-pi_bar*g(t)-E(t)|epsg(t+1) = 0;
106106

107107

108108
%Variance-Covariance Matrix++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

pymaclab/modfiles/models/abcs_rbcs/cooley_hansen_cia_seignorage_cf.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ None
4545
%Variable Substitution Non-Linear System++++++++++++++++++++++++++++++++++++++++++++++++
4646

4747
# Production function and derivatives
48-
[3] @F(t) = lam(t-1)*k(t-1)**theta*h(t)**(1-theta);
48+
[3] @F(t) = lam(t)*k(t-1)**theta*h(t)**(1-theta);
4949
[4] @F_bar = SS{@F(t)};
5050
[5] @Fk(t) = DIFF{@F(t),k(t-1)};
5151
[6] @Fk(t+1) = FF_1{@Fk(t)};
@@ -66,7 +66,7 @@ None
6666
[2] (B/(betta*w(t)))+p(t) = 0;
6767

6868
# Cash-in-advance constraint for G
69-
[3] p(t)*g(t-1)-(1-(1/mg(t))) = 0;
69+
[3] p(t)*g(t)-(1-(1/mg(t))) = 0;
7070

7171
# The economy's budget constraint
7272
[4] k(t)+(1/p(t))-w(t)*h(t)-r(t)*k(t-1)-(1-delta)*k(t-1) = 0;
@@ -78,10 +78,10 @@ None
7878
[6] w(t)-@Fh(t) = 0;
7979

8080
# The evolution of technology
81-
[7] LOG(lam(t))-gamma*LOG(lam(t-1))-epsz(t) = 0;
81+
[7] LOG(E(t)|lam(t+1))-gamma*LOG(lam(t))-E(t)|epsz(t+1) = 0;
8282

8383
# The evolution of government expenditures
84-
[8] LOG(g(t))-(1-pi_bar)*LOG(g_bar)-pi_bar*LOG(g(t-1))-epsg(t) = 0;
84+
[8] LOG(E(t)|g(t+1))-(1-pi_bar)*LOG(g_bar)-pi_bar*LOG(g(t))-E(t)|epsg(t+1) = 0;
8585

8686

8787
%Steady States [Closed Form]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

pymaclab/modfiles/models/abcs_rbcs/cooley_hansen_cia_seignorage_linear.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ None
4545
%Variable Substitution Non-Linear System++++++++++++++++++++++++++++++++++++++++++++++++
4646

4747
# Production function and derivatives
48-
[3] @F(t) = lam(t-1)*k(t-1)**theta*h(t)**(1-theta);
48+
[3] @F(t) = lam(t)*k(t-1)**theta*h(t)**(1-theta);
4949
[4] @F_bar = SS{@F(t)};
5050
[5] @Fk(t) = DIFF{@F(t),k(t-1)};
5151
[6] @Fk(t+1) = FF_1{@Fk(t)};
@@ -84,23 +84,23 @@ None
8484
[2] w(t)+p(t) = 0;
8585

8686
# Cash-in-advance constraint for G
87-
[3] p_bar*g_bar*(p(t)+g(t-1))-(1/mg_bar)*mg(t) = 0;
87+
[3] p_bar*g_bar*(p(t)+g(t))-(1/mg_bar)*mg(t) = 0;
8888

8989
# The economy's budget constraint
9090
[4] k_bar*k(t)-(1/p_bar)*p(t)-w_bar*h_bar*(w(t)+h(t))...
9191
-r_bar*k_bar*(r(t)+k(t-1))-(1-delta)*k_bar*k(t-1) = 0;
9292

9393
# Definition of the real return on physical capital
94-
[5] r(t)-lam(t-1)-(theta-1)*k(t-1)+(theta-1)*h(t) = 0;
94+
[5] r(t)-lam(t)-(theta-1)*k(t-1)+(theta-1)*h(t) = 0;
9595

9696
# Definition of the economy's real wage
97-
[6] w(t)-lam(t-1)-theta*k(t-1)+theta*h(t) = 0;
97+
[6] w(t)-lam(t)-theta*k(t-1)+theta*h(t) = 0;
9898

9999
# The evolution of technology
100-
[7] lam(t)-gamma*lam(t-1)-epsz(t) = 0;
100+
[7] E(t)|lam(t+1)-gamma*lam(t)-E(t)|epsz(t+1) = 0;
101101

102102
# The evolution of government expenditures
103-
[8] g(t)-pi_bar*g(t-1)-epsg(t) = 0;
103+
[8] E(t)|g(t+1)-pi_bar*g(t)-E(t)|epsg(t+1) = 0;
104104

105105

106106
%Variance-Covariance Matrix++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

pymaclab/modfiles/models/abcs_rbcs/hansen_divisible_cf.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ None
3636
[2] @inv_bar = SS{@inv(t)};
3737

3838
# Production function and derivatives
39-
[2] @F(t) = lam(t-1)*k(t-1)**theta*h(t)**(1-theta);
39+
[2] @F(t) = lam(t)*k(t-1)**theta*h(t)**(1-theta);
4040
[2] @F_bar = SS{@F(t)};
4141
[2] @Fk(t) = DIFF{@F(t),k(t-1)};
4242
[2] @Fk(t+1) = FF_1{@Fk(t)};
@@ -81,7 +81,7 @@ None
8181
[3] y(t)-@F(t) = 0;
8282

8383
# The evolution of technology
84-
[5] LOG(lam(t))-gamma*LOG(lam(t-1))-eps(t) = 0;
84+
[5] LOG(E(t)|lam(t+1))-gamma*LOG(lam(t))-E(t)|eps(t+1) = 0;
8585

8686

8787
%Steady States [Closed Form]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

pymaclab/modfiles/models/abcs_rbcs/hansen_indivisible_cf.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ None
3838
[2] @inv_bar = SS{@inv(t)};
3939

4040
# Production function and derivatives
41-
[2] @F(t) = lam(t-1)*k(t-1)**theta*h(t)**(1-theta);
41+
[2] @F(t) = lam(t)*k(t-1)**theta*h(t)**(1-theta);
4242
[2] @F_bar = SS{@F(t)};
4343
[2] @Fk(t) = DIFF{@F(t),k(t-1)};
4444
[2] @Fk(t+1) = FF_1{@Fk(t)};
@@ -83,7 +83,7 @@ None
8383
[3] y(t)-@F(t) = 0;
8484

8585
# The evolution of technology
86-
[5] LOG(lam(t))-gamma*LOG(lam(t-1))-eps(t) = 0;
86+
[5] LOG(E(t)|lam(t+1))-gamma*LOG(lam(t))-E(t)|eps(t+1) = 0;
8787

8888

8989
%Steady States [Closed Form]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

0 commit comments

Comments
 (0)