
a=0.27;
sigma=2;
tetha=0.5838;
pshi=0.25;
deltha=0.025;
gamma=1;
etha=1;
betha=0.99;
phih=0.6416;
phim=0.8168;
alphaa=0.35;
pshid=0.0007;
c_y=0.59;
k_y=(1-c_y)/deltha;
inv_y=1-c_y;
k_nw=3;
rhoy=0.7150;
rhorw=0.4468;
rhopiw=0.0414;
rhoz=0.4622;
rhoay=0.2016;
betha0=0.54919;
rk_bar=(alphaa/1.1)*(1/k_y)+1-deltha; 


betha1s= 1.5:0.1:1.9;

for i=1:length(betha1s)
   
        set_param_value('betha1',betha1s(i));
        betha2s=0.5:0.1:0.6;
       
        for j=1:length(betha2s)
            set_param_value('betha2',betha2s(j));
            dynare pays_111_sP noclearall;
            moments(:,i)=diag(oo_.var);
            
                      
            
        end    
        
      
  save results(i) oo_;
  save(['results_',num2str(j)])  
    
end



nu=0.9728;
betha3=1.02408 ;
muex=0.0425;
rhog=0.4982;

save parameterfile  a sigma tetha pshi deltha gamma etha betha phih phim alphaa pshid c_y k_y inv_y k_nw rhoy rhorw rhopiw rhoz rhoay betha0 rk_bar betha1 betha2 nu betha3 muex rhog


