Measuring the Effects of a Shock to Monetary Policy - Humboldt ...
Measuring the Effects of a Shock to Monetary Policy - Humboldt ...
Measuring the Effects of a Shock to Monetary Policy - Humboldt ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Bayesian FAVARs with Agnostic Identification 107<br />
calculation.IRA.choleskyRespMat = zeros(specDraws,specK+specM,specK+specM,specNSteps);<br />
% vec<strong>to</strong>r <strong>of</strong> initial impulse SHOCK: 25 basis points <strong>of</strong> FFR<br />
% "CONTRACTIONARY MONETARY POLICY"<br />
% /TODO : initial impulse vec<strong>to</strong>r <strong>to</strong> be premultiplied<br />
calculation.IRA.initialImpulse = diag([zeros(1,specK+specM-1) .25]);<br />
% cus<strong>to</strong>mize calculation.Lam_collect<br />
calculation.Lam_collect =...<br />
calculation.Lam_collect(:,input.specification.IRA.var_index_sr(:,1),:);<br />
% SELECT VARIABLES FOR IRA<br />
calculation.Lam_collect = permute(calculation.Lam_collect,[2 3 1]);<br />
%%%% this [X * F * draws]<br />
alpha_tilde = zeros(specK+specM,1);<br />
alpha = zeros(specK+specM,1);<br />
%each draw <strong>of</strong> alpha has size (nvar,1) and norm=1<br />
for i=1:specDraws<br />
GLOG (sprintf(’Impulse-Responses for Draw: %d’,i),2);<br />
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Begin Calculation <strong>of</strong> Cholesky Responses Matrix<br />
Phi_v = squeeze(calculation.Phi_bar_collect(i,:,:,:));<br />
Q_v = squeeze(calculation.QQ_bar_collect(i,:,:));<br />
%<br />
chol_Q = chol(Q_v);<br />
norm_mat = diag(diag(chol_Q));<br />
chol_Q = inv(norm_mat)*chol_Q; % SMAT<br />
% chol_Q is upper triangular decomposition <strong>of</strong> omega;<br />
% gives matrix <strong>of</strong> initial shocks with 1’s on <strong>the</strong> diagonal<br />
chol_Q = calculation.IRA.initialImpulse*chol_Q;<br />
calculation.IRA.choleskyRespMat(i,:,:,:) = impulsdtrf(Phi_v,chol_Q,specNSteps);<br />
%%%% End Calculation <strong>of</strong> Cholesky Responses Matrix<br />
for nalpha = 1:input.specification.IRA.alpha_draws;<br />
%for each Cholesky, draw alpha vec<strong>to</strong>rs <strong>of</strong> norm unity<br />
alpha_tilde=randn(specK+specM,1); % standard Gaussian draws<br />
alpha=(1/norm(alpha_tilde)) * alpha_tilde;<br />
candidateA = zeros(specK+specM,1,specNSteps);<br />
for j=1:specNSteps; %creating structural impulse responses<br />
candidateA(:,:,j) =...<br />
squeeze(calculation.IRA.choleskyRespMat(i,:,:,j)) * alpha;<br />
end; %structural responses combine Cholesky with alpha draws<br />
candidateB = calculation.Lam_collect(:,:,i) * squeeze(candidateA);<br />
for bc_i = 1:spec_nBC;<br />
check_sign_restriction_result = 0;