Unverified Commit 553caeb1 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

time-varying information set solver: add test

parent 03c6130e
Pipeline #5218 passed with stages
in 53 minutes and 22 seconds
......@@ -423,7 +423,8 @@ MODFILES = \
bgp/solow-1/solow.mod \
bgp/nk-1/nk.mod \
bgp/ramsey-1/ramsey.mod \
dynare-command-options/ramst.mod
dynare-command-options/ramst.mod \
ramst_time_varying_information_set.mod
ECB_MODFILES = \
var-expectations/1/example1.mod \
......@@ -1232,7 +1233,8 @@ EXTRA_DIST = \
histval_initval_file/my_assert.m \
histval_initval_file/ramst_data.xls \
histval_initval_file/ramst_data.xlsx \
histval_initval_file/ramst_initval_file_data.m
histval_initval_file/ramst_initval_file_data.m \
ramst_time_varying_information_set_data.csv
if ENABLE_MATLAB
check-local: check-matlab
......
var c k;
varexo x;
parameters alph gam delt bet aa;
alph=0.5;
gam=0.5;
delt=0.02;
bet=0.05;
aa=0.5;
model;
c + k - aa*x*k(-1)^alph - (1-delt)*k(-1);
c^(-gam) - (1+bet)^(-1)*(aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam);
end;
initval;
x = 1;
k = ((delt+bet)/(1.0*aa*alph))^(1/(alph-1));
c = aa*k^alph-delt*k;
end;
steady;
check;
options_.periods = 7;
time_varying_information_set_solver('ramst_time_varying_information_set_data.csv', false);
rplot x;
rplot k;
time_varying_information_set_solver('ramst_time_varying_information_set_data.csv', true);
rplot x;
rplot k;
Exo,x,x,x,x,x,x,x
Period (info),1,2,3,4,5,6,7
Terminal,1,1.1,1.2,1.2,1.2,1.1,1.1
Period 1 (real),1.2,,,,,,
Period 2 (real),1,1.3,,,,,
Period 3 (real),1,1,1.4,,,,
Period 4 (real),1,1,1,1,,,
Period 5 (real),1,1,1,1,1,,
Period 6 (real),1,1,1,1,1,1.1,
Period 7 (real),1,1,1,1,1,1.1,1.1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment