fill in end of sample conditional shock decompositions.

time-shift
Marco Ratto 2017-03-22 22:30:14 +01:00
parent 76097a799f
commit a9dd046db7
2 changed files with 23 additions and 0 deletions

View File

@ -271,6 +271,17 @@ end
% fix total
oo_.annualized_realtime_conditional_shock_decomposition.(['yr_' int2str(yr-nfrcst)])(:,end,:) = ...
oo_.annualized_realtime_shock_decomposition.pool(:,end,yr-nfrcst:end);
if i==t1
for my_forecast_=(nfrcst-1):-1:1,
oo_.annualized_realtime_conditional_shock_decomposition.(['yr_' int2str(yr-my_forecast_)]) = ...
oo_.annualized_realtime_shock_decomposition.pool(:,:,yr-my_forecast_:yr) - ...
oo_.annualized_realtime_forecast_shock_decomposition.(['yr_' int2str(yr-my_forecast_)])(:,:,1:my_forecast_+1);
oo_.annualized_realtime_conditional_shock_decomposition.(['yr_' int2str(yr-my_forecast_)])(:,end-1,:) = ...
oo_.annualized_realtime_forecast_shock_decomposition.(['yr_' int2str(yr-my_forecast_)])(:,end,1:my_forecast_+1);
oo_.annualized_realtime_conditional_shock_decomposition.(['yr_' int2str(yr-my_forecast_)])(:,end,:) = ...
oo_.annualized_realtime_shock_decomposition.pool(:,end,yr-my_forecast_:yr);
end
end
end
end
% ztmp=oo_.realtime_shock_decomposition.pool(:,:,21:29)-oo_.realtime_forecast_shock_decomposition.time_21;

View File

@ -229,6 +229,18 @@ for j=presample+1:nobs,
oo_.realtime_conditional_shock_decomposition.(['time_' int2str(j-forecast_)])(:,end,:) = ...
zreal(:,end,j-forecast_:j);
if j==nobs
for my_forecast_=(forecast_-1):-1:1,
oo_.realtime_conditional_shock_decomposition.(['time_' int2str(j-my_forecast_)]) = ...
zreal(:,:,j-my_forecast_:j) - ...
oo_.realtime_forecast_shock_decomposition.(['time_' int2str(j-my_forecast_)])(:,:,1:my_forecast_+1);
oo_.realtime_conditional_shock_decomposition.(['time_' int2str(j-my_forecast_)])(:,end-1,:) = ...
oo_.realtime_forecast_shock_decomposition.(['time_' int2str(j-my_forecast_)])(:,end,1:my_forecast_+1);
oo_.realtime_conditional_shock_decomposition.(['time_' int2str(j-my_forecast_)])(:,end,:) = ...
zreal(:,end,j-my_forecast_:j);
end
end
end
end