var r pi c a n q w mc sf so;
varexo eps;
parameters sigma phi alpha gamma rho_a beta epsilon tau;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%parameters%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
as=0.3;
sigma=1;
phi=0.2;
alpha=1.2;
gamma=1.3;
rho_a=0.9;
beta=0.99;
epsilon=3;
tau=0.8;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
model(linear);
c=c(+1)-(1/sigma)*(r-pi(+1));
w=(phi*n)+(sigma*c);
w=tau+a+mc;
q=a+n+(epsilon*mc);
pi=beta*pi(+1)+((epsilon-1)/gamma)*mc;
q=c;
a=rho_a*a(-1)+eps;
mc=tau+w-a;
sf=q-(epsilon*mc)- so;
tau=(alpha-1)*so;
end;
resid(1);
steady;
check;
shocks;
var eps =1^2;
end;
%stoch_simul (hp_filter=1600,IRF=60) r pi c a n q w mc sf so ;
stoch_simul(hp_filter=1600,IRF=20);