% Disaster Impulse response function
clear,clc,close all
addpath('files')
load('benchmark')
state0 = mean(tila1);
mean_W1_share0 = mean_W1_share;
T = 10/period_length + 1;
disaster = ones(1,T+1);
disaster(2) = 2;
simulate_with_disasters;
summarize_results;
W1_share = [mean_W1_share0;W1_share(:)];
% adjust for human capital
equity = equity/ALPHA - MU*(1 - ALPHA)/ALPHA;
debt_to_assets = debt_to_assets/ALPHA;
W1_share = W1_share/ALPHA - (1 - ALPHA)/ALPHA*MU;
set(0, 'defaultFigurePaperPosition', [0 0 20 21.5]*30);
h = figure('color', [1 1 1], 'PaperType', 'A4');
subplot(2,2,1);
plot(W1_share);
title('W1/W')
subplot(2,2,2)
plot(rb);
title('rf')
subplot(2,2,3)
plot(equity);
title('K1')
subplot(2,2,4)
plot(debt_to_assets);
title('B1/assets')
cd ..
saveas(h,'Figure_3','jpg')