clear;
clc;
close all;
%plot_options.marks={'-b','--r','-.k',':m'};plot_options.model_names={'U:\Group\5toPiso\DSGE\Última estimación_DSGE_2014\Pruebas\ago17\Dsge_agg_8may17\DSGE_BCU_v7','U:\Group\5toPiso\DSGE\Última estimación_DSGE_2014\Pruebas\ago17\rho_remon_099\DSGE_BCU_v7_remon','U:\Group\5toPiso\DSGE\Última estimación_DSGE_2014\Pruebas\ago17\rho_remon_0999\DSGE_BCU_v7_remon'};
plot_options.marks={'-b','--r','-.k',':m'};%'-b', %azul base, roja RH
plot_options.model_names={'SOE'}; %.mat generado en corrida de 2019Q4 para incorporar vble Rreal

% CONJUNTO VIGENTE DE SHOCKS 
%  shocks=       {'a','b','qs','g','spinf','sw','spinfM','zeta','zeta2','y_star','pistar','rstar','ls',  'pFstar','ms'};
%  shocks_latex= {'v','u','z','a','\zeta','e^R','R^*','\pi^*','p^{Co*}','y^{Co}','y^*','g','\nu','ls' ,'p^{CL*}','y^{CL}','zeta^(2)', 'p^{F*}','eos^{F}','eos^{H}','remon'}; 
shocks=       {'m'};
shocks_latex= {'m'}; 

           
% CONJUNTO VIGENTE DE VARIABLES 
v_sel                   = {'N','URlog','labstar','dy','dc','dinve','tb', 'xHstar', 'm','piS' ,  'pinfobs',   'piHobs', 'piF_obs', 'w',  'dxHstar',  'robs',   'xi'};
v_name                  = {    'N', 'u', 'TA',  'Y',  'C',    'I','TB', 'exp','imp','piS', '\pi', '\pi^H','\pi^{TX}',    'w',  'x^{H*}',  'R',  '\xi'};

plot_options.v_do_cusum  = [      0, 0,0,     1,      1,       1,  1, 0,0 , 0,    0,      0,      0,       0,          1,    0, 0  ];
plot_options.n_col      = 4;
plot_options.n_row      = 5;

plot_options.v_do_cusum = [plot_options.v_do_cusum 0];
plot_options.v_adj      = 100*ones(1,size(v_sel,2)+1);
plot_options.v_div_ss   = zeros(1,size(v_sel,2)+1);
plot_options.horizon    = 40;
plot_options.grid       = 1;
plot_options.latex      = 1;
plot_options.inv_irf    = 2; % activar que invierta IRF
%plot_options.model_agg  = 2; % número de orden en la lista del modelo que tiene agregados



for j=1:size(shocks,2)
    plot_options.u_sel=shocks(j);
    if size(plot_options.model_names,2)>1
        for i=2:size(plot_options.model_names,2)
            plot_options.u_sel=[plot_options.u_sel shocks(j)];
        end
    end
    plot_options.v_sel=[v_sel shocks(j)];
    plot_options.u_name=shocks_latex(j);
    plot_options.v_name=[ v_name shocks_latex(j)];
    plots_for_dynare(plot_options)
%     saveas(gcf,['irf_' shocks{j} '.eps'],'psc2');
     saveas(gcf,['irf_' shocks{j} '.pdf'],'pdf');
%     saveas(gcf,['irf_' shocks{j} '.bmp'],'bmp');
    
end
