%ONESS    calculates steady state of model described iin onesect.f.

%         Ellen McGrattan, 6-23-97


% Parameters for:
%    U(c,l,g1)   = [c*l^psi*g1^zeta]^(1-sigma) / (1-sigma)
%    F(k,l,g2)   = a*k^alpk*l^alph*g2^(1-alpk-alph) 
%    beta        = discount factor
%    delk        = depreciation of physical capital
%    delh        = depreciation of human capital
%    eta         = population growth
%

a     = 1;
alpk  = .3;
alph  = .7;
beta  = .97;
delk  = .06;
delh  = .06;
eta   = 0.0;
psi   = 3.0;
sigma = 1.0001;
zeta  = 0;

%
% Policy variables:
%

tauxk = .0;
tauxh = .0;
tauk  = .0;
tauh  = .0;
tauc  = .0;
z1    = .0;
z2    = .0;

par   = [a;alpk;alph;beta;delk;delh;eta;psi;sigma;zeta;
         tauxk;tauxh;tauk;tauh;tauc;z1;z2];

% Guesses for k/y, l, gam:

ky    = 2;
l     = 0.25;
gam   = 1;


% Use guesses of ratios to get initial guess in levels:  

y     = (a*ky^alpk*l^alph*z2^(1-alpk-alph) )^(1/alph);
k     = ky * y;

zi    = [k;l;gam];

% Call to fixed point algorithm

z     = secant('onefoc',zi,par,1e-8,100);

k     = z(1);
l     = z(2);
gam   = z(3);
xh    = gam-1+delh;
xk    = (gam-1+delk)*k;
y     = (a*k^alpk*l^alph*z2^(1-alpk-alph))^(1/(alpk+alph));
c     = (1-z1-z2)*y-xk-xh;

disp('Steady state values for One-sector Growth Model')
disp('-----------------------------------------------')
disp(sprintf('   (h''/h-1)*100             =   %7.4f ',(gam-1)*100))
disp(sprintf('   c/y                      =   %7.4f ',c/y))
disp(sprintf('   g/y                      =   %7.4f ',z1+z2))
disp(sprintf('   l                        =   %7.4f ',l))
disp(sprintf('   xk/y                     =   %7.4f ',xk/y))
disp(sprintf('   xh/y                     =   %7.4f ',xh/y))
disp(sprintf('   k/y                      =   %7.4f ',k/y))
disp(sprintf('   k/h                      =   %7.4f ',k))
disp('-----------------------------------------------')

