
addpath /Applications/Dynare/4.5.7/matlab
clear  % 
clc

                       %risk aversion
alpha = 0.0734;          %Calibration of capital share = I/K
rho = 0.95;            %shock
sigmae = -0.010;
%sigmau = -0.010;
sigmacovid19 = -0.010;
mu = 0.025;
phi = 0.8;
%phi_cov = 1.23;
%lambda = 1;
%pi_1 = 0.25;
%pi_2 = 0.253;
theta = 1.75;
a = 1;
%h = 1;
covid_19 = 1;
beta = 0.99;
r = (1/beta)-1;
delta = 0.025;
lab = 1/6.5;
kn = ((alpha/((1/beta) - (1 - delta)))^(1/(1-alpha)));
lab_recovered = 1/theta;
%c_recovered = 1/(1+mu)*lambda;

lab_infected = (phi*1)/theta;
%c_infected = 1/lambda;

lab_susceptible = (1)/theta;
%c_susceptible = 1/(1+mu)*lambda;
   
 %((1-alpha)/theta*(kn)^(alpha))/(((theta+1-alpha)/theta)*(kn)^alpha - delta*kn); 
k = (kn*lab);
y = (k/lab)^alpha * lab; 
w = (1-alpha) * (kn)^alpha;
R = alpha * a * (kn)^(alpha-1);
D_s = 0;
D_i = 0;
D_r = 0;
B = 0;
     

c_sav = (R * k + (1 + r) * B - k + ((1-delta) * k)-B); %((k/lab)^alpha * lab)-(k - (1-delta) * k)-c_l;  ((k/lab)^alpha - delta*(k/lab))* lab;
c_susceptible = (w*lab_susceptible + D_s - (1+r)*D_s);
c_infected = (w*lab_infected + D_i - (1+r)*D_i);
c_recovered = (w*lab_recovered + D_r - (1+r)*D_r);
I = y - c_sav - (c_susceptible+c_infected+c_recovered);
%y_per = log(y)*100;
%y_growth =0;
%c_sav_per = log(c_sav)*100;
%c_sav_growth =0;
%c_bor_per = log(c_bor)*100;
%c_bor_growth =0;
%k_per = log(k)*100;
%k_growth =0;
%lab_per = log(lab)*100;
%lab_growth =0;
%w_per = log(w)*100;
%w_growth =0;
%I_per = log(I)*100;
%I_growth =0;

%lab_s = 0.363636; %(((w + pi_2) / - theta * lab_s*((1+pi_1)))/w);
%c_s = (w + pi_2)/-theta * lab_s*((1+mu)-pi_1);

%lab_i = (-1/theta*(1+mu))^2;
%w = -((w * phi)/ theta * lab_i *(1+mu))/(lab_i * phi);
%c_i = -((phi*w)/theta *lab_i *(1+mu));

%lab_r = 0.363636;
%w = - (w*(1+mu)/theta * lab_r*(1+mu))/lab_r;
%c_r = -(w/(theta * lab_r*(1+mu)));



myvariables = whos;
 

%% vsvsfsdf

 for i=1:length(myvariables)
    str = sprintf('%30s;\n', myvariables(i).name);
    eval(str);
    fprintf('%30s\n', myvariables(i).name); 
end

fprintf('0000000000000000000')
for i=1:length(myvariables)
    str = sprintf('%30s;\n', myvariables(i).name);
    eval(str);
    fprintf('%30s_ss\n', myvariables(i).name); 
end
fprintf('0000000000000000000')
for i=1:length(myvariables)
    str = sprintf('%30s_val_=%30s;\n', myvariables(i).name , myvariables(i).name);
    eval(str);
    fprintf('%30s_ss=%30s_val_;\n', myvariables(i).name , myvariables(i).name); 
end
fprintf('000000000000000000000')
for i=1:length(myvariables)
    str = sprintf('%30s_val_=%30s;\n', myvariables(i).name , myvariables(i).name);
    eval(str);
    fprintf('%30s=%30s_ss;\n', myvariables(i).name , myvariables(i).name); 
end

 
 save initial_values11.mat;
 
 
 dynare RBC_HA_draft.mod
                                                                             
 
        




