%% create_param_files.m
% script creates parameter files

% benchmark parameters
    prm.aalpha     = 0.33;   % Capital Share
    prm.bbeta      = 0.99;   % Discount Factor
    prm.ddelta     = 0.1/4;  % Depreciation
    prm.ggamma     = 2;      % Risk Aversion    
    prm.ies        = 0.5;    % Inter-temporal Elasticity of Substitution
    prm.l_target   = 0.25;   % Labor aggregate
    prm.rho_z      = 0.95;   % Persistence Tech. Shock
    prm.rho_sig    = 0.9;    % Persistence Uncertainty Shock
    prm.mu_sig     = -0.46;
    prm.v_z        = 0.01;   % SD Uncertainty Shock
    prm.cchi       = 1.2;    % Capital adjustment cost exponent
    prm.sig_m      = 0.0005; % SD monetary policy shock
    prm.rho        = 0.25;   % Taylor rule persistence
    prm.phi        = 1;      % price adjustment cost 
    prm.cphi       = 2;      % monetary response intensity to inflation 
    prm.it         = 1/prm.bbeta;      % Taylor rule parameter
    prm.ces         = 50;     % Retail good substitutability

% Which parameters to vary
    n_comp = 2;
    n_comp_prms = 1;

    prm_list = {'phi'};

    % assign benchmark parameters
    comp_mat(1:n_comp, 1)  = prm.phi;

    % adjust parameters for comparative static
    comp_mat(2, 1)  = 0; % remove nominal rigidity
    

% generate parameter files

    for nnn = 1:n_comp

        name_list = string(fieldnames(prm));

        for ppp = 1:n_comp_prms
            prm = setfield(prm, prm_list{ppp}, comp_mat(nnn,ppp) );
        end

        prm_vec = cell2mat(struct2cell(prm));

        save(['prm_',num2str(nnn)],'-struct','prm');

    end
