clear all;

%structural parameters, by calibration
beta=.99;
alpha=1/3;
delta=.025;
chi=1;
phi=100;
sigma=1;
pis=1;

%steady states tax rate parameters, for illustruation only;
taucs= .17;
tauls= .2;
tauks= .3;
ii=0;

%for variable ends with 's' denotes the steady state value of that
%variable;
for te =0:0.01:1
    rks = (1/beta-1+delta)/(1-tauks*te);
    kh = (alpha/rks)^(1/(1-alpha));
    ws = (1-alpha)*kh^alpha;
    csh = (kh^alpha - delta*kh - tauls*te*ws - tauks*rks*te*kh)/(1 + taucs*te);
    hs = sqrt(ws*(1-tauls*te)/csh^sigma/(1+taucs*te));
    ks = kh*hs;
    Is = delta*ks;
    ys = kh^alpha*hs;
    cs=csh*hs;
    ii=ii+1;
    Uility(ii)=0.5*ys+0.25*(taucs*te*cs+tauls*te*ws*hs+tauks*te*rks*ks);
    Gs(ii)=0.5*(taucs*te*cs+tauls*te*ws*hs+tauks*te*rks*ks);
end
subplot(2,1,1);
plot(0:0.01:1,Uility);
title('Laffer Curve: Fiscal Revenue + Ouput')
xlabel('Tax effort \taue')
ylabel('Utility of local government')
subplot(2,1,2); 
plot(0:0.01:1,Gs);
title('Laffer Curve: Fiscal Revenue ')
xlabel('Tax effort \taue')
ylabel('Revenue of local government')

