Debian Codegraph @

tests/occbin/model_borrcon/borrcon.mod

raw
1 /*
2 Test Occbin with 1 constraint; Note that the reference regime is one where the borrowing
3 constraint is binding, i.e. the relax condition specifies the condition where we return to
4 the reference regime with a binding constraint.
5 */
6
7 var b ${b}$ (long_name='borrowing')
8 c ${c}$ (long_name='vonsumption')
9 ec ${E(c_t)}$ (long_name='expected consumption')
10 lb ${\lambda}$ (long_name='Lagrange multiplier')
11 y ${y}$ (long_name='Output')
12 c_hat ${\hat c}$
13 b_hat ${\hat b}$
14 y_hat ${\hat y}$
15 ;
16 varexo u $u$;
17
18 parameters RHO ${\rho}$, BETA ${\beta}$, M $M$, R $R$, SIGMA ${\sigma}$, GAMMAC $\gamma_c$;
19
20 model;
21 ec = c(1);
22 c = y + b - R*b(-1) ;
23 [name = 'borrowing', bind='borrcon']
24 lb = 0;
25 [name = 'borrowing', relax='borrcon']
26 b = M*y;
27 lb = 1/c^GAMMAC - BETA*R/c(+1)^GAMMAC ;
28 log(y) = RHO*log(y(-1)) + u ;
29 c_hat = log(c) - log(steady_state(c));
30 b_hat = log(b) - log(steady_state(b));
31 y_hat = log(y) - log(steady_state(y));
32 end;
33
34 occbin_constraints;
35 name 'borrcon'; bind lb<0; relax b>M*y; error_bind abs(lb); error_relax abs(b-M*y);
36 %name 'borrcon'; bind lb<-STEADY_STATE(lb); relax b>M*y;
37 end;
38
39 steady_state_model;
40 b=M;
41 c=1+M-R*M;
42 ec=c;
43 lb=(1-BETA*R)/c^GAMMAC;
44 y=1;
45 end;
46
47 R = 1.05;
48 BETA = 0.945;
49 RHO = 0.9;
50 SIGMA = 0.05;
51 M = 1;
52 GAMMAC = 1;
53
54 shocks;
55 var u; stderr SIGMA;
56 end;
57
58 @#include "borrcon_common.inc"