clear all
close all

beta=0.9926;
betae=0.97;
ms=0.85;
nk=10/11;
js=0.1;
alpha=0.05;
theta=0.75;
epsi=8;
eta=1+nk*(betae/(1-betae));
rhoa=0.95;
rhom=0.95;

phir=0.8;
phip=2.5;
phiy=0;
phib=0;
phim=0;

ktilde=(1-theta)*(1-theta*beta)/theta;
infls=1;
rds=1/beta;
xs=(epsi)/(epsi-1);
rbs=rds+rds*(rds-ms)/(eta*ms-rds);
qhY=(alpha/xs)*(betae/(1-betae-ms*(1/rbs-betae)));
cY=(1-betae)*((alpha/xs)+(1-ms)*qhY);
cpY=(1-cY);
qhc=js/(1-beta);
h=(js/(1-beta)*(1/qhY)*cpY+1)^(-1);
hp=(1-h);
hph=hp/h;


%divY=(rbs-(1/beta))*ms*qhY;
%cY=(1-betae)*((alpha/xs)+(1-ms)*qhY);
%cpY=((xs-alpha)/xs)+(rds-1)*ms*1/rbs*qhY+divY;
%hph=js*((1-betae-ms*(1/rbs-betae))/((1-beta)*betae*alpha))*cpY;
%bY=(ms/rbs)*qhY;

save originalparameters alpha beta betae cY cpY eta hph ktilde ms phib phim phip phir phiy rhom qhY rhoa rbs rds xs 

dynare original noclearall nolog

figure
plot(y_eps_r,'-k','Linewidth',1.5)
%title('Share Price')
%legend('Productivity Shock','Financial Shock')

