
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;
mu = 0.01;
a = 1;
r = 0.0218; %(за 5 лет/20 кв) 
theta = 1.75;
beta = 1 /(1 + r);
delta = 0.0983; %годовую делаю по квартально, delta=I/k 10 лет среднее соотношение invest/cap// годовую делим на 4
kn = (alpha/((1/beta) - (1 - delta)))^(1/(1-alpha));
lab = (1-alpha)/theta*(kn)^(alpha)/((theta+1-alpha)/theta*(kn)^alpha - delta*kn);
k = kn*lab;
w = (1-alpha) * (k/lab)^alpha;
R = alpha * a * (k/lab)^(alpha-1);
D = 0;
B = 0;
c_l = w*lab + D - (1+r) * D;
c_s = R * k + (1 + r) * B - k + ((1-delta) * k) - B;
I = delta * k;
y = ((k/lab)^alpha) * lab;   
R = alpha * a * (k/lab)^(alpha-1);
y_per = log(y)*100;
y_growth =0;
c_s_per = log(c_s)*100;
c_s_growth =0;
c_l_per = log(c_l)*100;
c_l_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;

        
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
                                                                             
 
        




