% Run mainfile.m to replicate the results. 

clear;

displays_simple; % First, it can generate figure 1 and figure 2, which are the impluse responses to a positive structural monetary policy shock and a 
                 % positive traditional monetary policy shock, respectively.
                 % Second, it also generates figure 3, which is the impluse response to a positive capital regulatory policy shock. 

displays_joint;  % First, it can generate figure 4, which shows the interplay between the transmission effects of capital regulatory policy 
                 % and the structural monetary policy.
                 % Second, it generates figure 5, which displays volatilities of total output, inflation and default rate, 
                 % as well as welfare gains following a positive specific productivity shocks of POEs.
                 % Third , it generates figure 6, which displays volatilities of total output, inflation and default rate, 
                 % as well as welfare gains following a negative traditional monetary policy shock.

% optimal_policy; % calculates the optimal policy coefficients that maximize social welfare
displays_table;  % It can generate table 1 that saves welfare results under optimal policy rules. 
                 % It also generates figure II1 and figure II2 in appendix, which are the impluse responses to a positive specific productivity shocks of POEs
                 % and a positive shadow bank financing efficiency shock under optimal policy rules.

displays_appendix; % It generates figure III1, table III1 and table III2 in appendix.