Skip to content
Snippets Groups Projects
Verified Commit daa6b556 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

mshocks: better match to the semantics given in the manual

Ensure that the block is always interpreted multiplicatively relative to the
steady state, and not relative to the pre-existing shock value (if there was
already a shock declared for the same exogenous and period(s)).
parent 357076fe
No related branches found
No related tags found
No related merge requests found
......@@ -89,13 +89,13 @@ if isfield(M_, 'det_shocks')
if ~M_.det_shocks(i).multiplicative
oo_.exo_simul(k,ivar) = v;
else
oo_.exo_simul(k,ivar) = oo_.exo_simul(k,ivar) .* v;
oo_.exo_simul(k,ivar) = oo_.exo_steady_state(ivar) * v;
end
else
if ~M_.det_shocks(i).multiplicative
oo_.exo_det_simul(k,ivar) = v;
else
oo_.exo_det_simul(k,ivar) = oo_.exo_det_simul(k,ivar) .* v;
oo_.exo_det_simul(k,ivar) = oo_.exo_det_steady_state(ivar) * v;
end
end
end
......
......@@ -78,7 +78,7 @@ else
if ~M_.det_shocks(i).multiplicative
oo_.pfwee.shocks_info(exo_id, prds, 1) = v;
else
oo_.pfwee.shocks_info(exo_id, prds, 1) = oo_.pfwee.shocks_info(exo_id, prds, 1) .* v;
oo_.pfwee.shocks_info(exo_id, prds, 1) = oo_.exo_steady_state(exo_id) * v;
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment