Skip to content
Snippets Groups Projects
Verified Commit 4d0854c2 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

add forecast starting point

parent eb33f53b
Branches
Tags
No related merge requests found
...@@ -45,6 +45,8 @@ switch command ...@@ -45,6 +45,8 @@ switch command
column_names = {'Active', 'Name', 'Initial Condition'}; column_names = {'Active', 'Name', 'Initial Condition'};
case 'calib_smoother' case 'calib_smoother'
column_names = {'Active', 'Name', 'Long Name'}; column_names = {'Active', 'Name', 'Long Name'};
case 'forecast'
column_names = {'Active', 'Name', 'Initial Condition', 'New Value'};
end end
editable = true(1, size(column_names, 2)); editable = true(1, size(column_names, 2));
editable(2) = false; editable(2) = false;
...@@ -52,17 +54,21 @@ data = cell(nvars, size(column_names, 2)); ...@@ -52,17 +54,21 @@ data = cell(nvars, size(column_names, 2));
data(:, 1) = {false}; data(:, 1) = {false};
data(:, 2) = model_settings.variables(varidxs, 1); data(:, 2) = model_settings.variables(varidxs, 1);
if strcmp(command, 'perfect_foresight') || strcmp(command, 'stoch_simul') if strcmp(command, 'stoch_simul') || strcmp(command, 'forecast')
data(:, 3) = num2cell(oo_.steady_state(varidxs)); data(:, 3) = num2cell(oo_.steady_state(varidxs));
elseif strcmp(command, 'calib_smoother') if strcmp(command, 'forecast')
data(:, 3) = model_settings.variables(varidxs, 3); data(:, 4) = num2cell(oo_.steady_state(varidxs));
editable(3) = false; editable(3) = false;
editable(4) = true;
end end
if strcmp(command, 'perfect_foresight') elseif strcmp(command, 'perfect_foresight')
if ~isempty(ys0_) if ~isempty(ys0_)
data(:, 3) = num2cell(ys0_(varidxs)); data(:, 3) = num2cell(ys0_(varidxs));
end end
data(:, 4) = num2cell(oo_.steady_state(varidxs)); data(:, 4) = num2cell(oo_.steady_state(varidxs));
elseif strcmp(command, 'calib_smoother')
data(:, 3) = model_settings.variables(varidxs, 3);
editable(3) = false;
end end
tabTitle = 'All'; % fix this later if we still want to support it tabTitle = 'All'; % fix this later if we still want to support it
......
...@@ -104,6 +104,9 @@ handles.pushbuttonForecast = uicontrol( ... ...@@ -104,6 +104,9 @@ handles.pushbuttonForecast = uicontrol( ...
options_.nodisplay = 0; options_.nodisplay = 0;
options_.periods = str2double(handles.periods.String); options_.periods = str2double(handles.periods.String);
M_.endo_histval = [handles.endoTable.Data{:,4}]';
M_.exo_histval = zeros(size(M_.exo_names));
oo_.forecast = dyn_forecast(model_settings.varlist_.forecast, M_, options_, oo_, 'simul'); oo_.forecast = dyn_forecast(model_settings.varlist_.forecast, M_, options_, oo_, 'simul');
jObj.stop; jObj.stop;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment