gui: other simplifications/aesthetic changes
parent
922536e4ea
commit
fd880a9387
|
@ -42,7 +42,7 @@ if nargout > 1
|
|||
end
|
||||
|
||||
%% Read JSON
|
||||
jm = loadjson(json, 'SimplifyCell', 0);
|
||||
jm = loadjson(json, 'SimplifyCell', 1);
|
||||
|
||||
%% INITVAL instructions
|
||||
% initialize exogenous shocks to zero and compute initial steady state
|
||||
|
@ -107,7 +107,8 @@ if isfield(jm, 'transitory_shocks') && ~isempty(jm.transitory_shocks)
|
|||
M_.exo_det_length = 0;
|
||||
end
|
||||
|
||||
if jm.nonanticipatedshockexist == 1 || jm.delayexist == 1
|
||||
if isfield(jm, 'unanticipated_shocks') && ~isempty(jm.unanticipated_shocks) ...
|
||||
|| isfield(jm, 'expected_date') && ~isempty(jm.expected_date)
|
||||
nonanticip = jm.nonanticipmatrix;
|
||||
rowindex = 1;
|
||||
firstsimul = 0;
|
||||
|
@ -117,10 +118,24 @@ if jm.nonanticipatedshockexist == 1 || jm.delayexist == 1
|
|||
% there are nonanticipated shocks to add at first period
|
||||
if nonanticip{rowindex}{4} == 0
|
||||
% this is a current nonanticipated shock
|
||||
M_.det_shocks = [ M_.det_shocks;struct('exo_det',0,'exo_id',(nonanticip{rowindex}{2}+1),'multiplicative',0,'periods',1:1,'value',nonanticip{rowindex}{7}) ];
|
||||
M_.det_shocks = [ ...
|
||||
M_.det_shocks; ...
|
||||
struct( ...
|
||||
'exo_det', 0, ...
|
||||
'exo_id', nonanticip{rowindex}{2}+1, ...
|
||||
'multiplicative', 0, ...
|
||||
'periods', 1:1, ...
|
||||
'value',nonanticip{rowindex}{7})];
|
||||
else
|
||||
% this is a delayed nonanticipated shock
|
||||
M_.det_shocks = [ M_.det_shocks;struct('exo_det',0,'exo_id',(nonanticip{rowindex}{2}+1),'multiplicative',0,'periods',(nonanticip{rowindex}{5}):(nonanticip{rowindex}{6}),'value',nonanticip{rowindex}{7}) ];
|
||||
M_.det_shocks = [ ...
|
||||
M_.det_shocks; ...
|
||||
struct( ...
|
||||
'exo_det', 0, ...
|
||||
'exo_id', nonanticip{rowindex}{2}+1, ...
|
||||
'multiplicative', 0, ...
|
||||
'periods', nonanticip{rowindex}{5}:nonanticip{rowindex}{6}, ...
|
||||
'value', nonanticip{rowindex}{7})];
|
||||
end
|
||||
if nonanticip{rowindex+1}{1} ~= currentperiod
|
||||
% when we have tracked all first period shocks we can simulate
|
||||
|
|
Loading…
Reference in New Issue