Simple Asset pricing model, what is wrong here?

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.

Simple Asset pricing model, what is wrong here?

Postby brown3c » Wed Jul 24, 2013 6:31 pm

Hi I am a newbie to Dynare and just wanted to know what is wrong in the following lines of code. I get this error message:


Error using ones
NaN and Inf not allowed.
Error in dyntable (line 58)
hh = [hh char(32*ones(1,hlb)) deblank(headers(i,:)) ...
Error in disp_moments (line 97)
dyntable(title,headers,labels,autocorr,size(labels,2)+2,8,4);
Error in stoch_simul (line 154)
disp_moments(oo_.endo_simul,var_list);
Error in simpleplusplus (line 103)
info = stoch_simul(var_list_);
Error in dynare (line 120)
evalin('base',fname) ;


thanks for your help!!!!

var gc v gd;
varexo eps ;
parameters mu beta theta ;
mu = 0.02;
beta = 0.97;
theta = 2 ;
model;
v = beta*((1+gc(+1))^(-theta))*(1+gd(+1))*(1+v(+1));
gd = mu + eps;
gc = mu + eps;
end;

initval;
gc=.02;
gd=.02;
v=10;

end;
steady;

shocks;
var eps; stderr .2;
end;

steady;
check;

stoch_simul(periods=2000, irf=30, order=3);
brown3c
 
Posts: 6
Joined: Sun Sep 11, 2011 10:48 am

Re: Simple Asset pricing model, what is wrong here?

Postby jpfeifer » Wed Jul 24, 2013 8:49 pm

There are two bugs in 4.3.3 that occur in the rare case that a model is completely forward looking. Unfortunately, your model is one of those cases (or fortunately, because we found the bugs and can fix them). Please replace the dyntable.m, simult_.m, and th_autocovariances.m in your 4.3.3 folder with the attached ones. After that, it should run. Sorry for the inconvenience.
Attachments
th_autocovariances.m
(10.48 KiB) Downloaded 180 times
simult_.m
(5.85 KiB) Downloaded 187 times
dyntable.m
(2.23 KiB) Downloaded 178 times
------------
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


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests