%==========================================================================
%                RBC Model with traditional and shadow banks
%           
%           Credit: Fève, P., Moura, A., and Pierrard, O. (2019)
%==========================================================================

clear all
close all
clc

%--------------------------------------------------------------------------
% 1. Parameters
%--------------------------------------------------------------------------

%% Initialize parameters

% param(1) = 0.7;  % consumption habits
% param(2) = 5.0;  % investment costs
% param(3) = 0.0;  % leisure habits
% param(4) = 2.0;  % labor supply elasticity
% param(5) = 1.0;  % portfolio cost
% param(6) = 0.03; % p2 in excess capital cost
% %
% param(7) = 0.90;  % tfp
% param(8) = 0.90;  % investment
% param(9) = 0.90;  % labor wedge
% param(10) = 0.90; % screening
% param(11) = 0.90; % shadow wedge
% param(12) = 0.90; % deposit
% param(13) = 0.90; % regulation
% %
% param(14) = 1.0; % tfp
% param(15) = 1.0; % investment
% param(16) = 1.0; % labor
% param(17) = 1.0; % screening
% param(18) = 1.0; % shadow
% param(19) = 1.0; % deposit
% param(20) = 1.0; % regulation
load paramest;

%--------------------------------------------------------------------------
% 2. Save Parameters
%--------------------------------------------------------------------------

save parametervalues param

%--------------------------------------------------------------------------
% 4. Call Dynare
%--------------------------------------------------------------------------

addpath('C:\dynare-6.2\matlab');

dynare Shadowdyn.mod noclearall

rmpath('C:\dynare-6.2\matlab');
