%-------------------------------------------------------
% This file create a loop for comparing variance under 
% different values gammmas
%--------------------------------------------------------
clear all
clc

%% Give parameter values and save in a mat file
gammmaR	= [0.76:0.01:0.78];	%gammmaR =0.77;
gammmay	= [0.18:0.01:0.2];  %gammmay =0.19;
gammmaPI= [1.28:0.01:1.3];  %gammmaPI =1.29;
save parameterfile gammmaR gammmay gammmaPI

yd_sim = [];

%% Looping over gammmas the save in a mat file
for jjj = 1:length(gammmaPI)
for jj = 1:length(gammmay)
for j = 1:length(gammmaR)
    jjj
    jj
    j
    dynare NK_baseline noclearall nolog
    yd_sim(j,jj,jjj)	= oo_.var(1,1);
end
clearvars -except yd_sim jjj
load parameterfile
end
clearvars -except yd_sim
load parameterfile
end

save output_simulation yd_sim