1function info = ramsey_policy(var_list)
2
3% Copyright (C) 2007-2019 Dynare Team
4%
5% This file is part of Dynare.
6%
7% Dynare is free software: you can redistribute it and/or modify
8% it under the terms of the GNU General Public License as published by
9% the Free Software Foundation, either version 3 of the License, or
10% (at your option) any later version.
11%
12% Dynare is distributed in the hope that it will be useful,
13% but WITHOUT ANY WARRANTY; without even the implied warranty of
14% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15% GNU General Public License for more details.
16%
17% You should have received a copy of the GNU General Public License
18% along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
19
20global options_ oo_ M_
21
22options_.ramsey_policy = 1;
23oldoptions = options_;
24options_.order = 1;
25
26%test whether specification matches
27inst_nbr = size(options_.instruments,1);
28if inst_nbr~=0
29    orig_endo_aux_nbr = M_.orig_endo_nbr + min(find([M_.aux_vars.type] == 6)) - 1;
30    implied_inst_nbr = orig_endo_aux_nbr - M_.orig_eq_nbr;
31    if inst_nbr>implied_inst_nbr
32        error('You have specified more instruments than there are omitted equations')
33    elseif inst_nbr<implied_inst_nbr
34        error('You have specified fewer instruments than there are omitted equations')
35    end
36else
37    if options_.steadystate_flag
38        error('You have specified a steady state file, but not provided an instrument. Either delete the steady state file or provide an instrument')
39    end
40end
41
42[info, oo_, options_, M_] = stoch_simul(M_, options_, oo_, var_list);
43
44oo_.steady_state = oo_.dr.ys;
45
46if ~options_.noprint
47    disp_steady_state(M_,oo_)
48    for i=M_.orig_endo_nbr:M_.endo_nbr
49        if strmatch('mult_', M_.endo_names{i})
50            disp(sprintf('%s \t\t %g', M_.endo_names{i}, oo_.dr.ys(i)));
51        end
52    end
53end
54
55
56oo_.planner_objective_value = evaluate_planner_objective(M_,options_,oo_);
57
58options_ = oldoptions;
59