%BCA_Steady  Start with 1990 levels for gdp, consumption, investment, 
%            hours of work, tax rates, and use these observations to
%            set parameters for a business cycle model with variations
%            in TFP, tax rates, a "labor wedge", and an "investment
%            wedge".  See details in the Appendix to:
%
%               Unmeasured Investment and the Puzzling 1990s US Boom
%               by Ellen McGrattan and Ed Prescott

%            Ellen McGrattan, 11-1-05
%            Revised, ERM, 8-27-07

%---------------------------------------------------------------------
% 1. Observed levels
GDPs       = 1;
Cs         = .7626*GDPs;
Xs         = .2377*GDPs;
Hs         = .2751;
tauc       = .0657;
tauh       = .3109;
NIPAptax   = .03/1.047*GDPs;
BEAK       = 4.095/1.047*GDPs;

% 2. Fixed parameters
%
beta       = .98;
eta        = .01;
gamma      = .02;
sigma      = 1.000001;
taup       = 1.74/4.095*.35;
taud       = 1.74/4.095*.15;
taux       = 0;
bhat       = beta*(1+gamma)^(-sigma);
grate      = (1+eta)*(1+gamma);

% 3. Implied parameters
%

ys         = GDPs;
xs         = Xs;
cs         = Cs;
gs         = GDPs-Cs-Xs;
ks         = BEAK;
tauk       = NIPAptax/ks;
hs         = Hs;
delta      = xs/ks+ 1-grate;
theta      = ((1-bhat*(1-delta))*(1+taux)-bhat*taup*delta+ ...
               bhat*(1-taup)*tauk)/ (bhat*(1-taup)) * ks/ys;
thet1      = 1-theta;
psi        = (1-tauh)*(1-theta)*(1-hs)*ys/((1+tauc)*cs*hs);
zs         = ((ks/ys)^theta)^(-1/thet1)*ys/hs;


% 4. Write out results
%
fid        = fopen('bca_params.m','w');
fprintf(fid,'beta       = %11.8f;\n',beta);
fprintf(fid,'delta      = %11.8f;\n',delta);
fprintf(fid,'eta        = %11.8f;\n',eta);
fprintf(fid,'gamma      = %11.8f;\n',gamma);
fprintf(fid,'psi        = %11.8f;\n',psi);
fprintf(fid,'sigma      = %11.8f;\n',sigma);
fprintf(fid,'theta      = %11.8f;\n',theta);
fprintf(fid,'zs         = %11.8f;\n',zs);
fprintf(fid,'gs         = %11.8f;\n',gs);
fprintf(fid,'taucs      = %11.8f;\n',tauc);
fprintf(fid,'tauhs      = %11.8f;\n',tauh);
fprintf(fid,'taups      = %11.8f;\n',taup);
fprintf(fid,'tauks      = %11.8f;\n',tauk);
fprintf(fid,'tauds      = %11.8f;\n',taud);
fprintf(fid,'tauxs      = %11.8f;\n',taux);
fprintf(fid,'ks         = %11.8f;\n',ks);
fprintf(fid,'hs         = %11.8f;\n',hs);
fprintf(fid,'ys         = %11.8f;\n',ys);
fprintf(fid,'gdps       = %11.8f;\n',ys);
fclose(fid);
